# WFP Somali Region – Process Monitoring Thematic Cleaner
This is a small **Streamlit application** developed for the
**World Food Programme (WFP) – Ethiopia, Somali Region RAM/M&E Unit**.
It converts raw **MoDA/ODK Excel exports** (multi-sheet) into:
- A **cleaned, annotated wide dataset** (one row per interview / observation),
- A **long-format fact table** (one row per indicator value),
- A **column-level thematic mapping** (Protection, CFM, Entitlement, etc.).
You can use the outputs directly in **Tableau**, **Power BI**, or Python for FMPI and other analyses.
---
## 1. Features
- Detects **Activity** (Relief, Nutrition, Refugees, Social Protection, Market) from sheet names.
- Detects **Monitoring Type** (Beneficiary Interview, Distribution Observation, Food Basket, Warehouse, Partner, Market).
- Automatically assigns a **Thematic Area** to each column, e.g.:
- Protection, Safety & Accessibility
- Accountability to Affected Populations (CFM & Information)
- Entitlement Adequacy & Commodity Basket
- Distribution Process & Procedures
- Timeliness & Waiting Time
- Targeting & Registration
- Warehouse & Storage Monitoring
- Partner Performance & Compliance
- Market & Mills Monitoring
- Demographics & Metadata
- Creates:
- `Wide_Cleaned` – original data + context columns + extra `_bin` columns (Yes/No → 1/0 where possible);
- `Fact_Long` – long-format dataset (id columns + Raw_Column_Name + Value + thematic/meta);
- `Indicator_Mapping` – one row per column with thematic classification and clean indicator names.
---
## 2. Installation
1. Make sure you have **Python 3.9+** installed.
2. Create and activate a virtual environment (recommended):
```bash
python -m venv venv
source venv/bin/activate # on Windows: venv\Scripts\activate
```
3. Install the required packages:
```bash
pip install -r requirements.txt
```
---
## 3. Running the app
From the folder containing `app.py`:
```bash
streamlit run app.py
```
Streamlit will open the app in your browser …