English · Français
Turning satellite night-time lights into evidence for Namibia — eight use cases for statistics and public policy: economic dynamics, regional growth, GDP nowcasting, shocks and resilience, inequality and electrification, industrial zones, seasonal tourism, urbanisation — with a public dashboard and an AI agent that answers only from the published figures.
https://ngolomaria11-stack.github.io/NTL_Namibia_Project/
Key figures of the run, 2014–2025. Each comes with its confidence level and method on the dashboard.
| Annual growth of light 2014–2025, robust slope (Theil–Sen) |
Last 12 months vs previous 12 seasonally adjusted series, up to 12/2025 |
Light–GDP elasticity 95% CI −0.48 to 4.17 · confidence low |
Gini of light per capita ADM2 units, 2025 |
| People in the dark 17% of the inhabited population, 2025 |
Share of the top region Erongo, 2025 |
Industrial clusters 18% of national light |
Tourist zones max. summer excess +17% (Otavi (Oshana)) |
| Lit area annual growth; population +1.7%/yr |

National seasonally adjusted monthly series — COVID-19. Trough: −2.9% (03/2021).
Each card opens the matching page of the live dashboard.
Bilingual (FR/EN), works offline-first from static files, light & dark themes, mobile-ready.
![]() | ![]() |
- Grounded. The agent only answers from the numbered facts exported with the dashboard (
agent_context.json, F01, F02…): the same facts in the notebook and on the website. - Cited. Every quantitative sentence cites its fact, e.g.
[F12]; citations link to the dashboard page they come from, and unknown citations are removed. - A real agent with six tools. It plans, calls tools by function calling and chains several steps: 🔎
search_facts, 🏆rank_units, 📍unit_profile, ⚖️compare_units, 📈make_chart(charts drawn in the conversation) and 🗺️map_action(it drives the dashboard map: year, swipe comparison, zoom, layers). Each step is shown; tool results are cited as[D2]. - Briefs in one click. Policy brief, country profile or parliamentary answer — structured, sourced, exportable as Markdown or PDF.
- Your choice of model. Groq (
openai/gpt-oss-120bby default), Google Gemini or a local Ollama model, with streamed answers; without any model, an offline planner runs the same tools. - Guard-rails. Read-only tools, at most five tool calls per question, data never treated as instructions (prompt-injection resistant), rate limiting.
- Keys stay with you. On the website, a visitor's API key stays in their own browser and is sent only to the chosen provider; in the notebook keys come from Colab Secrets. No key is ever published.
flowchart LR
A["🛰️ Satellites<br/>VIIRS · Black Marble<br/>Sentinel-5P · MODIS"]
A2["📚 Open data<br/>GHSL · WorldPop<br/>OSM · World Bank"]
B["🌍 Earth Engine<br/>zonal stats"]
C["📓 Notebook<br/>cleaning · STL<br/>econometrics"]
D["🧭 8 use<br/>cases"]
E["📦 Exports<br/>JSON · CSV<br/>GeoJSON · PNG"]
F["📊 Dashboard<br/>FR/EN"]
G["🤖 AI agent<br/>cited facts"]
H["🚀 GitHub<br/>Pages"]
A --> B
A2 --> B
B --> C --> D --> E
E --> F --> H
E --> G --> H
classDef green fill:#00704A,stroke:#00553A,color:#fff
classDef gold fill:#F5C242,stroke:#b8901f,color:#05080d
classDef blue fill:#3F7FC7,stroke:#2b5f99,color:#fff
class A,A2,B blue
class C,D,E green
class F,G,H gold
- Open the notebook in Colab — NTL_8_use_cases_EN.ipynb.
- Set the country — in section 2,
ISO3 = "TUN"(any ISO 3166-1 alpha-3 code) and the period;SYNTHETIC_TEST = Trueruns everything without Earth Engine. - Run all — Runtime → Run all. The dashboard is exported to
dashboard/and, withPUBLISH = True, published to GitHub Pages in one call.
Tip
Keys and tokens go in Colab Secrets (🔑 icon): GITHUB_TOKEN (fine-grained, this repository only: Contents, Pages — plus Administration to create the repository and set its description), and optionally GROQ_API_KEY or GEMINI_API_KEY. An Earth Engine Cloud project is needed for real countries.
| Dataset | Provider · Earth Engine ID | Used for | Reference |
|---|---|---|---|
| VIIRS VNL V2 (annual) | NOAA/EOG · NOAA/VIIRS/DNB/ANNUAL_V21, ANNUAL_V22 |
annual levels, maps, inequality | Elvidge, C. D. et al. (2021). Annual time series of global VIIRS nighttime lights. Remote Sensing 13(5). |
| VIIRS DNB monthly (VCMSLCFG) | NOAA/EOG · NOAA/VIIRS/DNB/MONTHLY_V1/VCMSLCFG |
monthly series, seasonality, shocks, tourism | Elvidge, C. D. et al. (2017). VIIRS night-time lights. Int. J. Remote Sensing 38(21). |
| Black Marble VNP46A2 (daily) | NASA · NASA/VIIRS/002/VNP46A2 |
daily shock index | Román, M. O. et al. (2018). NASA's Black Marble nighttime lights product suite. RSE 210. |
| DMSP-OLS / harmonised DMSP–VIIRS | NOAA NGDC · Li et al. (sat-io) | long series since 1992 (GDP elasticity) | Li, X. et al. (2020). A harmonized global nighttime light dataset 1992–2018. Scientific Data 7, 168. |
| GHSL R2023A (POP, SMOD, BUILT-S) | European Commission JRC · JRC/GHSL/P2023A/* |
population, urban/rural, non-residential built-up | Schiavina, M. et al. (2023); Pesaresi, M. et al. (2023). GHSL R2023A. JRC. |
| WorldPop | WorldPop · WorldPop/GP/100m/pop |
population (alternative) | WorldPop (2018). Global High Resolution Population Denominators. |
| Sentinel-5P TROPOMI NO₂ / SO₂ | ESA Copernicus · COPERNICUS/S5P/OFFL/L3_NO2, L3_SO2 |
activity cross-check, industrial signals | Veefkind, J. P. et al. (2012). TROPOMI on the ESA Sentinel-5 Precursor. RSE 120. |
| MODIS LST (MOD11A2) | NASA · MODIS/061/MOD11A2 |
surface heat of industrial sites | Wan, Z. (2014). New refinements and validation of the MODIS LST products. RSE 140. |
| OpenStreetMap | OpenStreetMap contributors · Overpass API | industrial-area reference list | © OpenStreetMap contributors, ODbL. |
| World Bank WDI | World Bank · NY.GDP.MKTP.KD, NV.IND.TOTL.KD, EG.ELC.ACCS.ZS… |
real GDP, industry value added, electricity access | World Bank (2026). World Development Indicators. |
| geoBoundaries / FAO GAUL | William & Mary geoLab · FAO | administrative boundaries | Runfola, D. et al. (2020). geoBoundaries. PLoS ONE 15(4). |
Full methodology: docs/methodology.md · quality report: docs/QUALITY.md.
- UN Fundamental Principles of Official Statistics — relevance, impartiality, professional standards, transparency of sources and methods, open access to the results.
- Data Quality Assessment Framework (DQAF) — integrity, methodological soundness, accuracy and reliability, serviceability, accessibility.
- GSBPM — every notebook section maps to a phase of the Generic Statistical Business Process Model.
- FAIR — findable (stable URLs, citation file), accessible (open formats), interoperable (CSV, JSON, GeoJSON), reusable (licence, provenance in
manifest.json). - Experimental statistics — night-light estimates complement, and never replace, official statistics; they are labelled experimental with their uncertainty.
| Use case | Status | Confidence | Validation |
|---|---|---|---|
| 📈 1 · Time dynamics | Experimental |
high | p-value = < 0.0001 |
| 🗺️ 2 · Regional growth and convergence | Experimental |
medium | Spearman ρ = -0.21 |
| 💹 3 · Light–GDP relationship | Experimental |
low | correlation / MAE (pp) = -0.55 / 3.6 |
| ⚡ 4 · Shocks and resilience | Experimental |
low | trough (main shock) = -2.9% — no |
| ⚖️ 5 · Inequality and electrification | Experimental |
medium | mean gap (pp) = 28.9 |
| 🏭 6 · Industrial zones | Experimental |
low | precision / recall / F1 = not available |
| 🏖️ 7 · Seasonal tourism | Experimental |
low | r = -0.13 |
| 🏙️ 8 · Urbanisation signals | Experimental |
high | Spearman ρ = 0.71 |
.
├── assets/ # images & animations generated from the data
├── dashboard/ # → the live site is on the gh-pages branch
├── docs/ # methodology and quality report (EN/FR)
├── .github/ # issue and pull-request templates
├── notebooks/ # the Colab notebook(s)
├── src/ # analysis package
├── src_fr/ # analysis package (French messages)
├── CHANGELOG.md # release notes
├── CITATION.cff # how to cite
├── CONTRIBUTING.md # how to contribute
├── LICENSE # MIT (code)
├── README.fr.md # French version
└── README.md # this page (English)
- Tokens and API keys are never written to disk, printed, logged, committed or published; publication uses the GitHub REST API with an in-memory token and redacts every error message.
- Use a fine-grained token limited to this repository, with an expiry date; revoke it when it is no longer needed.
- Every file is scanned for token patterns before each push; the publication is cancelled if one is found.
- The site is static (no server, no database); the AI assistant runs in the visitor's browser.
See CITATION.cff (GitHub shows a Cite this repository button), or:
@software{ntl_nam_2026,
author = {{African Development Bank} and {Data Innovation for Africa (DI4A)}},
title = {Night-time lights: eight use cases — Namibia — statistics & public policy, public dashboard and AI agent},
year = {2026},
version = {2.1.0},
url = {https://github.com/ngolomaria11-stack/NTL_Namibia_Project}
}© AfDB-DI4A (African Development Bank — Data Innovation for Africa). Any reuse of the results, maps, charts or images must state the source: “Source: AfDB-DI4A”. Code: MIT. Derived data and images follow the licence of each source dataset (for example, EOG VIIRS products, GHSL, WorldPop, geoBoundaries and World Bank WDI are distributed under CC BY 4.0, OpenStreetMap under ODbL) — see each source's licence before reuse.
Developed by the African Development Bank (AfDB) and Data Innovation for Africa (DI4A). Night-time lights by the Earth Observation Group (Payne Institute, Colorado School of Mines) and NASA Black Marble, processed with Google Earth Engine.
Generated by the notebook on 2026-11-03 · version 2.1.0 · ngolomaria11-stack/NTL_Namibia_Project
















