Published
Edited
Apr 22, 2022
Fork of Choropleth
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
color = d3.scaleQuantize([1, 500], d3.schemeReds[9])
Insert cell
path = d3.geoPath()
Insert cell
format = d => Math.round(`${d}`)
Insert cell
states = new Map(us.objects.states.geometries.map(d => [d.id, d.properties]))
Insert cell
us = FileAttachment("counties-albers-10m.json").json()
Insert cell
topojson = require("topojson-client@3")
Insert cell
d3 = require("d3@5")
Insert cell
import {legend} from "@d3/color-legend"
Insert cell
html`<style>
.tooltip {
font-family:sans-serif;
border: 1px solid #ccc;
font-size: 12px
}
</style>
`
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