Published
Edited
Apr 18, 2022
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
width,
height: 800,
marginLeft: 100,
padding: 0.05,
color: {
legend: true,
},
x: {
axis: "top",
label: `${selectedUnit.value} →`,
nice: true,
},
y: {
label: "",
},
marks: [
Plot.ruleY(data,
{
x: "value",
y: "country",
stroke: "LightGray",
}),
Plot.dot(data, {
x: "value",
y: "country",
r: 4,
fill: "variable",
sort: { y: "x"}
}),
]
})
Insert cell
Insert cell
years = d3.extent(emissions_oecd, d => d.year)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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