Published
Edited
Dec 28, 2020
1 fork
19 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mesh = d3.geoVoronoi(data.map(({longitude, latitude}) => [longitude, latitude])).cellMesh()
Insert cell
data = d3.csvParseRows(source, ([name, longitude, latitude]) => ({name, longitude: +longitude, latitude: +latitude}))
Insert cell
sampleData = d3.csvParse(await FileAttachment("us-state-capitals.csv").text(), ({name, longitude, latitude}) => [name, +longitude, +latitude])
Insert cell
projection = d3.geoAlbers().scale(1300).translate([487.5, 305])
Insert cell
us = FileAttachment("states-albers-10m.json").json()
Insert cell
topojson = require("topojson-client@3")
Insert cell
d3 = require("d3-dsv@1", "d3-geo@1", "d3-geo-voronoi@1")
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