Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PowerMap Rwanda

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).


Problem

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.

Approach

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).

Repository Structure

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

Installation

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 --build

Run 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.ipynb

See DEPLOYMENT.md for production deployment (Render).

Limitations

  • 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.

Roadmap

  1. REG notice cleaning, real weather integration, HMM + baseline evaluation
  2. Real citizen reporting pilot (Kicukiro, Musanze, Huye)
  3. Live REG notice feed + monthly retraining
  4. Full PWA + dashboard + gamification launch

Author

Peace Keza — BSc. Software Engineering Capstone, ALU

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages