Replication Data and Code for “Supply Chain Readiness and Export Competitiveness in Africa: Evidence from Interpretable Machine Learning”
Description
This dataset supports the study titled “Supply Chain Readiness and Export Competitiveness in Africa: Evidence from Interpretable Machine Learning.” The study examines whether supply-chain readiness predicts export competitiveness across African economies after removing Trade (% of GDP), an aggregate variable that includes exports and creates an accounting-overlap concern. The repository contains the processed country-year dataset and Python code used for the empirical analysis. The data cover 54 African economies from 1985 to 2024, producing a balanced panel of 2,160 observations. Export competitiveness is measured as exports of goods and services as a percentage of GDP. The modelling predictors include imports as a percentage of GDP, internet users, mobile subscriptions, electricity access, industry value added, services value added, foreign direct investment net inflows, population density, GDP per capita, and current account balance. Trade (% of GDP) is documented but excluded from the modelling feature set because it mechanically contains exports. The accompanying Python notebook reproduces the full analysis. It estimates linear regression, ridge regression, Random Forest, Extra Trees, and Gradient Boosting models. Model performance is assessed using random validation and temporal validation. The notebook reports mean absolute error, root mean squared error, and R-squared. It also generates permutation importance, feature response curves, subregional prediction errors, principal component analysis, and K-means clustering for export-readiness regime profiling. The files are shared to support transparency, replication, and further research on supply-chain readiness, export competitiveness, African subregions, temporal validation, and interpretable machine learning in development economics. 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_05_Supply_Chain_Export_Competitiveness.ipynb in Jupyter Notebook, JupyterLab, VS Code, or Google Colab. Place the Excel file named Topic_05_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 outcome variable, exports of goods and services as a percentage of GDP. It prepares the ten supply-chain readiness predictors used in the refined model. It excludes Trade (% of GDP) from the modelling feature set to avoid accounting overlap. It estimates linear regression, ridge regression, Random Forest, Extra Trees, and Gradient Boosting models. It evaluates model performance using random validation and temporal validation. It reports mean absolute error, root mean squared error, and R-squared. It generates interpretation outputs, including permutation importance, feature response curves, subregional error diagnostics, principal component analysis, and K-means clustering. Tables, figures, and model outputs are saved in the output folder created by the notebook.
Institutions
- University of Cape CoastCentral, Cape Coast