# NigeriaWatts — Electricity Demand Forecasting
A full-stack time-series forecasting system for Nigeria's national electricity grid. Two machine learning models — **Prophet** and **LSTM** — are trained on 5 years of daily demand data, served via a REST API, and displayed on an interactive analytics dashboard designed to tell the story behind Nigeria's power crisis.
> **Live Demo:** [Add your Streamlit Cloud URL here]
> **API Endpoint:** [Add your Render URL here]
---
## The Problem
Nigeria is Africa's largest economy — yet its national grid delivers an average of just **~4 GW** of power to 220 million people. London alone consumes more. The country loses an estimated **$29 billion annually** to unreliable power. Businesses run generators 8–10 hours a day. Hospitals risk lives during outages.
Accurate demand forecasting helps grid operators, investors, and policy makers allocate generation capacity, reduce waste, and plan infrastructure ahead of high-risk periods.
---
## What This Project Does
- Trains a **Prophet model** (Meta's time-series decomposition framework) on daily Nigeria grid demand data
- Trains an **LSTM neural network** (deep learning, sequential pattern recognition) on the same data
- Compares both models on a 90-day holdout set across MAE, RMSE, and MAPE
- Serves real-time forecasts via a **FastAPI** REST backend
- Displays everything on a **Streamlit dashboard** with full editorial context — not just charts, but the story behind the data
---
## Model Results
| Model | MAE | RMSE | MAPE | Verdict |
|---|---|---|---|---|
| **Prophet** | 144.58 MW | 297.35 MW | 4.69% | ✅ Winner |
| LSTM | 340.52 MW | 444.66 MW | 9.98% | — |
**Why Prophet wins:** With 5 years of daily data, Prophet's structured decomposition of trend, weekly cycles, and Nigerian public holidays outperforms LSTM's sequential learning. LSTM typically gains an edge with hourly data or datasets 10× larger where deep sequential p …