An outage-pressure estimation framework for Rwanda's electricity grid, combining real REG interruption notices, real historical weather, and a simulated citizen-report signal in a Hidden Markov Model (HMM).
Demo video: (https://youtu.be/qNnO3FboTwQ)
Status: ML pipeline implemented and evaluated. Backend, frontend, and database scaffolding are in place for the next phase (citizen reporting + REG dashboard).
Rwanda averages 8.3 power disruptions/month (3.4 hrs each — World Bank, 2022), managed through a reactive hotline with no systematic outage record or risk-prioritisation tool for REG technicians.
A 4-state Gaussian HMM infers a hidden "outage-pressure" state per district-day from weather and (currently simulated) crowd-report signals — without seeing REG notices directly — and is benchmarked against weather/crowd threshold rules, logistic regression, and random forest.
| Model | Balanced Accuracy | Recall | Precision |
|---|---|---|---|
| No-REG HMM | 0.770 | 0.674 | 0.088 |
| Logistic Regression | 0.766 | 0.684 | 0.078 |
| Random Forest | 0.564 | 0.130 | 0.781 |
Data: 278 real REG notices (2021–2026), 51,630 real district-day weather records (Open-Meteo), and a clearly-labelled simulated crowd-report layer (real citizen reports not yet collected — see Limitations).
POWERMAP-RWANDA/
├── Backend/ # API service
├── ML/ # HMM model, baselines, training & evaluation notebook
├── data/ # REG notices, weather cache, processed datasets
├── database/ # Schema / migrations
├── frontend/ # Citizen PWA + REG dashboard
├── main.py # Entry point
├── docker-compose.yml
├── render.yaml # Render deployment config
├── .env.example
├── DEPLOYMENT.md
└── README.md
git clone https://github.com/Peace3B/powermap-rwanda.git
cd powermap-rwanda
cp .env.example .env # fill in your own values
# Run everything with Docker
docker-compose up --buildRun components individually:
# Backend
cd Backend && pip install -r requirements.txt && python main.py
# Frontend
cd frontend && npm install && npm run dev
# ML pipeline
cd ML && pip install -r requirements.txt
jupyter notebook powermap_rwanda_hmm_methodology_notebook.ipynbSee DEPLOYMENT.md for production deployment (Render).
- Crowd-report data is simulated, not real citizen submissions.
- REG notices mostly record planned maintenance, not unplanned faults — a weak reference signal.
- Model precision is low (0.088); best used for recall-first screening, not stand-alone alerting.
- REG notice cleaning, real weather integration, HMM + baseline evaluation
- Real citizen reporting pilot (Kicukiro, Musanze, Huye)
- Live REG notice feed + monthly retraining
- Full PWA + dashboard + gamification launch
Peace Keza — BSc. Software Engineering Capstone, ALU