Public
Edited
Dec 11, 2023
Insert cell
Insert cell
Insert cell
Insert cell
plot_gdp_cop = Plot.plot({
title: "Annual GDP & C02 Emissions by Country",
caption: "Data Source: World Bank",
x: {grid: true, type: "log"},
y: {grid: true, type: "log"},
marks: [
Plot.dot(world_bank_data, {
filter: (d) => (d.year === 2019),
x: "gdp",
y: "co2",
fill: "black",
tip: true
}),
Plot.linearRegressionY(world_bank_data, {
filter: (d) => (d.year === 2019),
x: "gdp",
y: "co2",
fill: "red",
stroke: "red"
})
]
})
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