Public
Edited
Jul 9, 2023
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: "turnout",
fill: "key",
fx: "city",
sort: {x: null, color: null, fx: {value: "-y", reduce: "sum"}}
}),
Plot.ruleY([0])
]
})
Insert cell
data = FileAttachment("turnout-comparison-data.csv").csv({typed: true})
Insert cell
turnout-comparison-data.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

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