twoHelixestwoHelixes Start free

Datasets / World prosperity

Change in GDP per capita since 1990, top 20

Every bar is a difference between a country's 1990 value and its most recent value, so the chart shows how far each country moved over the period rather than where it ended up.

Question how much has GDP per capita changed since 1990 by country?
Change in GDP per capita since 1990025k50k75k100kIrelandGuyanaLuxembourgSouth KoreaHong KongPolandUnited StatesLithuaniaDenmarkTurkeyChange
World prosperity — 20 rows charted from 8,415, drawn as a hbar
How it decided
Finding the data13 ms

World prosperity: 8,415 rows, 8 columns. country, year and gdp_per_capita_ppp for 1990 and the latest year; missing values are dropped.

Shaping the data26 ms

8,415 rows in, 20 out across 2 columns. Every bar is a difference between a country's 1990 value and its most recent value, so the chart shows how far each country moved over the period rather than where it ended up.

Choosing the chart4 ms

hbar. A difference per country is one measure with text labels, so sorted horizontal bars are clearest.

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.

d = df.dropna(subset=["gdp_per_capita_ppp"])
early = (d[d["year"] == 1990][["country", "gdp_per_capita_ppp"]]
         .rename(columns={"gdp_per_capita_ppp": "gdp_1990"}))
latest = d.loc[d.groupby("country")["year"].idxmax(), ["country", "gdp_per_capita_ppp"]]
latest = latest.rename(columns={"gdp_per_capita_ppp": "gdp_latest"})
merged = early.merge(latest, on="country")
merged["change"] = merged["gdp_latest"] - merged["gdp_1990"]
result = (merged.sort_values("change", ascending=False)
          .head(20)[["country", "change"]].reset_index(drop=True))

What it charted

20 rows out of 8,415, 2 columns. First 8 shown.

countrychange
Ireland101833.563
Singapore93631.55
Guyana78584.249
Macao61797.524
Luxembourg45965.57
Malta45447.411
South Korea41319.202
Norway38565.176