Public
Edited
Oct 4, 2023
6 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
jsts = require("https://unpkg.com/jsts@2.10.0/dist/jsts.min.js")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
usa = ({
type: "FeatureCollection",
features: world.features.filter((d) => d.properties.ISO3 == "USA")
})
Insert cell
Insert cell
reader = new jsts.io.GeoJSONReader()
Insert cell
writer = new jsts.io.GeoJSONWriter()
Insert cell
data = reader.read(usa)
Insert cell
Insert cell
a = data.features[0].geometry
Insert cell
abuff = a.buffer(distance) // distance in map unit
Insert cell
buffer = writer.write(abuff)
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