Overview

You can download the replication package here (about 4GB). It is structured as follows:1

.
|- README.md
|- gict.tex
|- gict-appendix.tex
|- codes/
|  |- gict_01_initialize.m
|  |- gict_02_data.R
|  |- gict_03_simulations.m
|  |- gict_04_process.m
|  |- gict_05_maps_paper.R
|  |- inversions/
|  |- simulations/
|- input/
|- output/

where:

Besides, it also contains the README.html file.2

Reproducing the Paper

Replicating the paper consists of running sequentially the R and Matlab codes below:

Table 1. Overall sequence of replicating codes
Code Description WD line CPU hours
gict_01_initialize.m Exports raw data to be further processed 11 .1
gict_02_data.R Processes data from the previous step and produces further inputs 39 3
gict_03_simulations.m Runs all simulations sequentially 12 \(\sim\) 700
gict_04_process.m Reproduces plots, tables, and exports inputs for the maps 12 2
gict_05_maps_paper.R Renders all maps and compiles the manuscript 39 3

Refer to Appendix B below for further details.

Instructions and Computational Requirements

Make sure to set local working directory WD to the local package’s root, as indicated in Table 1.

The last replication reproduced the paper with the following hardware/software:

  • R version 4.2.0 (2022-04-22) and the following libraries: latex2exp (0.9.4), RColorBrewer (1.1-3), dplyr (1.0.9), readxl (1.4.0), xtable (1.8-4), Rfast (2.0.6), sf (1.0-12), data.table (1.14.2), ggplot2 (3.3.6), rgdal (1.5-30), raster (3.5-15), and sp (1.5-0).

  • Matlab version 9.9.0.1570001 (R2020b) Update 4 and Statistics and Machine Learning Toolbox Version 12.0 (R2020b)

  • 8-core iMac, MacOs 10.15.6, \(\sim\) 50GB of free disk space, and 16 GB of RAM.

The replication with these specifications requires about 720 hours (see Table 1).

Outcomes

The final outcome will be the paper in pdf format. All ouputs generated (e.g., figures and tables) are described in Appendix Table A1.3

Data Availability Statement

All data used in this paper is publicly available.4 They have been collected by the authors and are provided with this replication package in non-proprietary format (.csv, .shp). Their sources are stated in Table 2 below (see Appendix C for details):

Table 2. List of Data Sources
Data Name Data Files Location Citation
“Conte et al. (2021) data” C.csv; desert.csv; diffmult_reduced.mat; gaoi_with_data.rdata; grid_025_clipped_*.rdata; H0_areal.mat; index_gaoirows_matlab.csv; ksi.csv; l.csv; pop1.csv; T.mat; T0.csv; trmult_reduced_baseline.mat; ubar.csv; Y_A.csv; y.csv input/ Conte et al. (2021)
“Natural Earth data” ne_10m_lakes.rdata; ne_50m_admin_0_countries.* input/ Natural Earth (2018)
“Geoboundaries data” geoBoundariesCGAZ_ADM1.* input/ geoBoundariesCGAZ/ Runfola et al. (2020)
“World Bank data” GDPPC_PPP_WBDI.csv input/ World Bank (2015)

None of the paper used in this paper comes from experiments or any other personal data-sensitive data sources.

References and Data Citations

License

alt text here The replication package is under a CC-BY-NC license. Usage by commercial entities is allowed, reselling it is not.



Appendix


Appendix A - List of Figures and Tables

