Skip to content

Global-Policy-Lab/ma_klw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data anomalies and the economic commitment of climate change

Replication code for Nature Matters Arising (Bearpark, Hogan and Hsiang 2024)

Data requirements

Code

The replication code for this Matters Arising includes scripts written in Python (v. 3.11.9) and R (v. 4.4.1). Note that several files in this repository are modified versions of replication scripts in KLW https://zenodo.org/records/11064757. In particular, we modified code/feols_bootstrap_regressions_modified.R and project_damages_modified.py for our analysis.

The R scripts require the following packages:

pacman, tidyverse, fixest, marginaleffects, broom, arrow, haven, patchwork, glue, ggrepel

The Python scripts require the following packages:

pandas, numpy, scipy

The R packages will be installed automatically when the code is executed. The python packages can be installed using pip or conda.

To run the code:

  1. Download the replication files from the four above links, and save them into a folder on your machine.
  2. Edit the paths to the corresponding data and code directories in code/01_setup.R and code/project_damages_modified.R
  3. Run the code/run_analysis.sh bash script to execute R and Python scripts. Alternatively, manually execute the commands within this bash script directly in the command line.
  4. View outputs in the outputs folder.

Note that for 1000 bootstrap iterations, the code will take some time to run on a normal laptop. Code can be modified to reduce runtime by lowering the number of bootstrap iterations in code/run_analysis.sh.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •