This repository stores all code related to the paper Oswald, 2024, Global convergence of incomes in a climate-constrained world (in preparation/review).
All relevant output figures for this paper are produced in Jupyter notebooks. These notebooks employ the classes that represent the actual model, which are Python files.
- country_class.py - Defines the country-specific attributes and behaviors.
- scenario_class.py - Handles the different scenarios for income convergence modeling.
- scenariosweeper_class.py - Necessary for 2-D trade-offs plots.
- plots_class.py - Contains methods for generating various plots.
- first_data_explorations.ipynb - Initial data checks and analysis, includes FIGURE 1.
- run_figure2.ipynb - Generates FIGURE 2.
- run_figure3.ipynb - Generates FIGURE 3.
- run_figure4.ipynb - Generates FIGURE 4.
- run_figure5.ipynb - Generates FIGURE 5.
- run_country_specifics Figures not included in paper or supplementary material but of relevance for country-specific analysis.
- clean_extend_pip_data.ipynb - Processes and extends initial data for modeling.
All necessary data files that are processed by the notebooks and model are in the folder data. There is only freely available data from the World Bank, the UN and processed data from IIASA SSP explorer. Please get in touch in case of issues loading the data or conflict of storing the data here.
1. https://pip.worldbank.org/ (originally downloaded dataset included)
2. https://tntcat.iiasa.ac.at/SspDb/dsd?Action=htmlpage&page=welcome (originally downloaded dataset NOT included)
3. https://population.un.org/wpp/ (originally downloaded dataset included)
To get started with the code, ensure you have the necessary dependencies installed. You can set up your environment using the provided requirements.txt
file.
pip install -r requirements.txt
Each Jupyter notebook is designed to be run independently. Ensure you have the model Python files in the same directory as the notebooks to avoid import errors. As well as the required data files.
-
Clone the repository:
git clone https://github.com/yannickoswald/global-convergence-incomes.git
-
Navigate to the repository:
cd global-convergence-incomes
-
Run the notebooks:
Open any of the Jupyter notebooks using Jupyter Lab or Jupyter Notebook interface.
jupyter lab
or
jupyter notebook
Reporting Issues
If you encounter any issues or have suggestions for improvements, please raise an issue on GitHub. To do so, follow these steps:
- Go to the repository's Issues page.
- Click on the "New Issue" button.
- Provide a descriptive title and detailed information about the issue.
- Click "Submit new issue" to create the issue.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contact