Published
Edited
Apr 1, 2022
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.
Learn more