Compares GDP per capita, life expectancy, and population growth for Nigeria vs. four peer African economies (1952–2007) using the Gapminder dataset, with a full analytics dashboard.
# Nigeria & Sub-Saharan Africa Development Trends (1952–2007)
Compares GDP per capita, life expectancy, and population growth for **Nigeria**
against four peer Sub-Saharan African economies — **Ghana, Kenya, South Africa,
and Senegal** — using the classic Gapminder five-year dataset.
## Dashboard
## Individual Charts
**GDP per capita, 1952–2007**
**Life expectancy at birth, 1952–2007**
**Population growth, 1952–2007 (log scale)**
## Key findings
- **Nigeria's GDP per capita roughly doubled** between 1952 and 2007 (+87%), but
trailed South Africa throughout, and only pulled ahead of Ghana and Kenya in the
final decade, driven largely by the 1970s oil boom and a partial recovery after 2002.
- **Population growth was the standout trend**: all five countries at least tripled
in population, with Kenya growing fastest (+451%) and Nigeria adding over 100
million people (33M → 135M) — the largest absolute increase of any country compared.
- **Life expectancy gains were uneven.** Senegal, Ghana, and Kenya posted the
strongest sustained improvements, while South Africa's life expectancy actually
*declined* after 1992, reflecting the HIV/AIDS epidemic's demographic impact —
a reminder that GDP growth and public health outcomes don't always move together.
- **Nigeria's GDP path was the most volatile** of the five, spiking during the
1970s oil boom, falling through the 1980s–90s (debt crisis, structural adjustment,
oil price swings), and only recovering strongly after 2002.
## Methodology
`analyze.py` first attempts to pull the canonical Gapminder five-year dataset
live from its public source. If that request fails (no internet connection, or
the source is unreachable — as in a sandboxed environment), it automatically
falls back to the bundled offline snapshot in `data/nigeria_ssa_development.csv`,
so the script always runs end-to-end without manual setup.
## Run it yourself
```bash
pip install -r requirements.txt
python analyze.py
```
This regenerates all thre …