faviolc's picture
Update README.md
b89e425 verified
|
Raw
History Blame Contribute Delete
21.5 kB
metadata
license: cc-by-4.0
pretty_name: Selected Black Marble Project

Black Marble Project: Daily VIIRS Nighttime Lights for selected countries

The Black Marble Project: Daily VIIRS Nighttime Lights for selected countries is an open dataset repository for daily nighttime lights panels built from NASA Black Marble VIIRS VNP46A2 products and aggregated to subnational administrative units.

This repository is the public data layer of the project. It stores figures, metadata, final Parquet outputs, diagnostics, and documentation for country-level daily nighttime lights panels.

The current public country collections are Peru1793, Bolivia339, Indonesia514, and Ukraine1769. Country-level administrative units, boundary sources, and redistribution policy are summarized in the Countries and boundary policy section below.

The long-term goal is to provide research-ready daily nighttime lights datasets for spatial analysis, local economic monitoring, environmental research, disaster and shock analysis, and interactive visualization of subnational development patterns.


Project objective

This project converts daily NASA Black Marble VIIRS nighttime lights data into administrative-level daily panels.

The repository has four main objectives:

  1. Publish daily administrative nighttime lights panels for Peru, Bolivia, Indonesia, Ukraine, and future countries.
  2. Provide lightweight files for interactive applications, especially administrative-unit time series such as districts, municipalities, and hromadas.
  3. Document data sources, boundary sources, code dependencies, and limitations in a transparent way.
  4. Create a citable public data product for research and teaching.

This repository does not store raw NASA rasters. It stores processed administrative-level outputs derived from NASA Black Marble data.


Main remote sensing source

The primary remote sensing product is:

NASA Black Marble VNP46A2
VIIRS/NPP Gap-Filled Lunar BRDF-Adjusted Nighttime Lights Daily L3 Global 500m product

The main variable used in the project is:

Gap_Filled_DNB_BRDF-Corrected_NTL

This variable is aggregated from raster pixels to administrative polygons using zonal statistics.

Typical output variables include:

Variable Description
mean Mean nighttime lights value within the administrative unit
median Median nighttime lights value
sum Sum of nighttime lights values
std Standard deviation
min Minimum value
max Maximum value
count Number of pixels considered
count_valid Number of valid pixels
count_positive Number of positive-light pixels

Additional columns may be included depending on the country, version, and processing stage.


Countries and boundary policy

The administrative boundaries used in this project differ by country.

Country Administrative unit Number of units Boundary source Geometry redistribution
Peru Districts 1,793 INEI 1993 district boundaries Available
Bolivia Municipalities 339 QuaRCS project Not redistributed
Indonesia Districts 514 QuaRCS project Not redistributed
Ukraine ADM3 hromadas 1,769 OCHA/HDX COD-AB Ukraine Not redistributed

This repository redistributes a simplified map only for Peru1793. The Peru district map is included because it is part of the maintainer's thesis-related research workflow.

For Bolivia339, Indonesia514, and Ukraine1769, administrative boundary geometries are not redistributed in this repository. These countries only include processed nighttime lights outputs, figures, diagnostics, and metadata needed to interpret the administrative units.

Users who need the original geometries should consult the corresponding external boundary sources listed in the References section.


Repository structure

The repository is organized by country.

BlackMarbleLeivaProject/
│
├── README.md
├── REFERENCES.md
├── catalog.yml
│
├── Peru1793/
│   ├── figures/
│   ├── maps/
│   ├── metadata/
│   ├── yearly parquets/
│   ├── regional parquets/
│   └── diagnostics/
│
├── Bolivia339/
│   ├── figures/
│   ├── metadata/
│   ├── yearly parquets/
│   ├── regional parquets/
│   └── diagnostics/
│
├── Indonesia514/
│   ├── figures/
│   ├── metadata/
│   ├── yearly parquets/
│   ├── regional parquets/
│   └── diagnostics/
│
└── Ukraine1769/
    ├── figures/
    ├── metadata/
    ├── yearly parquets/
    ├── regional parquets/
    └── diagnostics/

The repository is being populated progressively. Some folders may appear before the corresponding data products are fully uploaded.

The maps/ folder is currently reserved for Peru1793 only.