Table A1. List of Outcomes
Figure/Table Program Line Number5 Output file
Figure 1 (a) codes/gict_04_process.m 733 Figure1A.png
Figure 1 (b) codes/gict_04_process.m 707 Figure1B.png
Figure 2 (a) codes/gict_05_maps_paper.R 180 Figure2A.png
Figure 2 (b) codes/gict_05_maps_paper.R 273 Figure2B.png
Figure 2 (c) codes/gict_05_maps_paper.R 180 Figure2C.png
Figure 2 (d) codes/gict_05_maps_paper.R 273 Figure2D.png
Figure 3 (a) codes/gict_04_process.m 1508 Figure3A.png
Figure 3 (b) codes/gict_04_process.m 1541 Figure3B.png
Figure 4 (a) codes/gict_05_maps_paper.R 389 Figure4A.png
Figure 4 (b) codes/gict_05_maps_paper.R 389 Figure4B.png
Figure 4 (c) codes/gict_05_maps_paper.R 447 Figure4C.png
Figure 4 (d) codes/gict_05_maps_paper.R 331 Figure4D.png
Figure 5 codes/gict_05_maps_paper.R 505 Figure5.png
Figure 6 (a) codes/gict_04_process.m 733 Figure6A.png
Figure 6 (b) codes/gict_04_process.m 707 Figure6B.png
Figure 7 (a) codes/gict_05_maps_paper.R 644 Figure7A.png
Figure 7 (b) codes/gict_05_maps_paper.R 737 Figure7B.png
Figure 7 (c) codes/gict_05_maps_paper.R 644 Figure7C.png
Figure 7 (d) codes/gict_05_maps_paper.R 737 Figure7D.png
Figure 8 (a) codes/gict_04_process.m 1578 Figure8A.png
Figure 8 (b) codes/gict_04_process.m 1611 Figure8B.png
Figure 9 (a) codes/gict_04_process.m 1647 Figure9A.png
Figure 9 (b) codes/gict_04_process.m 1665 Figure9B.png
Figure 10 (a) codes/gict_05_maps_paper.R 853 Figure10A.png
Figure 10 (b) codes/gict_05_maps_paper.R 795 Figure10B.png
Figure 11 (a) codes/gict_04_process.m 2816 Figure11A.png
Figure 11 (b) codes/gict_04_process.m 2853 Figure11B.png
Figure 12 codes/gict_04_process.m 3290 Figure12.png
Figure 13 (a) codes/gict_05_maps_paper.R 1222 Figure13A.png
Figure 13 (b) codes/gict_05_maps_paper.R 1245 Figure13B.png
Figure 14 (a) codes/gict_04_process.m 3003 Figure14A.png
Figure 14 (b) codes/gict_04_process.m 3022 Figure14B.png
Figure 15 (a) codes/gict_04_process.m 775 Figure15A.png
Figure 15 (b) codes/gict_04_process.m 755 Figure15B.png
Figure 16 (a) codes/gict_05_maps_paper.R 644 Figure16A.png
Figure 16 (b) codes/gict_05_maps_paper.R 737 Figure16B.png
Figure 16 (c) codes/gict_05_maps_paper.R 644 Figure16C.png
Figure 16 (d) codes/gict_05_maps_paper.R 737 Figure16D.png
Figure 17 (a) codes/gict_04_process.m 1905 Figure17A.png
Figure 17 (b) codes/gict_04_process.m 1923 Figure17B.png
Figure 18 (a) codes/gict_05_maps_paper.R 853 Figure18A.png
Figure 18 (b) codes/gict_05_maps_paper.R 795 Figure18B.png
Figure B1 From Conte et al. (2021) - FigureB1.png
Figure C1 (a) codes/gict_05_maps_paper.R 983 FigureC1A.png
Figure C1 (b) codes/gict_05_maps_paper.R 1042 FigureC1B.png
Figure C2 (a) codes/gict_04_process.m 1951 FigureC2A.png
Figure C2 (b) codes/gict_04_process.m 1977 FigureC2B.png
Figure C2 (c) codes/gict_04_process.m 1977 FigureC2C.png
Figure C2 (d) codes/gict_04_process.m 2003 FigureC2D.png
Figure C3 (a) codes/gict_05_maps_paper.R 1103 FigureC3A.png
Figure C3 (b) codes/gict_05_maps_paper.R 1162 FigureC3B.png
Table C1A6 codes/gict_05_maps_paper.R 1405 table_eureb.tex
Table C1B codes/gict_05_maps_paper.R 1410 table_devreb.tex
Figure C4 (a) codes/gict_04_process.m 3583 FigureC4A.png
Figure C4 (b) codes/gict_04_process.m 3567 FigureC4B.png
Table D1 codes/gict_05_maps_paper.R 1395 table_noreb.tex
Table D2 codes/gict_05_maps_paper.R 1400 table_locreb.tex
Figure D1 (a) codes/gict_04_process.m 145 FigureD1A.png
Figure D1 (b) codes/gict_04_process.m 238 FigureD1B.png
Figure D2 (a) codes/gict_04_process.m 145 FigureD2A.png
Figure D2 (b) codes/gict_04_process.m 238 FigureD2B.png
Figure D3 (a) codes/gict_04_process.m 1542 FigureD3A.png
Figure D3 (b) codes/gict_04_process.m 1559 FigureD3B.png
Figure D4 codes/gict_05_maps_paper.R 540 FigureD4.png
Figure D5 (a) codes/gict_04_process.m 3554 FigureD5A.png
Figure D5 (b) codes/gict_04_process.m 3540 FigureD5B.png
Figure D6 (a) codes/gict_04_process.m 1597 FigureD6A.png
Figure D6 (b) codes/gict_04_process.m 1631 FigureD6B.png
Figure D7 codes/gict_05_maps_paper.R 914 FigureD7.png
Figure D8 (a) codes/gict_04_process.m 2845 FigureD8A.png
Figure D8 (b) codes/gict_04_process.m 2883 FigureD8B.png
Figure D9 (a) codes/gict_04_process.m 2845 FigureD9A.png
Figure D9 (b) codes/gict_04_process.m 2883 FigureD9B.png
Figure D9 (c) codes/gict_05_maps_paper.R 1372 FigureD9C.png
Figure D9 (d) codes/gict_05_maps_paper.R 1313 FigureD9D.png
Figure E1 (a) codes/gict_04_process.m 2903 FigureE1A.png
Figure E1 (b) codes/gict_04_process.m 2922 FigureE1B.png
Figure E1 (c) codes/gict_04_process.m 2941 FigureE1C.png
Figure E1 (d) codes/gict_04_process.m 2960 FigureE1D.png
Figure F1 (a) codes/gict_04_process.m 775 FigureF1A.png
Figure F1 (b) codes/gict_04_process.m 755 FigureF1B.png
Figure F2 (a) codes/gict_05_maps_paper.R 180 FigureF2A.png
Figure F2 (b) codes/gict_05_maps_paper.R 273 FigureF2B.png
Figure F2 (c) codes/gict_05_maps_paper.R 180 FigureF2C.png
Figure F2 (d) codes/gict_05_maps_paper.R 273 FigureF2D.png
Table F1 codes/gict_05_maps_paper.R 1415 table_noreb_USA.tex
Figure F3 codes/gict_05_maps_paper.R 505 FigureF3.png
Figure F4 (a) codes/gict_05_maps_paper.R 389 FigureF4A.png
Figure F4 (b) codes/gict_05_maps_paper.R 389 FigureF4B.png
Figure F4 (c) codes/gict_05_maps_paper.R 447 FigureF4C.png
Figure F4 (d) codes/gict_05_maps_paper.R 331 FigureF4D.png
Figure F5 (a) codes/gict_04_process.m 1842 FigureF5A.png
Figure F5 (b) codes/gict_04_process.m 1859 FigureF5B.png
Figure F5 (c) codes/gict_04_process.m 2941 FigureF5C.png
Figure F5 (d) codes/gict_04_process.m 2960 FigureF5D.png
Figure F6 codes/gict_05_maps_paper.R 914 FigureF6.png
Figure F7 (a) codes/gict_04_process.m 3661 FigureF7A.png
Figure F7 (b) codes/gict_04_process.m 3645 FigureF7B.png
Table F2 codes/gict_05_maps_paper.R 1420 table_locreb_USA.tex

