Institutional thresholds in the climate and food availability nexus in South Asia
Description
This dataset contains the Python code used in the article “Institutional Thresholds in the Climate and Food Availability Nexus in South Asia” (iScience). The analysis covers eight South Asian countries (Afghanistan, Bangladesh, Bhutan, India, Maldives, Nepal, Pakistan and Sri Lanka) from 1995 to 2023. The code constructs an institutional quality index from six Worldwide Governance Indicators using a nonlinear autoencoder and compares it with a principal component analysis index. It then estimates generalised additive models of food availability (per capita dietary energy supply, kcal per capita per day), with smooth terms for climate vulnerability, precipitation anomalies, agricultural land use, population growth, per capita GDP, trade openness and institutional quality. Tensor-product interactions with institutional quality identify the institutional thresholds. Robustness is assessed with quantile-based additive models and a two-stage residual inclusion test for endogeneity. The code reproduces Tables 1–6 and Figures 1–3 of the article. The input data come from publicly available sources: FAOSTAT Food Balances, the Notre Dame Global Adaptation Initiative, Our World in Data, the World Bank World Development Indicators and the Worldwide Governance Indicators.
Files
Steps to reproduce
Install Python 3 and the packages numpy, pandas, scipy, scikit-learn, statsmodels, pygam, matplotlib and openpyxl. Place the input data file (final.xlsx) in the working folder and set DATA_PATH in food_final.py to its location. Run food_final.py. Tables are written to Tables_1_to_6.xlsx and figures to the output folder.