Public
Edited
May 12, 2023
4 forks
2 stars
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.ruleY([0]),
Plot.lineY(crimea, {x: "date", y: "deaths", stroke: "cause", marker: true})
]
})
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}))); // pivot taller
}
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