A KamiLimu Data Science Track case study in collaboration with nLine, applying machine learning to detect active power sources — grid, solar, and generator — in Sierra Leone health facilities using voltage and frequency sensor data, replacing an existing rule-based algorithm for better energy planning.
# Power Source Detection Case Study
## Project Overview
This case study focuses on detecting active power sources (Grid, Solar, Generator) in health facilities in Sierra Leone using voltage and frequency data collected by sensors. In many healthcare centers across sub-Saharan Africa, power is sourced from a combination of the national grid, solar panels, and diesel generators. Understanding which source is active at a given time enables better energy planning, cost tracking, and improved solar investment evaluations.
### Objective
Improve and evaluate machine learning approaches for identifying the active power source based on time-series sensor data. The goal is to replace or enhance the existing rule-based algorithm with a more robust, data-driven model.
## Folder Structure
```
├── documents/ # Case study description and reference documents
│ └── Data Science Case Study 3.pdf
│
├── main_casestudy.ipynb # Main shared notebook with collective solutions and discussion
├── casestudy_edwin.ipynb # Edwin's personal notebook
├── casestudy_risper.ipynb # Risper's personal notebook
├── casestudy_katherin.ipynb # Katherin's personal notebook
├── casestudy_andrew.ipynb # Andrew's personal notebook
├── README.md # Project overview and setup instructions
└── .gitignore # Git ignore file
```
## Collaboration Workflow
* Each team member will create their own branch using the format: ` _casestudy`
* Work independently in a personal notebook: `casestudy_ .ipynb`
* Once work is ready, submit a **Pull Request (PR)** to merge into the `main` branch
* Use the PR to discuss findings, give feedback, and suggest improvements
* Final, agreed-upon content is added to `main_casestudy.ipynb` for shared solutions
## Data Science Workflow
This case study follows a standard data science project pipeline:
### 1. Problem Understanding
* Review context …