twoHelixestwoHelixes Start free

Datasets / World climate and energy

Renewable share against CO2 per person, latest year per country

One point per country in its latest year with both indicators observed, so the relationship is read across countries rather than over time.

Question is a higher renewable electricity share linked to lower CO2 per person?
Renewable share against CO2 per person0102030400.04.014410512.60162520.47193332.0616946.52509763.47826486.86869Renewable Electricity Pct
World climate and energy — 201 rows charted from 8,037, drawn as a scatter
How it decided
Finding the data16 ms

World climate and energy: 8,037 rows, 6 columns. renewable_electricity_pct and co2_tonnes_per_person in each country's latest year with both values.

Shaping the data14 ms

8,037 rows in, 201 out across 3 columns. One point per country in its latest year with both indicators observed, so the relationship is read across countries rather than over time.

Choosing the chart5 ms

scatter. Two measures with no time axis is a scatter; no colour column keeps the palette to a single series.

Applying defaults1 ms

Palette, spacing, axis titles and legend placement applied. 0 issues found.

The transformation

This is the code, not a description of it — the chart above was drawn from what it returns, and the notebook download runs the same lines against the same file.

df = df.dropna(subset=["renewable_electricity_pct", "co2_tonnes_per_person"])
latest = df.groupby("country")["year"].transform("max")
result = df[df["year"] == latest][["country", "renewable_electricity_pct", "co2_tonnes_per_person"]]
result = result.sort_values("renewable_electricity_pct").reset_index(drop=True)

What it charted

201 rows out of 8,037, 3 columns. First 8 shown.

countryrenewable_electricity_pctco2_tonnes_per_person
Comoros0.00.6375
Grenada0.03.216
Guinea-Bissau0.00.1554
Gambia0.00.2909
Montserrat0.06.0215
East Timor0.00.477
Saint Pierre and Miquelon0.09.335
Saint Helena0.02.0636