Datasets / World climate and energy
Change in CO2 per person since 1990
The latest observed value minus the 1990 value, shown for the countries with the largest absolute change in either direction.
How it decided
World climate and energy: 8,037 rows, 6 columns. country, year and co2_tonnes_per_person; only countries with both a 1990 and a later value appear.
8,037 rows in, 20 out across 2 columns. The latest observed value minus the 1990 value, shown for the countries with the largest absolute change in either direction.
hbar. A signed change across named countries is a ranking, so horizontal bars keep the largest movers legible.
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"])
base = df[df["year"] == 1990].set_index("country")["co2_tonnes_per_person"]
last_rows = df.loc[df.groupby("country")["year"].idxmax()].set_index("country")
last = last_rows["co2_tonnes_per_person"]
change = (last - base).dropna()
ranked = change.abs().sort_values(ascending=False).head(20)
result = ranked.index.to_frame(index=False)
result["co2_change"] = change.reindex(result["country"]).values
result = result.sort_values("co2_change", ascending=False).reset_index(drop=True)
What it charted
20 rows out of 8,037, 2 columns. First 8 shown.
| country | co2_change |
|---|---|
| Qatar | 15.3095 |
| Trinidad and Tobago | 9.3732 |
| Oman | 9.2535 |
| New Caledonia | 9.1316 |
| Mongolia | 8.3362 |
| China | 6.5055 |
| Brunei | 6.4279 |
| United Kingdom | -5.9669 |