File types

1. Figures

Each country includes precomputed figures for quick inspection, documentation, and interactive applications.

Examples:

Bolivia339/figures/BoliviaBMln1000plus1.png
Indonesia514/figures/IndonesiaBMln1000plus1.png
Peru1793/figures/PeruBMln1000plus1.png
Ukraine1769/figures/UkraineBMln1000plus1.png

2. Yearly Parquet files

Yearly Parquet files are the main public research outputs. Each file contains all administrative units and all valid daily observations for one calendar year.

Examples:

Peru1793/yearly parquets/peru1793_daily_vnp46a2_year_2012.parquet
Bolivia339/yearly parquets/bolivia339_daily_vnp46a2_year_2012.parquet
Indonesia514/yearly parquets/indonesia514_daily_vnp46a2_year_2012.parquet
Ukraine1769/yearly parquets/ukraine1769_daily_vnp46a2_year_2012.parquet

3. Regional Parquet files

Regional Parquet files are lighter files designed for interactive applications and regional downloads. They avoid loading a full country-level panel when the user only needs one first-level administrative region.

Examples:

Peru1793/regional parquets/
Bolivia339/regional parquets/
Indonesia514/regional parquets/
Ukraine1769/regional parquets/

4. Metadata and diagnostics

Each country should include metadata and diagnostic files such as:

metadata/
├── units.parquet
├── country_mean.parquet
├── country_summary.json
├── boundary_source.md
├── code_source.md
└── variable_dictionary.csv

diagnostics/
├── coverage_summary.csv
├── missingness_summary.csv
└── validation_notes.md

Monthly files may be used internally during production for checkpointing and quality control, but they are not necessarily the main public distribution format.


Code access and notebooks

The public data outputs are stored in this Hugging Face repository.

The full construction workflow may depend on private repositories, authenticated APIs, Google Colab notebooks, external boundary repositories, and temporary processing files not stored in this repository.

Country-specific notebook links are provided in the References section for transparency and documentation. Not all notebooks are guaranteed to be fully executable without the corresponding access credentials or external source repositories.

For the Peru workflow, some notebooks may read source files from private repositories controlled by the maintainer.

For Bolivia and Indonesia, the workflows may read administrative boundaries from QuaRCS project repositories. For Ukraine, the workflow may depend on the OCHA/HDX COD-AB Ukraine source.

The public outputs are documented and citable even when the construction workflow requires additional access.


Recommended usage

Load one yearly file

import pandas as pd

path = "hf://datasets/faviolc/BlackMarbleLeivaProject/Bolivia339/yearly parquets/bolivia339_daily_vnp46a2_year_2012.parquet"

df = pd.read_parquet(path)

print(df.head())

Load one regional file

import pandas as pd

path = "hf://datasets/faviolc/BlackMarbleLeivaProject/Bolivia339/regional parquets/bolivia339_daily_vnp46a2_admin1_example.parquet"

df = pd.read_parquet(path)

print(df.head())

Load metadata

import pandas as pd

path = "hf://datasets/faviolc/BlackMarbleLeivaProject/Bolivia339/metadata/units.parquet"

units = pd.read_parquet(path)

print(units.head())

Methodological summary

The workflow follows these general steps:

  1. Define the country and administrative boundaries.
  2. Load the daily NASA Black Marble VNP46A2 product.
  3. Select the nighttime lights variable.
  4. Process rasters over the country extent.
  5. Aggregate raster pixels to administrative polygons.
  6. Build yearly public Parquet files.
  7. Validate coverage, missingness, and outliers.
  8. Export regional Parquet files for lighter access.
  9. Generate figures, diagnostics, and metadata.
  10. Publish final outputs to Hugging Face.

Known limitations

Users should interpret the data with care. Nighttime lights products may be affected by:

  • cloud contamination,
  • snow or surface reflectance issues,
  • lunar illumination correction limits,
  • auroras and atmospheric effects,
  • sensor noise,
  • fires, gas flaring, fishing fleets, or temporary light sources,
  • administrative boundary inconsistencies,
  • missing or low-quality observations,
  • extreme outliers or artifacts in specific dates.

