Unlisted
Edited
Aug 6, 2024
3 forks
Importers
1 star
Insert cell
Insert cell
Plot.plot({
projection: "albers-usa",
color: {
type: "quantile",
n: 9,
scheme: "blues",
label: "Unemployment (%)",
legend: true
},
marks: [
Plot.geo(counties, {
fill: "unemployment",
title: (d) => `${d.properties.name} ${d.properties.unemployment}%`,
tip: true
})
]
})
Insert cell
Insert cell
us = FileAttachment("us-counties-10m.json").json()
Insert cell
Insert cell
counties = {
const counties = topojson.feature(us, us.objects.counties);
const rate = await FileAttachment("us-county-unemployment.csv").csv();
const map = new Map(rate.map((d) => [d.id, +d.rate]));
counties.features.forEach((g) => {
g.properties.unemployment = map.get(g.id);
});
return counties.features;
}
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