Published October 24, 2022 | Version v1
Journal article Open

Codes for the publication: Nighttime light data reveal lack of full recovery after hurricanes in Southern US

  • 1. Potsdam Institute for Climate Impact Research, Potsdam, Germany; Technische Universität, Berlin, Germany
  • 2. Potsdam Institute for Climate Impact Research, Potsdam, Germany; Mercator Research Institute on Global Commons and Climate Change, Berlin, Germany

Description

This repository contains core codes underlying the analyses and figures for: “Southern US demonstrates lack of full recovery after hurricanes even at long time scales”.

The following provides a brief description of the codes included. The analysis relies on the following scripts, in relevant order:

demo_econ_codes.py – This script produces cleans and concatenates the socioeconomic and demographic data by county for states included in the analysis.

make_geo.py – Run independently for each storm, this script downsamples the gridded nighttime light data and produces a geographic bound for each hurricane as a shape file.

linearizer.py –The counties included in each hurricane's shapefile are matched with data on those counties having received aid from FEMA and the type of aid. A time series of nighttime light levels on the yearly scale is produced. Again, run independently for each storm.

light_ols_did.py – Produces the difference-in-differences results found in Table 1.

finaldf_maker.py – Merges data on the cost of each storm to FEMA with the previously cleaned socioeconomic and demographic data and nighttime light data.

loo_maps.py – This script calculates the difference-in-difference model iteratively, leaving out each county in the analysis to create the ‘leave-one-out’ estimation. It then plots these values on the maps presented in Figure 2.

betatime_grapher.py – This script creates Figure 1 and Supplementary Figure 15 by bounding the dataset iteratively by one month, and recalculating the difference-in-differences model for each new cutoff.

shap_multitimelines_CLASS.py – This script builds several tree models and calculates the SHAP feature importance scoring on top of the best performing. It also creates Figure 3, and Supplementary Material Figures 16 through 18. 

treatment_maps.py – This script creates SI figures 1-7, maps of the areas defined by each of the treatment variables.

common_trend_graphs.py – Script that creates SI figures 8-14, showing the trend in the treatment and control groups on yearly and monthly granularity.

Files

Files (74.4 kB)

Name Size Download all
md5:93733eaea54dc40a8a5faf453e96ff51
6.3 kB Download
md5:e054261323c2d8c850f67ab5805ee30a
1.9 kB Download
md5:ecc5a23194989382b16d95aa557ade99
3.6 kB Download
md5:567a89ea719e9cac90562abc9b5f5fa6
5.8 kB Download
md5:0fe1805582322074903ae1c1d7de17ba
1.4 kB Download
md5:ba94f1b87b0ef118c3b24805ad0d930e
2.1 kB Download
md5:1f0e4a76da83f5bc36bc67a566f48720
3.0 kB Download
md5:96918d19aae223b1224f896f85df7037
16.5 kB Download
md5:41541a0bc5eba003fdc4bd4813158f97
3.4 kB Download
md5:eb7599c58d6ea38aa2a60718f750014b
27.5 kB Download
md5:e13f9a94e3c8077b52a7274608cfd1ee
2.8 kB Download