Published
Edited
Apr 17, 2022
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
width,
height: 1200,
marginLeft: 110,
padding: 0.05,
color: {
type: "sqrt",
interpolate: d3.interpolatePuRd,
legend: true,
label: "Tonnes of CO2 equivalent",
tickFormat: (d) => formatLabel(d),
},
x: {
axis: "top",
label: "",
},
y: {
label: "",
},
marks: [
Plot.cell(
top_100 ,
{
x: "year",
y: "country",
z: "value",
fill: "value",
title: (d) => `${d.country} (${d.year}) - ${formatLabel(d.value)} tonnes`,
sort: { x: "y", reverse: true },
}
),
]
})
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