Public
Edited
May 10, 2023
4 forks
2 stars
Insert cell
Insert cell
Plot.plot({
x: {label: "Population (millions) →"},
y: {percent: true, label: "↑ Proportion living on less than $30 per day (%)"},
marks: [
Plot.rectY(povcalnet, Plot.stackX({
filter: (d) => ["N", "A"].includes(d.CoverageType),
x: "ReqYearPopulation",
order: "HeadCount",
reverse: true,
y2: "HeadCount", // y2 to avoid stacking by y
title: (d) => `${d.CountryName}\n${(d.HeadCount * 100).toFixed(1)}%`,
insetLeft: 0.2,
insetRight: 0.2
})),
Plot.ruleY([0])
]
})
Insert cell
povcalnet = FileAttachment("povcalnet.csv").csv({typed: true})
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