Public
Edited
May 10, 2023
Insert cell
Insert cell
Insert cell
Insert cell
sp_polygon = sp.features[0].geometry.coordinates[0]
Insert cell
sp_polygon[0].join(",")
Insert cell
centroid = [
d3.mean(sp_polygon.map(x => x[0])),
d3.mean(sp_polygon.map(x => x[1]))
]
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