METHODS

We acknowledge the NASA ARSET Program's help in getting this project started. Thanks to their module entitled "Introduction to NASA’s "Black Marble" Night Lights Data," we were able to meaningfully explore NASA satellite data even without prior experience with Black Marble data.

Below we outline the steps we took to create our visualizations. This entire project was done in Python within a Jupyter notebook environment. In line with open science principles, we used only publicly available data and free tools for this whole project.

01 Downloading

From NASA's LAADS DAAC, we downloaded the VNP46A2 daily nighttime lights product which contains near real-time highly-corrected nighttime imagery of the globe at 500-meter resolution. We acquired imagery of Eastern Visayas which was contained within one tile, H30V07. To cover the pre- and post-disaster periods, we downloaded data from one week before Yolanda (1 November 2013) to roughly six months after the disaster (1 May 2014). 

02 Preprocessing

The nighttime lights data for each day comes in an HDF5 file containing various data fields (see the Black Marble User Guide for more info). For this project, we only analyze the data from the field called "Gap Filled BRDF corrected DNB NTL" as this has already been corrected for various light contaminations such as moonlight, cloud cover, snow, and so on. Using a sample function from NASA's hdfeos.org, we then map each pixel to its corresponding longitude and latitude. 

We then "draw" administrative (provincial and municipal) boundaries on the satellite imagery using shape files from the Philippine Statistics Authority and the National Mapping and Resource Information Authority. By drawing precise boundaries, we can quantitatively determine the nighttime lights radiance (or "brightness") of a particular municipality.

03 Calculating radiance

Radiance per pixel
In Black Marble imagery, each pixel is a 500-meter square with a given absolute radiance. To calculate the total radiance for a municipality, we first "smooth" the data. Instead of taking the raw per-pixel radiance, we calculate a new per-pixel radiance using a 3-by-3 moving window. This means that, for every pixel, we take a 3-by-3 window around it and the mean radiance of the 8 surrounding pixels becomes the new per-pixel radiance. 

Aggregate radiance
To calculate the aggregate radiance of a particular municipality, we simply add the radiance over all the pixels within that municipality's boundary.

Absolute and relative radiance

Our main task is to calculate the radiance over time of each municipality in Eastern Visayas. We calculate two types of radiance: absolute and relative radiance. Absolute radiance is the "brightness" as measured by the VIIRS instrument after it has gone through the smoothing described above. This is useful for comparing different municipalities with each other. 

Meanwhile, relative radiance is the radiance relative to pre-disaster levels. For example, Tacloban City at 9% relative radiance means that it is only 9% as bright as it was before Yolanda. This measure is useful for comparing the radiance of a municipality at different points in time.

04 Visualizing data

To visualize data, we used matplotlib ("A Quick Look"), plotly ("A Closer Look") and deck.gl ("Visualizing Recovery"). 

Follow along

 GITHUB 

To follow along our entire process, visit our Github repository.