Public
Edited
Jun 21, 2024
2 stars
Insert cell
Insert cell
Plot.plot({
projection: "albers-usa",
width,
color: {
scheme: "Oranges",
legend: true,
percent: true,
label: "Percentile Rank"
},
marks: [
Plot.geo(nation),

Plot.geo(themesData, {
geometry: (d) => features.get(d.fips), //Use `features` Map below to get county geometry
fill: "value",
fx: "theme"
}),
Plot.geo(statemesh, { stroke: "#fff" })
]
})
Insert cell
features = new Map(counties.features.map((d) => [d.id, d]))
Insert cell
Insert cell
themes = [
["RPL_THEME1", "Socioeconomic Status"],
["RPL_THEME2", "Household Characteristics"],
["RPL_THEME3", "Racial & Ethnic Minority Status"],
["RPL_THEME4", "Housing Type & Transportation"]
]
Insert cell
Insert cell
import {us} from "@observablehq/us-geographic-data"
Insert cell
nation = topojson.feature(us, us.objects.nation)
Insert cell
counties = topojson.feature(us, us.objects.counties)
Insert cell
Insert cell
states = topojson.feature(us, us.objects.states)
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