The model that is able to predict the demand of electricity per Distribution companies or zone in Nigeria
# Nigeria Electricity Demand Predictor
Predicts zonal electricity demand for Nigeria's power distribution
companies, and gives national-level context on demand, generation,
grid loss, and household access to electricity.
## Problem Context
Nigeria's power grid faces chronic gaps between generation and demand, high
transmission losses, and uneven household access to electricity
across regions. Grid operators and Discos need reliable short-term demand
forecasts to plan generation dispatch, reduce load-shedding, and manage grid
stability. This project builds a regional demand forecasting pipeline covering
three major distribution company zones: EKEDC/IKEDC (Lagos), IBEDC (Ibadan), and AEDC (Abuja).
## What's in this repo
| File | Purpose |
|---|---|
| `nigeria_electricity_demand.py` | End-to-end pipeline: data preparation, data exploration, feature engineering, model training, and evaluation |
| `app.py` | Streamlit app that loads the trained models and does live predictions |
| `requirements.txt` | Python dependencies |
| `models/` | Trained model bundles (`.joblib`) and generated data exploration outputs |
| `README.md` | This file |
## Data Sources
- **Global Electricity Demand and Generation Dataset** — national-level demand/generation (TWh) by country and year
- **World Bank indicators** — electricity access rate (% of population) and transmission/distribution losses (%)
- **Nigeria Electricity Data** (Excel) — household-level electricity access by state
- **Zonal power consumption dataset** (`powerconsumption.csv`) — 10-minute interval consumption readings with weather covariates, used for the regional short-term forecasting models
## Pipeline Overview
1. **Data preparation** — merged national demand/generation figures with grid loss and access-rate data by year; disaggregates the most recent national net-delivered energy figure down to each Disco zone, weighted by that zone's share of households with electricity access.
2. **Feature engineering** — buil …