Platform
Resources
Pricing
Sign in
Get started
Shruti Mukhtyar
Workspace
Fork
Published
By
Shruti Mukhtyar
Edited
Apr 1, 2022
Fork of
Streaming Shapefiles
•
2 forks
Insert cell
Insert cell
viewof
zipFile
=
file
(
{
title
:
"Upload zipped shapefile"
,
description
:
"Only .zip files are allowed in this example."
,
accept
:
".zip"
,
}
)
Insert cell
Insert cell
archive
=
zipFile
.
arrayBuffer
(
)
.
then
(
buffer
=>
jszip
.
loadAsync
(
buffer
)
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
shp
=
archive
.
file
(
shpFileName
)
.
async
(
"arraybuffer"
)
Insert cell
dbf
=
archive
.
file
(
dbfFileName
)
.
async
(
"arraybuffer"
)
Insert cell
Insert cell
shapefile
=
require
(
"https://unpkg.com/shapefile@0.6"
)
Insert cell
//collection = shapefile.read(shp, dbf)
collection
=
shapefile
.
read
(
shp
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
zipFile
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
archive
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
filenames
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
shpFileName
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dbfFileName
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
shp
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dbf
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
shapefile
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
collection
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
jszip
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML