q12·beginner
Is light pollution / electrification changing in this region?
urbaninfrastructurebiodiversityenergy Datasets: 4 5–20 min
▶ Find the data for your area
Draw a rectangle to pick your area of interest, then see what NASA data covers it (live, here in your browser) or download a ready-to-run notebook with your AOI pre-filled. The notebook runs in any Python environment — it needs a free Earthdata Login to fetch the data.
Current AOI:
75.5, 18.5 → 76.5, 19.5 (Rural Maharashtra)On this page
Is light pollution / electrification changing in this region?
What you can answer
- Urban expansion through expanding bright-pixel footprint
- Electrification of rural areas (a lit pixel where there wasn’t one before)
- Power outages after natural disasters (the canonical Black Marble use case — Puerto Rico after Hurricane Maria 2017)
- Light-pollution intensity as a biodiversity proxy
- Industrial activity through gas flaring (fossil-fuel infrastructure)
What you can NOT answer with these alone
- Source of light (residential vs industrial vs flare) without ancillary data
- Real-time outages finer than VIIRS revisit (~12-hr) — use commercial systems for sub-hourly
- Light spectrum / blue-light pollution — VIIRS DNB is broadband panchromatic
Code template
import earthaccess
import xarray as xr
import numpy as np
earthaccess.login(strategy="netrc")
# AOI: rural Maharashtra
aoi = (75.5, 18.5, 76.5, 19.5)
# 1. Black Marble VNP46A2 (BRDF-corrected daily)
bmarble = earthaccess.search_data(short_name="VNP46A2", bounding_box=aoi,
temporal=("2012-04-01", "2025-12-31"))
# Open as xarray; extract Gap_Filled_DNB_BRDF-Corrected_NTL
# Mask: NTL > 5 nW/cm²/sr considered "lit"
# 2. Annual median composite (reduces moon-phase + cloud contamination)
# Group by year, compute median per pixel
# Count "lit" pixels per year → electrification timeline
# 3. Disaster outage check (illustrative — use Hurricane Maria scenario)
# Compare median Sep 2017 vs Sep 2016 over Puerto Rico
# Difference map → outage spatial pattern
# 4. Plot:
# - Animated map (or before/after) for chosen years
# - Time-series of total lit pixel area
Expected output
- Before/after maps: e.g., 2014 vs 2024 nighttime-lights composite over your AOI
- Time-series: total “lit area” (km²) per year
- Outage map: difference between disaster-month and prior-month for events like Maria/Ian/Otis
Caveats
- Use VNP46A2 (gap-filled, BRDF-corrected) for analysis, NOT raw VNP46A1
- Moon-phase contamination is removed in VNP46A2 but check the QF flag
- Snow + ice in winter at high latitudes can look like sudden new “lights” — mask by season
- Gas flares are extremely bright; can saturate detectors and dominate pixel statistics in oilfield regions
- DMSP-OLS heritage record (1992-2013) has intercomparison issues with VIIRS; don’t naïvely concatenate — use intercalibrated harmonized products if you need pre-2012
Cross-DAAC composition
LAADS DAAC + Black Marble portal (NASA Goddard) — single auth via Earthdata Login.
Sources
- Black Marble: https://blackmarble.gsfc.nasa.gov/
- VNP46A2 product: https://ladsweb.modaps.eosdis.nasa.gov/missions-and-measurements/products/VNP46A2/
- Black Marble after-Maria study: https://earthobservatory.nasa.gov/images/91047/puerto-rico-power-outage
⚲ How a scientist answers this
Parameters
Nighttime-light radiance (nW/cm2/sr) from Black Marble VNP46A2 (BRDF/atmosphere/moonlight-corrected VIIRS Day-Night-Band, ~500 m, daily), using the Gap_Filled_DNB_BRDF-Corrected_NTL layer with its Mandatory_Quality_Flag; for the long view, splice DMSP-OLS (1992-2013, intercalibrated) ahead of the VIIRS era. A pixel is counted 'lit' above a small radiance threshold (commonly ~1-5 nW/cm2/sr, set per region to clear sensor noise and stray light).
Method
Build annual or monthly median composites (median suppresses moonlit, cloudy, and snow-contaminated nights), then either count lit pixels and sum radiance per year for an electrification/expansion timeline, or fit an area-weighted Theil-Sen slope with a Mann-Kendall test per pixel for a robust lit-area or brightness trend; for outages, difference a clean post-event composite against a matched pre-event baseline period.
Validation
Use only high-quality (Mandatory_Quality_Flag) retrievals and report the lit-pixel threshold and composite window; cross-check against population/grid data or the canonical Puerto-Rico-after-Maria case, and beware of DMSP-to-VIIRS calibration jumps, saturation in bright cores, and gas-flare false positives.
In plain EnglishTake the moon- and cloud-corrected nightlight images, average each year, and count how many places are lit and how bright they are to see where electricity is spreading, dimming, or knocked out by a disaster.
Make it yours → Edit the notebook's bounding box, year range, and the 'lit' radiance threshold, and switch between annual-median trends and pre/post differencing for outages.
⌨ Run the core method · no login
The robust trend (Theil–Sen + Mann–Kendall) at the heart of this question — runnable on synthetic data, right here. The full earthaccess code template further down does it on real NASA data (needs an Earthdata login).