# Ethiopia Macroeconomic Pipeline
A small, reproducible Python pipeline that pulls Ethiopia's GDP growth,
inflation, and unemployment series from the World Bank API, builds an
analysis-ready panel, and explores their relationship with a transparent
regression and an interactive dashboard.
The goal of this repository is not a novel empirical result — it is a
concrete demonstration of a reproducible applied-economics research
workflow: versioned data pull → cleaning → analysis → interactive
reporting, with tests confirming each stage does what it claims.
## Pipeline
```
World Bank API ─▶ extract.py ─▶ data/raw/*.csv
│
▼
clean_merge.py
│
▼
data/processed/ethiopia_economics.csv
│
┌─────────────┴─────────────┐
▼ ▼
analyze.py app/streamlit_app.py
(regression_summary.txt) (interactive dashboard)
```
## Quickstart
```bash
git clone
github.com
cd VSCode-Economics
python -m venv .venv && source .venv/bin/activate
pip install -e .
pip install -r requirements.txt
python -m ethiopia_econ.extract # pulls fresh data from the World Bank API
python -m ethiopia_econ.clean_merge # builds data/processed/ethiopia_economics.csv
python -m ethiopia_econ.analyze # fits the regression, writes results/regression_summary.txt
streamlit run app/streamlit_app.py # interactive dashboard
pytest # sanity tests on the pipeline
```
Raw CSVs are already committed under `data/raw/` so the pipeline runs
offline without hitting the World Bank API first.
## Results (1991–2024, N = 34)
```
GDP_Growth = 19.34 - 0.14*Inflation - 5.04*Unemployment + 0.25*Year_since_1991
```
| Term | Coef. | HC1 Std. Err. | p |
|---|---|---|---|
| Const | 19.34 | 2.78 | <0.001 |
| Inflation | -0.14 | 0.07 | 0.056 |
| Unemployment | -5.04 | 1.07 | <0.001 |
| Year trend | 0.25 | 0.10 | 0.008 |
R² = 0.45, adj. R² = 0.40. Full output in `results/regression_summary.txt`
(reg …