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",
title: (d) => `${d.CountryName}\n${(d.HeadCount * 100).toFixed(1)}%`,
insetLeft: 0.2,
insetRight: 0.2
})),
Plot.ruleY([0])
]
})