Skip to content

Yushgoel/Nightpy

Repository files navigation

Nightpy

Code for using VIIRS Night Light Data

Earth At Night - Credits Blue Marble Earth at Night in 2012

Jupyter notebooks

Concise_research.ipynb - Contains code for regression between Night Light and GDP (scroll to end). Picked 21 cities for regression and present results.

Download Data.ipynb - Contains code for downloading only the right Night Light data files. Need to create own account in portal for this.

Pipeline.ipynb - Contains code for running Night Light pipeline. Shows how to use helper functions for crude analysis.

Python Code

night_light_utils.py - Contains helper functions for simple manipulation of data. Check function comments for more details.

report_gen.py - Generate a report for analysis for chosen dates (modify dates in program) for city entered by user.

Organization

"Data" Folder - All Night Light Data downloaded is to be stored here for use by functions in code above.

"Renaming_data" Folder - When downloading data using Jupyter notebook, all files will be initially moved here. Once done downloading, run command "rename_data()" in python. This will rename files in appropriate format, and can be accessed based on dates chosen by user.

"Summaries" Folder - All summaries generated by report_gen.py are stored here.

"VNP46A1" Folder - This folder is required for programmatic downloading of data and handling the NASA API

"hegMACv2.15" Folder - This folder contains an executable file. This is an application for converting HDF5 files (file format in which data is downloaded) into geoTIFF files. Once converted to geoTIFF, these files can be overlayed on a map. Preferably, download Google Earth Pro, and overlay images there. Note that this executable was made on a Mac system, so you may have to reinstall it.