The datasets are research-ready outputs, but they should not be interpreted as direct measurements of income, population, electricity consumption, or economic activity without additional validation.

For Ukraine1769, administrative units follow the ADM3 hromada layer from the external OCHA/HDX COD-AB Ukraine boundary source used in the construction workflow. The use of these boundaries is for spatial aggregation and statistical reporting only. It does not imply any political position by the maintainer regarding territorial status, control, sovereignty, or recognition.


Citation

If you use this dataset, please cite:

  1. this Hugging Face dataset repository,
  2. NASA Black Marble VNP46A2,
  3. the Black Marble product-suite reference,
  4. BlackMarblePy, if you use or reproduce the workflow,
  5. the corresponding administrative boundary source for the country used.

Full suggested citations and country-specific citation examples are provided in the References section below.


License and disclaimer

This dataset repository is released under the Creative Commons Attribution 4.0 International License.

You are free to share and adapt the processed data, provided that appropriate credit is given.

Administrative boundary source files may be subject to their own source terms. Users should check the source-specific documentation before redistributing boundary geometries.

This repository is an independent research project. It is not an official NASA, World Bank, INEI, QuaRCS, OCHA, HDX, or government product.

NASA Black Marble data are the original remote sensing source. This repository provides processed administrative-level outputs derived from those data.

Administrative boundary sources are documented for transparency. Redistribution of boundary geometries depends on the corresponding source terms.


AI usage disclosure

Generative AI tools were used in developing this repository and its data analysis pipelines. OpenAI's ChatGPT assisted with planning, methodological discussion, code review, debugging, documentation, drafting, and editing. OpenAI Codex was also used to support code generation, refactoring, and implementation of selected components of the data processing and application workflows.

The author reviewed, modified, tested, and validated all AI-assisted code and text. The author made all primary architectural, methodological, empirical, and interpretive decisions.

The author takes full responsibility for the accuracy, integrity, and final content of this repository.


Contact

Maintainer:

Favio Leiva

For questions, suggestions, or collaboration, please use the Hugging Face community tab or contact the maintainer through the associated project channels.

References

This section documents the main data sources, software tools, administrative boundary sources, and suggested citations for the Black Marble Leiva Project.


Dataset repository

Suggested citation:

