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


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: – This script produces cleans and concatenates the socioeconomic and demographic data by county for states included in the analysis. – 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. –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. – Produces the difference-in-differences results found in Table 1. – Merges data on the cost of each storm to FEMA with the previously cleaned socioeconomic and demographic data and nighttime light data. – 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. – 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. – 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. – This script creates SI figures 1-7, maps of the areas defined by each of the treatment variables. – Script that creates SI figures 8-14, showing the trend in the treatment and control groups on yearly and monthly granularity.


Files (74.4 kB)

Name Size Download all
6.3 kB Download
1.9 kB Download
3.6 kB Download
5.8 kB Download
1.4 kB Download
2.1 kB Download
3.0 kB Download
16.5 kB Download
3.4 kB Download
27.5 kB Download
2.8 kB Download