Appendix B - Further Replication Details

Pre-processing data

The code gict_01_initialize.m exports raw inputs from Conte et al. (2021) y.csv, l.csv, and Y_A.csv in grid format to be loaded in R (e.g. Y_A_raw.csv).

Then, gict_02_data.R imports the raw input and corrects the grid cell-level agricultural output where it exceeds total GDP (i.e. it corrects some measurement error from Conte et al. (2021)).7 It also exports regional specific geographical indexes: 180x360 grids of dummies for cells in a certain region (e.g. input/index_eu26.csv stands for dummies of the countries at the European Union).

Simulations

gict_03_simulations.m sequentially runs all of the simulations of the paper (after setting the working directory in line 11). It calls the .m codes for each specific simulation, stored in the codes/ and codes/inversion/ folders. Among many, the following codes are called:

  • inversion.m: does the inversion for sectoral productivities and amenities as in Conte et al. (2021).
  • moving_costs.m: does the inversion for mobility costs and separates amenities from initial utility as in Conte et al. (2021).
  • theta_inversion.m: does the inversion for sectoral productivities and amenities as in Conte et al. (2021) for different values of \(\theta\) (trade elasticity).
  • theta_moving_costs.m: does the inversion for mobility costs separates amenities from initial utility as in Conte et al. (2021) for different values of \(\theta\) (trade elasticity).
  • omega_moving_costs.m: does the inversion for mobility costs separates amenities from initial utility as in Conte et al. (2021) for different values of \(\Omega\) (migration elasticity).
  • alpha_inversion.m: does the inversion for mobility costs separates amenities from initial utility as in Conte et al. (2021) for different values of \(\alpha_M\) (agglomeration forces for \(M\)).
  • alpha_moving_costs.m: does the inversion for mobility costs separates amenities from initial utility as in Conte et al. (2021) for different values of \(\alpha_M\) (agglomeration forces for \(M\)).
  • lambda_moving_costs.m: does the inversion for mobility costs separates amenities from initial utility as in Conte et al. (2021) for different values of \(\lambda\) (congestion forces).

