Nigeria Fuel Price & Global Oil Dashboard
# Nigeria Fuel Price & Global Oil Dashboard
An interactive GIS dashboard that visualizes the relationship between global oil prices and petrol prices across Nigerian states.
Built with Leaflet, Chart.js, and vanilla JavaScript. Fully static — no backend required.
---
## Live Data Sources
| Data | Source | Type |
|------|--------|------|
| Brent crude oil price | Alpha Vantage API | Live API (free key) |
| Nigeria state boundaries | geoBoundaries | Live fetch (CC-BY-4.0) |
| Petrol prices by state | NBS PMS Price Watch | Bundled CSV |
| Refinery locations | OpenStreetMap | Bundled GeoJSON |
| Basemap tiles | CARTO Dark Matter | Live tiles (OSM data) |
---
## Setup
### 1. Get a Free Alpha Vantage API Key
The dashboard fetches **live Brent crude oil prices** from the Alpha Vantage API.
1. Go to alphavantage.co
2. Fill in the form (name + email). No credit card needed.
3. Copy the API key you receive.
**Option A — Enter key in the browser:**
The dashboard will prompt you to paste your key on first load.
**Option B — Hardcode in config:**
Open `js/config.js` and replace:
```js
ALPHA_VANTAGE_API_KEY: 'YOUR_API_KEY_HERE',
```
with your actual key.
### 2. Updating Fuel Price Data
NBS does not offer a public API. The fuel prices in `data/fuel_prices.csv` are sourced from the NBS **PMS (Premium Motor Spirit) Price Watch** reports.
To update with the latest data:
1. Visit National Bureau of Statisti…
2. Download the latest PMS Price Watch report
3. Update `data/fuel_prices.csv` with the new state-level prices
4. Keep the same CSV format: `state,price_ngn,price_date,zone,source`
---
## Deployment on GitHub Pages
### Step 1: Create a GitHub Repository
1. Go to github.com
2. Name it `fuel-dashboard` (or any name)
3. Set it to **Public**
4. Click **Create repository**
### Step 2: Upload the Project Files
Upload the entire `fuel-dashboard/` folder contents to the repository. The file structure should be:
```
├── index …