Skip to content

About

Night-time lights — Namibia: 8 use cases for statistics & public policy, public dashboard and AI agent (AfDB × DI4A)

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

English · Français

Night-time lights: eight use cases — Namibia

Flag — Namibia
Namibia · 2014–2025

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.

Open the live dashboard Open in Colab MIT FR | EN VIIRS AI agent updated

Open the live dashboard  Run the notebook in Colab

https://ngolomaria11-stack.github.io/NTL_Namibia_Project/

✨ At a glance

Key figures of the run, 2014–2025. Each comes with its confidence level and method on the dashboard.

+5.6%

Annual growth of light
2014–2025, robust slope (Theil–Sen)

−1.6%

Last 12 months vs previous 12
seasonally adjusted series, up to 12/2025

1.85

Light–GDP elasticity
95% CI −0.48 to 4.17 · confidence low

0.44

Gini of light per capita
ADM2 units, 2025

11k

People in the dark
17% of the inhabited population, 2025

17%

Share of the top region
Erongo, 2025

45

Industrial clusters
18% of national light

4

Tourist zones
max. summer excess +17% (Otavi (Oshana))

+11.0%

Lit area
annual growth; population +1.7%/yr

⚡ A shock, seen from space

National seasonally adjusted monthly series — COVID-19. Trough: −2.9% (03/2021).
National seasonally adjusted monthly series — COVID-19. Trough: −2.9% (03/2021).

🧭 Eight use cases

Each card opens the matching page of the live dashboard.

Use case 1 — Time dynamics

📈 1 · Time dynamics

Question — Is activity accelerating or slowing down, net of seasonality?

Finding — Between 2014 and 2025, night-time light in Namibia changed by +5.6% per year (95% CI: +4.1% to +6.4%). Over the last 12 months, the seasonally adjusted level is -1.6% relative to the previous 12 months.

Open the page →

🗺️ 2 · Regional growth and convergence

Question — Which regions take off, which fall behind?

Finding — Of 103 ADM2 units, 87 show significant growth, 16 are stagnating and 0 are declining. Light remains concentrated: Erongo accounts for 17% of national light.

Open the page →

Use case 3 — Light–GDP relationship

💹 3 · Light–GDP relationship

Question — Can growth be estimated before its release, and regional GDP?

Finding — The elasticity of light with respect to real GDP is 1.85 in levels (95% CI: −0.48 to 4.17, R² = 0.22, 12 years) and −0.24 in growth rates (CI: −0.82 to 0.33).

Open the page →

Use case 4 — Shocks and resilience

⚡ 4 · Shocks and resilience

Question — How deep was a shock, and how fast the recovery?

Finding — The most pronounced shock in the seasonally adjusted series is “COVID-19”: trough of -2.9% (03/2021), return to the pre-shock level after 13 months.

Open the page →

⚖️ 5 · Inequality and electrification

Question — Where do people without electricity live?

Finding — The Gini coefficient of light per capita (ADM2) is 0.44 in 2025 (significant decrease since 2014). About 0.01 million people live in inhabited areas with no detectable light (17% of the inhabited population).

Open the page →

Use case 6 — Industrial zones

🏭 6 · Industrial zones

Question — Where is industry, and is its activity growing?

Finding — 45 industrial clusters detected from concordant satellite signals: 10 heavy industry, 10 business parks & logistics, 8 oil & gas sites and 17 isolated sites to verify. They emit 17.8% of national light (latest year); their light changes by +2.0% per year.

Open the page →

🏖️ 7 · Seasonal tourism

Question — Which areas live from tourism, and how does the season evolve?

Finding — 4 of 103 units show a net summer light excess of at least 10%: Otavi (Oshana), Ongenga (Ohangwena), Aminius (Ohangwena), Tsumkwe (Kunene). The median net excess reaches +17% in the most touristic zone.

Open the page →

🏙️ 8 · Urbanisation signals

Question — Where do cities spread, where do villages get electrified, and where does population grow without light?

Finding — National lit area: +11.0% per year; population: +1.7% per year. Classes (ADM2): Electrified urbanisation 86, Balanced growth 7, Unlit growth 7, Stable or declining 3.

Open the page →

🤖 AI agent

Ask the results in plain language — every number is cited.

Open the page →

📊 The dashboard

Bilingual (FR/EN), works offline-first from static files, light & dark themes, mobile-ready.

The dashboardmobile
Screenshots (9)
overview
#overview
map
#map
time
#time
regions
#regions
shocks
#shocks
inequality
#inequality
industry
#industry
tourism
#tourism
urban
#urban

🤖 The AI agent

  • 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-120b by 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.

🛠️ How it works

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
Loading

🚀 Quick start

  1. Open the notebook in Colab — NTL_8_use_cases_EN.ipynb.
  2. Set the country — in section 2, ISO3 = "TUN" (any ISO 3166-1 alpha-3 code) and the period; SYNTHETIC_TEST = True runs everything without Earth Engine.
  3. Run all — Runtime → Run all. The dashboard is exported to dashboard/ and, with PUBLISH = 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.

🛰️ Data sources

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).

📐 Methodology & quality standards

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

🗂️ Repository structure

.
├── 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)

🔐 Security

  • 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.

📝 How to cite

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}
}

⚖️ License

© 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.

🙏 Acknowledgements

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

About

Night-time lights — Namibia: 8 use cases for statistics & public policy, public dashboard and AI agent (AfDB × DI4A)

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages