Public
Edited
Oct 2, 2024
Insert cell
Insert cell
wb_tidy.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Plot.plot({
marks: [
Plot.frame(),
Plot.dot(worldbank, {
filter: d => d.year == 2010,
x: "gdp",
y: "co2",
r: "life_exp",
fill: "grey",
// fy: "income_group",
// fx: "region",
opacity: 0.1,
tip: true
}),
Plot.dot(worldbank, {
filter: d => d.year == 2010,
x: "gdp",
y: "co2",
r: "life_exp",
fill: "life_exp",
fy: "income_group",
// fx: "region",
opacity: 0.5,
tip: true
})
],
marginRight: 200,
color: { legend: true, scheme: "Rainbow"},
x: {type: "log", tickRotate: 45},
y: {type: "log"},
r: { domain: d3.extent(worldbank, (d) => d.life_exp), range: [1, 10] },
fy: {domain: ["High income", "Upper middle income", "Lower middle income", "Low income", "NA"]}
})
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