jdingel/lights_to_cities

Created Dec 24, 2020 · View the jdingel/lights_to_cities repository page

R code implementing the Dingel-Miscio-Davis algorithm to construct metropolitan areas by aggregating finer geographic units on the basis of contiguous areas of light in nighttime satellite images

Want this for your repo?

Render a free sample of any GitHub repo in seconds.

Visualize your own →

Contributors

2

Lines of Code

18

From

May 25, 2019

To

Jun 29, 2019

About jdingel/lights_to_cities

This R package implements an algorithm for identifying metropolitan areas by analyzing patterns of nighttime light in satellite imagery. The method aggregates smaller geographic units—such as townships or counties—into larger metropolitan regions based on contiguous areas of artificial light detected from space. The approach was introduced in a peer-reviewed journal article by Dingel, Miscio, and Davis and provides a data-driven alternative to administratively defined city boundaries.

The repository includes a complete working example using Chinese townships from 2000, demonstrating how the algorithm can delineate metropolitan areas across an entire country. Users can adapt the code to different geographic regions and time periods by modifying a configuration file and providing an appropriate shapefile for their area of interest. The implementation relies on standard spatial analysis libraries in R and downloads nighttime satellite imagery from NOAA automatically.

The project is designed for research applications in urban economics and economic geography, particularly in developing economies where administrative city definitions may not align with actual economic patterns. The authors provide automation through makefiles to streamline the download of satellite data and execution of the analysis, with support for both local computation and submission to high-performance computing clusters using the Slurm workload manager.

Share this video