Besides, the main simulation codes (stored in codes/) stand for:8

  • *reb/: simulations for each rebating scheme (i.e. noreb = simulation without rebating) for 100 periods and CO2 tax = 40USD/tCO2 starting in 2021. Stores the outputs in the output/ folder.
  • *reb_HS/: simulations for each rebating scheme and several CO2 tax values (0 to 65 USD/tCO2) for the hump-shaped (_HS) curves. It runs for 21 periods. Stores the outputs in the output/ folder.
  • locreb_HS_theta/: simulations with local rebating of CO2 taxes of different values (0 to 65 USD/tCO2) for the hump-shaped (_HS) curves. It runs for 21 periods for different values of \(\theta\) (the trade elasticity). Stores the outputs in the output/ folder.
  • locreb_HS_omega/: simulations with local rebating of CO2 taxes of different values (0 to 65 USD/tCO2) for the hump-shaped (_HS) curves. It runs for 21 periods for different values of \(\Omega\) (the migration elasticity). Stores the outputs in the output/ folder.
  • *reb*_USA/: simulations with local/no rebating of CO2 taxes adopted in the USA (e.g. noreb_HS_USA = hump-shaped simulations as above but for taxes set in the USA). Stores the outputs in the output/ folder.

Note that gict_03_simulations.m runs all the simulations sequentially, which makes it a time-consuming task (each individual simulation can take half a day to run on a rather powerfull CPU).

To address that, each simulation folder in codes/ contains also a .sh shell code that can be run individually in high-performance computers (e.g. be submitted as a job in a server-like computer/cluster). By launching each of them individually in such a computer/cluster allows one to reproduce all results in in parallel. Importantly, before that one would need to run all of the codes of the codes/inversion/ folder explained above (e.g. inversion.m).

Processing the results

The codes gict_04_process.m and gict_05_maps_paper.R process all of the simulation results and report them as documented in the paper. In particular, gict_04_process.m:

  1. Exports all results in the R grid format to be used as inputs for the maps.
  2. Plots the evolution of region-sectoral output over time with/out CO2 taxes for several rebating schemes (like Figure 2).
  3. Reproduces the tables with the aggregate/regional effects of CO2 taxes for all rebating schemes (like Table 1).
  4. Reproduces the plots of regional effects of CO2 taxes with respect to different tax values (like Figure 4).
  5. Calculates and plots the effects of CO2 taxes on emissions and temperature with different rebating schemes (Figures 6 and 18).

