Published
Edited
Apr 15, 2022
2 forks
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
chart = (data) => {
return Plot.plot({
width: 1000,
height: 300,
color: {
legend: true,
type: "ordinal",
scheme: "oranges",
tickFormat: (d) => drought_categories[d],
},
y: {
label: "% of Fresno County in Drought",
nice: true,
},
x: {
label: "",
},
marks: [
Plot.areaY(data, Plot.stackY({
x: "start",
y: "value",
z: "category",
fill: "category",
reverse: true,
title: (d) => `${d3.format("0.1f")(d.value)}% ${drought_categories[d.category]}`,
})),
]
})
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {pivot} from "ac2a320cf2b0adc4"
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