Replication code and data for a Sub-Saharan Africa green infrastructure financing-gap analysis (World Bank PPI, Beta regression, logit, XGBoost/SHAP) — submitted to Springer Discover Cities.
# Green Finance Gap — Project Folder Instructions
Companion codebase to *Financing the Unbuilt City: Evidence of a Government Support Gap in Sub-Saharan Africa's Green Infrastructure Transition* (Discover Cities
submission). Everything in here is real, tested, and reproduces the exact
numbers reported in the manuscript — nothing is a placeholder or a stand-in.
## Folder structure
```
green_finance_gap/
├── README.md ← this file
├── REAL_RUN_SUMMARY.md ← full honest write-up of every result, including the ones that changed across model versions
├── src/
│ ├── config.py single source of truth: sectors, years, paths, variable schema
│ ├── build_real_panel.py builds panel_real.csv and projects_real.csv from the raw PPI/WGI/WDI files
│ ├── panel_regression.py Beta regression — the primary cell-level model (Table 2)
│ ├── financing_gap_logit.py project-level logistic regression — the paper's strongest result (Table 3)
│ ├── robustness.py dominant-economy exclusion + lagged-covariate checks
│ ├── ml_model.py XGBoost + SHAP, bounded via logit transform (Figs. 1–4)
│ └── compute_kappa.py Cohen's kappa between two completed coding sheets
├── data/
│ ├── raw/
│ │ └── urbanization_level.xlsx the real WDI urbanization data pulled via DataBank
│ └── processed/
│ ├── panel_real.csv 212 country-sector-year cells — feeds panel_regression.py, robustness.py, ml_model.py
│ ├── projects_real.csv 356 classified projects — feeds financing_gap_logit.py
│ ├── validation_sample_raw.csv the 115-project stratified sample used for dual-coding
│ └── AUTOMATED_CLASSIFICATION.csv the codebook's automated calls — see note below
├── dual_coding_exercise/
│ ├── Classification_Codebook.docx the written rules both coders applied
│ ├── Coder_A_coding_sheet_completed.xlsx real, completed
│ ├── Coder_B_coding_sh …