Published
Edited
Mar 1, 2022
2 forks
5 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
height = 600
Insert cell
saveableData = source
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.csv("https://gist.githubusercontent.com/mbostock/9535021/raw/928a5f81f170b767162f8f52dbad05985eae9cac/us-state-capitals.csv", ({name, longitude, latitude}) => [name, +longitude, +latitude])
Insert cell
projection = d3.geoAlbers().scale(1280).translate([480, 300])
Insert cell
us = d3.json("https://cdn.jsdelivr.net/npm/us-atlas@1/us/10m.json")
Insert cell
topojson = require("topojson-client@3")
Insert cell
d3 = require("d3-fetch@1", "d3-dsv@1", "d3-geo@1", "d3-geo-voronoi@1", "d3-selection")
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