Satellite Nightlight Data Extraction

The Rnightlights package extracts raster and zonal statistics from satellite nightlight rasters downloaded from the United States National Oceanic and Atmospheric Administration (<>) free data repositories. Both the DMSP-OLS annual and SNPP-VIIRS monthly nightlight raster data are supported. Satellite nightlight raster tiles are downloaded and cropped to the country boundaries using shapefiles from the GADM database of Global Administrative Areas (<>). Zonal statistics are then calculated at the lowest administrative boundary for the selected country and cached locally for future retrieval. Finally, a simple data explorer/browser is included that allows one to visualize the cached data e.g. graphing, mapping and clustering regional data.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.3 by Christopher Njuguna, a day ago

Report a bug at

Browse source code at

Authors: Christopher Njuguna [aut, cre, cph], Henrik Bengtsson [ctb] (data setup,, Black Guru [ctb] (gdal zonal,, Jeff Chen [ctb] (masq function,, Star Ying [ctb] (masq function,, Chris Elvidge [ctb] (information + masq function)

Documentation:   PDF Manual  

GPL-3 license

Imports cleangeo, compiler, data.table, doParallel, dplyr, foreach, gdalUtils, lubridate, methods, raster, readr, reshape2, rgdal, rgeos, R.utils, rvest, rworldmap, settings, sp, stats, stringr, utils, xml2

Suggests dendextend, ggdendro, ggplot2, leaflet, plotly, RColorBrewer, reshape, shiny, shinydashboard

System requirements: gdal wget curl aria2

See at CRAN