Then, gict_05_maps_paper.R:

  1. Reproduces the maps of the paper using some of the outputs from gict_04_process.m.
  2. Adjusts the layout of the .tex tables to fit the paper’ layout.
  3. Renders the final .pdf using the gict.tex and gict_appendix.tex latex sources.

Appendix C - Inputs and Data Details

  • gict.tex: .tex source of the manuscript.
  • gict_appendix.tex: .tex source of the online appendix
  • gict.bib: .bib source of academic references.
  • input/H0_areal.mat: 180x360 grid with fraction of land per cell.
  • input/C.csv: 180x360 grid of the country indices per cell. From Desmet et al. (2018).
  • input/desert.csv: 180x360 grid of desert dummies. From Desmet et al. (2018).
  • input/l.csv and input/pop1.csv: 180x360 grids of the population level (number of people per cell) in the data for years 2000 and 20011, respectively. From Desmet et al. (2018).
  • input/y.csv: 180x360 grid of cell level GDP (in PPP) for 2000 divided by cell population. From Desmet et al. (2018).
  • input/Y_A.csv: 180x360 gird of cell level agricultural GDP (in PPP) for 2000 produced by Conte et al. (2021);
  • input/ubar.csv: 180x360 grid of subjective utility measure for each country, based on the Cantril ladder (Deaton and Stone, 2013). From Desmet et al. (2018).
  • input/trmult_reduced_baseline.mat: matrix of bilateral trade costs across land cells to the power -theta (trade elasticity). From Desmet et al. (2018).
  • input/diffmult_reduced.mat: matrix of technology diffusion across cells with positive mass of land. From Conte et al. (2021).
  • input/T0.csv and * input/T.mat: 180x360 grid of initial temperatures in 2000 and the evolution of local temperatures throughout the 21st century. From Conte et al. (2021).
  • input/ksi.csv: 180x360 grid of downscalling parameters \(\xi(r)\) estimated in Conte et al. (2021).
  • input/GDPPC_PPP_WBDI.csv: data table with country GDP (in PPP) in 2020 from the World Bank Development Indicators.
  • input/ne_50m_admin_0_countries.*: files that compose the world’s shapefile (used to render the maps).
  • input/ne_10m_lakes.rdata: shapefile of lakes in the world (used to render maps).
  • input/gaoi_with_data.rdata: spatial grid in Rdata format. From Conte et al. (2021).
  • input/grid_025_clipped_intersected.rdata: spatial grid at .25 x .25 degree clipped and intersected with the country shapes (used to render the maps).
  • codes/inversions/gict_functions.R: loads several functions used in the main R replication codes.
  • output/figures/FigureB1.pdf: Figure 3.a from Conte et al. (2021) that is reproduced in the paper (as FigureB1).

  1. The HTML version of this package can be accessed at (https://brunoconteleite.github.io/about/GICT_README.html).↩︎

  2. The structure of this replication package benefitted from the “README for social science replication packages” (https://social-science-data-editors.github.io/template_README/), to whom we are very thankful.↩︎

  3. Importantly, depending on the versions of R and the .tex compiler, the resolution of the figures in the final pdf can be smaller/larger than the one in the submitted manuscript. If that is the case, one needs to adjust the scale parameter in the \includegraphics[] command that insert the figures in the texts.↩︎

  4. We certify to have legitimate access to and permission to use the data used in this manuscript and to have documented permission to redistribute/publish the data contained within this replication package.↩︎

  5. The lines stated here refer to where the output (figure or table) is initially generated, which often is done in loops (thus the same line nuber for multiple figures). Those loops save figures/tables with names different than what stated in the table; for that, codes/gict_05_maps_paper.m (lines 1424-1686) adjusts each of these outputs’ names to the ones stated in the table. ↩︎

  6. Note that all tables are previsouly generated in codes/gict_04_process.m (lines 1187-1269) and stored as temporary .tex tables. The codes/lines stated in here refer to the codes that process them to the final format used in the manuscript.↩︎

  7. In particular, it assigns to those cells the average of the relative agricultural GDP of the neighboring cells of the same country.↩︎

  8. Note that all simulations whose name does not include _USA stand for exercises where carbon is taxed in the EU.↩︎