Monitoring Economies from Space Using Nighttime Lights

This material was jointly developed by the DECDI ieConnect team and the Development Data Group’s Development Data Partnership team as an introduction to using nighttime lights for economic analysis.

1 Course Motivation

Nighttime lights have become a widely used data sources, including in the social sciencies literature. Henderson, Storeygard, and Weil’s seminal 2012 paper illustrated the use of leveraging nighttime lights to measure economic growth. They compared the nighttime lights between North Korea and South Korea and showed that lights can be proxy for economic growth.

Their paper helped launch the use of nighttime lights in a variety of applications; a Google scholar search of “nighttime lights economics” brings over 40,000 responses. In addition to leverage nighttime lights as a proxy for economic activity, nighttime lights has been used for various applications such as tracking urbanization and examining impacts of natural disasters, conflict, and infrastructure improvements.

Within the World Bank and other multilateral development banks, staff have used nighttime lights data in estimating subnational GDP in countries like Kenya and Rwanda, in mapping electric grid infrastructure, measuring quarterly economic growth and poverty mapping.

In the recent years, DECDI and the DECDG Development Data Partnership (formerly known as the Data Lab) have supported teams working on international development challenges with nighttime lights analytics, especially in post disaster contexts. This work includes Turkiye Earthquake Monitoring, Gaza Conflict Impact Analysis and Sudan Conflict Impact Analysis. This course is meant to empower staff to be able to query nightlight data themselves.

2 Course Description

This course provides an overview of using nighttime lights data, with a focus for economic applications. It covers the different sources of nighttime lights, how to query and aggregate data, and addressing data quality with nighttime lights (e.g., cloud cover). The course focuses on NASA Black Marble data, using the BlackMarbleR (for R) and BlackMarblePy (for Python) packages for querying data.

2.1 Day 1: Applications and Limitations of Nighttime Lights for International Development (

In this session, participants will learn about:

• History of Nighttime Lights (NTL): Evolution and significance of satellite-based light data. • Key Nightlight Data Products (DMSP and VIIRS) : Differences in temporal and spatial coverage, data sources, as well as data processing methods. • Use Cases in Economics & Social Sciences: Applications inside and outside the World Bank, along with common limitations of NTL. • Practical Access: How to retrieve and work with Nighttime Lights data using existing World Bank packages. The target audience for Day 1 includes TTLs, economists and senior specialists in economic monitoring teams, disaster needs assessment teams and urban planning teams.

2.2 Day 2: Hands-On Tutorial on Analyzing Nightlights with BlackMarbleR.

Hands On Session Link: Training Recording

This session will provide hands-on training on querying and analyzing nighttime lights data using VIIRS NTL data from BlackMarble. Participants will learn to use BlackMarbleR to extract, process and analyse NTL data. In this session participants will learn to:

• Understand the BlackMarbleR Package • Extract Nightlight Raster Data • Create Maps of Raster Data • Conduct Zonal Statistics on the Raster Data • Exclude/Include Gas Flaring Locations • Analyze Nightlight Data post disaster

2.3 Prerequisites

The course assumes familiarity with R or Python. For an introduction to these programming languages, see the DIME Analytics R training and the DIME Analytics and DECID Python training.

3 Training Content

3.1 Interactive Tutorial

📚 NEW: Interactive Shiny Tutorial - Learn BlackMarble data analysis through hands-on exercises!

To run the interactive tutorial:

  1. Install required packages:

    source("install_packages.R")
  2. Launch the tutorial:

    source("launch_tutorial.R")

The interactive tutorial includes: - Progressive learning modules - Interactive code exercises - Quizzes to test understanding - Real-time feedback - Hands-on BlackMarble data analysis

3.2 Static Training Materials

  1. Introduction to Spatial Analysis [R | Python coming later!]: Overview of working with vector and raster spatial data in R.
  2. Nighttime Lights for Economic Analysis [PPT]: Overview of nighttime light datasets and use of nighttime lights for economic and social science analysis.
  3. Nighttime Lights Analysis in R [R | Python coming later!]: Provides of overview of querying and analyzing nighttime lights data in R.

3.3 NTL Country Diagnostic

In addition to providing training content, this repository contains code to quickly (1) produce nighttime lights data for any country (at the ADM0 - ADM3 level, and at the city level) and (2) produces analysis of nighttime lights (e.g., trends and maps). This code file is intended as a start to nighttime lights analysis for a country; the code can then be adapt for further analysis.

For more information, see here.

3.4 Additional Resources

Spatial analysis in R * Spatial Data Science with R and “terra” * Spatial Statistics for Data Science: Theory and Practice with R

Nighttime lights * World Bank Open Nighttime Lights tutorial * Spatial Edge: Downloading and processing Black Marble nightlights data in R * Blog about BlackMarbleR/Py

World Bank Data Partnership examples using nighttime lights * Syria Economic Monitor * Lebanon Economic Monitor