Replication Data and Code for “Urban Services, Health Systems, and Under-Five Mortality Risk in Africa: A Machine Learning Classification Approach”

Published: 11 June 2026| Version 1 | DOI: 10.17632/bz4xfzm8jz.1
Contributors:
,

Description

This dataset supports the study titled “Urban Services, Health Systems, and Under-Five Mortality Risk in Africa: A Machine Learning Classification Approach.” The study examines whether urban services, health-system indicators, education, income, infrastructure, and preventive health measures classify under-five mortality risk across African economies. The repository contains the processed country-year dataset and Python code used for the empirical analysis. The data cover 54 African countries from 1985 to 2024, producing a balanced panel of 2,160 observations. The outcome variable is the under-five mortality rate per 1,000 live births, converted into a binary risk label using the sample median. Country-year observations above the median are coded as high-risk, while observations at or below the median are coded as low-risk. The modelling predictors include urban population share, urban population growth, basic sanitation services, basic drinking water services, access to electricity, current health expenditure per capita, DPT immunization, measles immunization, GDP per capita, and primary completion rate. Maternal mortality ratio is excluded from the final model because it is a parallel mortality outcome rather than an upstream service or system indicator. The accompanying Python notebook reproduces the full analysis. It estimates logistic regression, random forest, Extra Trees, and gradient boosting classifiers. Model performance is assessed using stratified random validation and temporal validation, where models are trained on 1985 to 2014 and tested on 2015 to 2024. The notebook reports accuracy, precision, recall, F1-score, ROC-AUC, and PR-AUC. It also generates permutation importance, ROC curves, service-risk profiles, and country-level clustering results. The files are shared to support transparency, replication, and further research on child mortality risk, urban health resilience, health systems, sanitation, immunization, and machine learning applications in African development research. The data were drawn from public development indicators and processed for the purpose of this study

Files

Steps to reproduce

Download all repository files into one working folder. Open the Python notebook named Topic_06_Urban_Health_Resilience.ipynb in Jupyter Notebook, JupyterLab, VS Code, or Google Colab. Place the Excel file named Topic_06_data.xlsx in the same folder as the notebook. If the Excel file has a different name, update the DATA_FILE line in the notebook. Install the required Python packages before running the notebook: pandas, numpy, matplotlib, scikit-learn, openpyxl. Run the notebook cells from top to bottom without skipping any cell. The notebook first loads the processed African country-year panel. It prepares the under-five mortality rate per 1,000 live births as the main outcome. It creates the binary under-five mortality risk label using the sample median. It prepares the ten retained predictors covering urbanization, sanitation, drinking water, electricity, health expenditure, immunization, income, and education. It excludes maternal mortality ratio from the final feature set to avoid conceptual overlap. It estimates logistic regression, random forest, Extra Trees, and gradient boosting classifiers. It evaluates the models using stratified random validation and temporal validation. It reports accuracy, precision, recall, F1-score, ROC-AUC, and PR-AUC. It generates interpretation outputs, including permutation importance, ROC curves, and country-level service-risk clustering. Tables, figures, and model outputs are saved in the output folder created by the notebook.

Institutions

Categories

Machine Learning, Urban Analysis

Licence