Replication Data and Code for “Structural Transformation and Export Competitiveness in Africa and Asia: Evidence from Interpretable Machine Learning”

Published: 11 June 2026| Version 1 | DOI: 10.17632/zwtdvzb85k.1
Contributors:
Spencer Dawson-Amoah,
,

Description

This dataset supports the study titled “Structural Transformation and Export Competitiveness in Africa and Asia: Evidence from Interpretable Machine Learning.” The study examines how sectoral transformation, labour reallocation, digital readiness, infrastructure, foreign direct investment, income capacity, and labour-force scale predict export competitiveness across African and Asian economies. The repository contains the processed analytical dataset and Python code used for the empirical analysis. The data cover 123 economies from Africa and Asia over the period 1985 to 2024, producing a balanced country-year panel of 4,920 observations. The outcome variable is exports of goods and services as a percentage of GDP, used as the export competitiveness benchmark. The modelling predictors include industry value added, services value added, agriculture value added, employment in industry, employment in services, employment in agriculture, internet use, access to electricity, foreign direct investment inflows, GDP per capita, and total labour force. Country, continent, subregion, and year are retained for descriptive interpretation but excluded from the supervised modelling features. The accompanying Python notebook reproduces the full analysis. It compares linear regression, ridge regression, random forest, and gradient boosting models using train-test validation and five-fold cross-validation. Model performance is assessed with R-squared, mean absolute error, and root mean squared error. The notebook also generates permutation feature importance for the best-performing model, principal component analysis, and K-means clustering to identify structural export-profile groups. The files are shared to support transparency, replication, and further research on structural transformation, labour reallocation, export competitiveness, and machine learning applications 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_03_Structural_Transformation_Exports.ipynb in Jupyter Notebook, JupyterLab, VS Code, or Google Colab. Place the Excel file named Topic_03_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 cleaned Africa and Asia country-year panel. It prepares the outcome variable, exports of goods and services as a percentage of GDP. It prepares the eleven predictors used in the supervised models. It estimates linear regression, ridge regression, random forest, and gradient boosting models. It evaluates the models using train-test validation and five-fold cross-validation. It reports R-squared, mean absolute error, and root mean squared error. It generates interpretation outputs, including permutation feature importance, principal component analysis, and K-means clustering. Tables, figures, and model outputs are saved in the output folder created by the notebook

Institutions

Categories

Economics, Machine Learning

Licence