Public
Edited
Oct 31, 2023
Insert cell
Insert cell
us = FileAttachment("counties-albers-10m.json").json()
Insert cell
valuemap = new Map(data01.map(d => [d.name, d.rate]))
Insert cell
Insert cell
data01 = d3.csv(data_link,d3.autoType)
Insert cell
Plot.plot({
projection: "identity",
width: 975,
height: 610,
color: {scheme: "Blues", type: "quantize", n: 9, domain: [1, 20], label: "poverty rate (%)", legend: true},
marks: [
Plot.geo(topojson.feature(us, us.objects.states), Plot.centroid({
fill: d => valuemap.get(d.properties.name),
title: d => `${d.properties.name}\n${valuemap.get(d.properties.name)}%`,
tip: true
})),
Plot.geo(topojson.mesh(us, us.objects.states, (a, b) => a !== b), {stroke: "white"})
]
})
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more