Package to analyse VIIRS nighttime lights
Author xKDR
13 Stars
Updated Last
1 Year Ago
Started In
June 2021


stable dev Build Status Build Status codecov

National Oceanic and Atmospheric Administration (NOAA) releases nighttime lights images produced using the Visible Infrared Imaging Radiometer Suite (VIIRS) since April 2012. Nighttime lights data had emerged as a useful tool to measure economic activity. Many researchers have established a correlation between prosperity and the brightness of a region. In many situations, nighttime lights generates measures with accuracy, latency and geographical resolution that are superior to conventional methods of measurement, such as GDP.

Using nighttime lights for economic analysis require cleaning of data and aggregating measurements of pixels over regions of interest. This package provides functions to clean nighttime lights data and well as some other niche functions used by reseachers in this field.

This package was a foundation for a research paper, "But clouds got in my way: bias and bias correction of VIIRS nighttime lights data in the presence of clouds". This paper diagnoses a source of bias in the data and responds to this problem with a bias correction scheme. Along with other mainstream methods of data cleaning, this method is also implemented in the package. A detailed description of the functions of the package used for data cleaning is in the paper "Foundations for nighttime lights data analysis".

This package is build on top of Rasters.jl. Nighttime lights tif/nc files can be read using Rasters.Raster().

To install:

 add NighttimeLights

Basic usage

using Rasters
using NighttimeLights

radiance = Raster("")
ncfobs = Raster("")

clean_complete(radiance, ncfobs)

Citing NighttimeLights.jl

To cite NighttimeLights.jl, please reference the paper. Sample Bibtex is given below:

  title={Foundations for nighttime lights data analysis},
  author={Patnaik, Ayush and Shah, Ajay and Thomas, Susan and others},


We gratefully acknowledge the JuliaLab at MIT for financial support for this project.