@misc{leiva2026blackmarble,
  author       = {Leiva, Favio},
  title        = {Black Marble Project: Daily VIIRS Nighttime Lights for selected countries},
  year         = {2026},
  publisher    = {Hugging Face Dataset Repository},
  howpublished = {\url{https://huggingface.co/datasets/faviolc/BlackMarbleLeivaProject}}
}

Repository:

https://huggingface.co/datasets/faviolc/BlackMarbleLeivaProject

NASA Black Marble VNP46A2

Primary remote sensing product:

NASA VIIRS Land Science Investigator-Led Processing System. VIIRS/NPP Gap-Filled Lunar BRDF-Adjusted Nighttime Lights Daily L3 Global 15 arc-second Linear Lat Lon Grid V2 (VNP46A2). NASA LAADS DAAC.

Product page:

https://ladsweb.modaps.eosdis.nasa.gov/missions-and-measurements/products/VNP46A2/

Data.gov catalog page:

https://catalog.data.gov/dataset/viirs-npp-gap-filled-lunar-brdf-adjusted-nighttime-lights-daily-l3-global-500m-linear-lat-

NASA Black Marble product-suite reference

Suggested academic reference:

Román, M. O., Wang, Z., Shrestha, R., Yao, T., Kalb, V., Miller, S. D., ... & Masuoka, E. J. (2018). NASA's Black Marble nighttime lights product suite. Remote Sensing of Environment, 210, 113–143. https://doi.org/10.1016/j.rse.2018.03.017

BlackMarblePy

The construction workflow uses or is inspired by BlackMarblePy, a Python package for retrieving and processing NASA Black Marble nighttime lights data.

Suggested citation:

Vicente, Gabriel Stefanini, and Robert Marty. BlackMarblePy: Georeferenced Rasters and Statistics of Nightlights from NASA Black Marble. 2023. https://doi.org/10.5281/zenodo.10667907

Project documentation:

https://worldbank.github.io/blackmarblepy/

GitHub repository:

https://github.com/worldbank/blackmarblepy

Administrative boundary sources

This section provides suggested citations and source notes for the administrative boundary sources used in each country workflow.


Peru boundary source

Suggested citation:

Instituto Nacional de Estadística e Informática (INEI). Censos Nacionales 1993: IX de Población y IV de Vivienda. District administrative boundary file for Peru. Boundary data facilitated by INEI to Favio Sergio Leiva Cárdenas for research use.

Source note:

The Peru administrative boundaries used in this project correspond to the district map associated with the 1993 Peruvian census. The file was facilitated by the Instituto Nacional de Estadística e Informática (INEI) to the project maintainer for research use.

Bolivia boundary source

Suggested citation template:

Mendez, C., Gonzales, E., Leoni, P., Andersen, L., Peralta, H. (2026). DS4Bolivia: A Data Science Repository to Study GeoSpatial Development in Bolivia [Data set]. GitHub. https://github.com/quarcs-lab/ds4bolivia

Source note:

The Bolivia administrative boundaries used in the construction workflow come from the QuaRCS project. The original geometries are not redistributed in this repository by default. This repository preserves compatible municipal identifiers and metadata needed to interpret the processed nighttime lights outputs.

Indonesia boundary source

Suggested citation template:

Mendez, C., Abdulah, R., Arvianto, B., & Leiva, F. (2026). Indonesia514: A Data Science Repository to Study Regional Development in Indonesia. GitHub. https://github.com/quarcs-lab/indonesia514

Source note:

The Indonesia administrative boundaries used in the construction workflow come from the QuaRCS project. The original geometries are not redistributed in this repository by default. This repository preserves compatible district identifiers and metadata needed to interpret the processed nighttime lights outputs.

Ukraine1769 boundary source

Suggested citation template:

United Nations Office for the Coordination of Humanitarian Affairs (OCHA). (2026). Ukraine - Subnational Administrative Boundaries. Humanitarian Data Exchange (HDX). https://data.humdata.org/dataset/cod-ab-ukr

Source note:

Ukraine1769 uses the ADM3 hromada layer from the OCHA/HDX Common Operational Dataset for Ukraine administrative boundaries. The original Ukraine boundary geometries are not redistributed in this repository. The repository only preserves compatible administrative identifiers, names, metadata, diagnostics, and processed nighttime lights outputs.

Code and notebook sources

The public outputs in this Hugging Face repository were generated using country-specific notebooks.

Some notebooks may depend on private repositories, authenticated APIs, or external source repositories. Therefore, the notebooks are provided for transparency and documentation, but not all of them are guaranteed to be fully executable without the corresponding access credentials.

Spaghetti plots

Compilation notebooks

One-day high-quality visualization notebooks


Recommended citation practice

When using one country dataset, cite the common sources and the country-specific boundary source.

Example: Peru

Please cite:
1. Leiva, Favio. Black Marble Leiva Project.
2. NASA Black Marble VNP46A2.
3. Román et al. (2018), NASA's Black Marble nighttime lights product suite.
4. Vicente and Marty (2023), BlackMarblePy, if reproducing the workflow.
5. INEI 1993 district boundary source.

Example: Bolivia

Please cite:
1. Leiva, Favio. Black Marble Leiva Project.
2. NASA Black Marble VNP46A2.
3. Román et al. (2018), NASA's Black Marble nighttime lights product suite.
4. Vicente and Marty (2023), BlackMarblePy, if reproducing the workflow.
5. QuaRCS Bolivia boundary product.

Example: Indonesia

Please cite:
1. Leiva, Favio. Black Marble Leiva Project.
2. NASA Black Marble VNP46A2.
3. Román et al. (2018), NASA's Black Marble nighttime lights product suite.
4. Vicente and Marty (2023), BlackMarblePy, if reproducing the workflow.
5. QuaRCS Indonesia boundary product.

Example: Ukraine

Please cite:
1. Leiva, Favio. Black Marble Leiva Project.
2. NASA Black Marble VNP46A2.
3. Román et al. (2018), NASA's Black Marble nighttime lights product suite.
4. Vicente and Marty (2023), BlackMarblePy, if reproducing the workflow.
5. OCHA/HDX COD-AB Ukraine administrative boundary source.