# Life expectancy explorer

> A linked dashboard of wealth and health in 67 countries since 1990: region filters, a year slider with playback, a bubble chart, a trend line and a sortable table that all follow one selection.

A linked dashboard in one HTML page: 67 countries, every year from 1990 to 2023, and four views that follow one selection. Pick regions, drag or play the year, click a bubble or a row to follow a country, click the trend line to jump to a year. The address bar keeps up, so a link to the page opens it exactly as you left it.

## Explorer

2023 2023

**–**&#x61;verage life expectancy, by population

**–**&#x73;ince 1990

**–**&#x70;eople in the countries shown

**–**&#x67;ap between longest and shortest

**Wealth and health** Bubble size: population · click to follow a country

**Over time**

| Country | Life expectancy | GDP per person | Since 1990 |
| ------- | --------------- | -------------- | ---------- |

## What it shows

Play the years from 1990 and the cloud drifts up and to the right: almost every country is both richer and longer-lived than it was. The exceptions are the stories. Southern Africa sinks through the 1990s and early 2000s as HIV spreads, then climbs back faster than anywhere once treatment arrives. Russia and Ukraine dip after 1991. And 2020–2021 pulls 57 of the 67 bubbles down at once, the pandemic visible as a single shudder across the chart.

## How it's built

- **One state, four views.** The regions, year, followed country and hovered country live in one object. A change to the first three redraws everything; a hover only toggles classes, so the bubble, its row and the tooltip light up together without a redraw.
- **The state is the address.** Each change writes `#year=…&regions=…&country=…` with `history.replaceState`, and the page reads it back on load: a shared link is a shared view, with no server.
- **The averages are weighted.** India counts for more than Senegal in the headline number, since it is a statement about people, not about countries.

Sources: UN World Population Prospects (2024) for life expectancy and population, and the World Bank's GDP per person at purchasing power parity, in constant 2021 international dollars, as compiled by Our World in Data: [life expectancy](https://ourworldindata.org/grapher/life-expectancy), [GDP per capita](https://ourworldindata.org/grapher/gdp-per-capita-worldbank), [population](https://ourworldindata.org/grapher/population). The 67 countries are every one of 15 million people or more with a full series.
