A public, open-access, multi-page web product for exploring Nigeria's oil spill and gas flare records. It is built with Next.js App Router, TypeScript, Leaflet and Recharts.
- Copy
.env.exampleto.env.localif you want to set the canonical site URL or enable the data assistant with an OpenRouter API key. - Run
npm install. - Run
npm run sync:datato refresh and validate all public source snapshots. - Run
npm run devand openhttp://localhost:3000.
For a production-like local run, use npm start. It starts the site and refreshes the public source snapshots immediately, then once per minute in the background. If one source fails, the last successful snapshot stays available and that source is marked degraded. GitHub Actions refreshes the checked-in snapshots every 10 minutes and pushes changes so a Git-connected Vercel project can redeploy them.
The bottom-right assistant answers only from the public NOSDRA and Nigeria Gas Flare Tracker snapshots. Add OPENROUTER_API_KEY from OpenRouter to .env.local and restart the app to enable its language model. It uses OpenRouter's openrouter/free router, checks source records through dedicated data tools, keeps missing values as “not supplied,” and does not make predictions or unsupported environmental conclusions.
The checked-in data/snapshots directory is a last-known-good fallback. Live retrieval and observation recency are shown separately throughout the interface.
IndexNow is configured for Bing and other participating search engines. The verification key is publicly available at /ff555e0637c84d7fb9d9e80b9739481c.txt, and the refresh workflow submits the main canonical pages after each data refresh. IndexNow does not replace Google Search Console submission.
npm run lintnpm run typechecknpm testnpm run build
/api/spills/api/spills/[id]/api/flares?area=state&period=2026-05/api/geo?layer=states/api/search?q=Bayelsa/api/export?dataset=spills&year=2026/api/source-health
- Nigeria only; valid offshore records remain visible.
- The primary and mirror spill endpoints are the same dataset and are not double-counted.
- Missing or invalid values are never assumed to be zero.
- State, LGA, cluster, oil block and onshore/offshore aggregations remain distinct.
- Company flare analytics are historical and stop at October 2020.
- Population values, where used, retain the source label “estimated population living within 2 km of flare locations.”