Unlisted
Edited
Apr 24, 2023
1 fork
Importers
1 star
Insert cell
Insert cell
Plot.plot({
y: {grid: true},
color: {legend: true},
marks: [
Plot.areaY(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