The Gap That Closed: 142 Countries, 55 Years, One Chart
A full Gapminder analysis — turn the most famous scatter in statistics into 142 connected trajectories and watch the development gap close. No code, no animation.
gapminder — 142 countries measured every five years from 1952 to 2007 (country, continent, year, life expectancy, population, income per person), 1,704 rows.
Download the file and follow along in Stratum — every figure below is a real screenshot from it.
A scatter plot is a freeze-frame. It shows you two variables at one instant and tells you nothing about motion. The most famous scatter in all of statistics — a country's income against how long its people live — is almost always shown that way: one year, one cloud of dots, one tidy upward curve. Hans Rosling made it unforgettable by animating it, bouncing the bubbles through the decades.
You don't need the animation. With the gapminder dataset you can recover the entire development story from static charts — if you give the dots their history back. This is how, in about twenty minutes and without a line of code.
Step 1 — Look before you model (and earn the log axis)
Income per person is savagely right-skewed: a wall of poor countries and a long tail of rich ones, skewness ≈ 3.85. A single derived column — log(gdpPercap) — pulls it into a near-symmetric bell (skew ≈ 0.11).
That transform isn't cosmetic: income runs from $241 to $113,523 a year — 2.67 orders of magnitude. On a spread that wide a log axis is honest work. (It's worth being deliberate here — on sub-decade data a log axis looks identical to a linear one, a trap worth knowing. This data spans nearly three decades, so the log scale genuinely straightens the fan.)
Step 2 — The snapshot everyone quotes
Filter to 2007, plot life expectancy against income on a log-income axis, and the fog snaps into a line: richer countries live longer, and on log-income the climb is almost straight. Drop a logarithmic trend on it and read the fit.
True — and only one frame of a movie. It tells you where every country is in 2007, and nothing about how it got there or where it's headed. To see that, we have to give the dots their history back.
Step 3 — Connect the dots
Put all twelve years back on the chart and turn on Connect Points, ordered by year. Each country's dots join — in time order — into a trajectory. Now you can read direction.
- China: from $400 / 44 years in 1952 to $4,959 / 73 years in 2007. Income ×12, +29 years of life — one continuous climb up and to the right.
- South Korea: steeper still — income up more than 20-fold to $23,348, life expectancy 47.5 → 78.6.
Same bottom-left starting corner, a completely different altitude by the end. One toggle turned a scatter plot into a story.
Step 4 — The whole world, a decade at a time
Two countries is an anecdote. Facet the same chart into small multiples by year and read the panels left to right — a time-lapse with no animation at all.
In 1952 the world is split in two — a poor, short-lived clump and a small rich, long-lived cluster, a visible gap between them. Sweep across the decades and the two clumps drift together; the gap fills in; by 2007 there is one continuous band up the diagonal. The "two worlds" didn't diverge. They merged.
You can put a number on the closing: the life-expectancy floor rose from 28.8 years (1952) to 39.6 (2007), the whole distribution shifted up ~18 years, and in relative terms the spread shrank about a third (coefficient of variation 0.25 → 0.18). What didn't close is a hard tail of countries left behind while everyone else climbed — a tail we connect, and explain, in Step 6.
Step 5 — Every continent went up
A Trend of mean life expectancy by year, split by continent, makes it quantitative. Every line rises.
| Continent | 1952 | 2007 |
|---|---|---|
| Africa | 39.1 | 54.8 |
| Asia | 46.3 | 70.7 |
| Americas | 53.3 | 73.6 |
| Europe | 64.4 | 77.6 |
| Oceania | 69.3 | 80.7 |
Globally, mean life expectancy climbed 49.1 → 67.0 years (population-weighted, 48.9 → 68.9). Look closely and Africa's line stalls in the late 1990s while the others keep climbing — a clue we cash in next.
Step 6 — The lines that bend back
Every trajectory so far went up. The revealing ones don't — and this is where a connected scatter earns its keep, because a reversal is invisible in a cloud and unmistakable in a line. Connect a few southern- and central-African countries and watch them bend.
- Rwanda: climbs for forty years, then falls off a cliff — life expectancy 46 → 23.6 in 1992 (the genocide, drawn as a vertical drop) — then climbs all the way back to 46 by 2007.
- Zimbabwe: slides down and to the left, life 48.5 → 43.5, income falling with it.
- Botswana: income rockets 15-fold to over $12,570 — a success by the money — yet its life-expectancy line peaks and bends back down to 50.7. Rich and dying younger: the HIV/AIDS epidemic, which no income axis alone would ever reveal.
The wealth kept rising while the health turned over. You only see it because the line remembers where it's been. A static cloud hides direction; the connected line shows it.
Step 7 — How tight is it, really?
Across all 1,704 rows, life expectancy on log-income gives r = 0.81, R² = 0.65. Money explains about two-thirds of lifespan — strong, but not destiny.
The other third is medicine, public health, war and policy — and it lives in the residuals. Fit the line for 2007 and sort by who falls farthest below it — dying young for their income:
- Swaziland (−25.9 years vs predicted), Angola (−23.3), Botswana (−22.2), South Africa (−21.4), Equatorial Guinea (−21.1), Gabon (−16.6).
Two clusters wearing one mask: the HIV-devastated south, and the oil economies (Angola, Equatorial Guinea, Gabon) where $12–13k-a-head income never became health. Now flip it — long life on a modest income:
- Vietnam (+13.1 years, on $2,442), Nicaragua (+10.9), Comoros (+10.5), Costa Rica and Cuba (both +7.8, near 79 years on a fraction of U.S. wealth).
These are the public-health overperformers — clinics, vaccines and clean water instead of GDP. The fit gives you the rule; these two lists — who beat it and who squandered it — carry the story the average can't.
Step 8 — Continents, tested
Are the continents genuinely different, or are our eyes just grouping colors? A one-way ANOVA of 2007 life expectancy by continent answers it: F(4, 137) = 59.7, p ≈ 0, η² = 0.635.
Continent alone accounts for about 64% of the 2007 spread. These aren't arbitrary color groups; the between-continent differences are real and large — even at the end of fifty-five years of convergence.
What we actually did
Distributions, a log transform, a snapshot scatter, connected trajectories, small multiples, a trend, a regression and an ANOVA — eight lenses on one dataset, no code, no animation — to turn a single famous curve into the real development story: the world got richer and healthier together, the two-worlds gap closed, and the exceptions that bent backward are the whole point. 140 of 142 countries ended 2007 healthier than they began — only Swaziland and Zimbabwe did not.
That's the difference between a chart and an analysis.