Datasets / World climate and energy
Highest CO2 per person, latest year per country
Each country contributes its own latest observed year, so the ranking compares most countries on recent data without filling missing years with zero.
How it decided
World climate and energy: 8,037 rows, 6 columns. country and co2_tonnes_per_person; the year is each country's latest observed year.
8,037 rows in, 15 out across 2 columns. Each country contributes its own latest observed year, so the ranking compares most countries on recent data without filling missing years with zero.
hbar. Country names are long labels and emissions are one measure, so sorted horizontal bars read best.
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=["co2_tonnes_per_person"])
latest = df.groupby("country")["year"].transform("max")
result = df[df["year"] == latest][["country", "co2_tonnes_per_person"]]
result = result.sort_values("co2_tonnes_per_person", ascending=False)
result = result.head(15).reset_index(drop=True)
What it charted
15 rows out of 8,037, 2 columns. First 8 shown.
| country | co2_tonnes_per_person |
|---|---|
| Qatar | 41.2712 |
| Kuwait | 26.2475 |
| Brunei | 26.0462 |
| Bahrain | 24.2701 |
| Trinidad and Tobago | 22.9319 |
| Saudi Arabia | 20.3792 |
| United Arab Emirates | 20.1311 |
| New Caledonia | 18.0644 |