Public
Edited
Jun 5, 2023
38 forks
5 stars
Insert cell
Insert cell
Plot.plot({
x: {axis: null},
y: {tickFormat: "s", grid: true},
color: {scheme: "spectral", legend: true},
marks: [
Plot.barY(data, {
x: "key",
y: "population",
fill: "key",
fx: "state",
sort: {x: null, color: null, fx: {value: "-y", reduce: "sum"}}
}),
Plot.ruleY([0])
]
})
Insert cell
data = FileAttachment("population-state-age.csv").csv({typed: true})
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