Public
Edited
May 9, 2023
10 forks
Importers
3 stars
Insert cell
Insert cell
Plot.plot({
x: {
interval: "month",
tickFormat: (d) => d.toLocaleString("en", {month: "narrow"}),
label: null
},
y: {grid: true},
marks: [
Plot.barY(crimea, {x: "date", y: "deaths", fill: "cause"}),
Plot.ruleY([0])
]
})
Insert cell
crimea = {
const data = await FileAttachment("crimean-war.csv").csv({ typed: true });
return data.columns.slice(2)
.flatMap((cause) => data.map(({ date, [cause]: deaths }) => ({ date, cause, deaths })));
}
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