Public
Edited
May 11, 2023
4 forks
16 stars
Insert cell
Insert cell
Plot.plot({
height: 720,
axis: null,
y: {domain: [0, step]},
color: {scheme: "YlGnBu"},
facet: {data: industries, y: "industry"},
marks: [
d3.range(bands).map((i) => Plot.areaY(industries, {x: "date", y: (d) => d.unemployed - i * step, fill: i, clip: true})),
Plot.text(industries, Plot.selectFirst({text: "industry", frameAnchor: "top-left", dx: 6, dy: 6})),
Plot.frame()
]
})
Insert cell
bands = 7
Insert cell
step = d3.max(industries, (d) => d.unemployed) / bands
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