# 🌍 Africa Remittance Cost Analysis
An end-to-end data pipeline and investigative analytics project examining the true cost of sending money to, from, and within Africa — using real World Bank data spanning 2016 to 2025.
---
## 📌 The Finding That Started Everything
> A Tanzanian bank charges **91%** to send money to Uganda.
> Western Union charges **8%** on the exact same route.
> Same corridor. Same quarter. 10x the price.
This project was built to understand why — and whether Africa is on track to meet the UN SDG 10.c target of **3% remittance costs by 2030**.
**Spoiler: The trend is going the wrong direction.**
---
## 📊 Dashboard Preview
### Page 1 — The Big Picture
### Page 4 — The Deep Dive
> Built in Power BI, connected live to PostgreSQL.
---
## 🏗️ Project Architecture
```
World Bank Excel (47,000+ rows)
↓
clean_data.py ← Python + Pandas (Extract, Transform)
↓
PostgreSQL ← africa_remittances table (Load)
↓
main.py (FastAPI) ← REST API serving analytics endpoints
↓
Power BI Dashboard ← 4-page live visualization layer
```
---
## 📁 Repository Structure
```
africa-remittance-analysis/
│
├── clean_data.py # Data cleaning & ingestion pipeline
├── check_sheets.py # Data validation & column inspection
├── main.py # FastAPI application
├── queries.sql # Key analytical queries
├── africa_remittances_clean.csv # Cleaned Africa-filtered dataset
└── README.md
```
---
## ⚙️ Pipeline Breakdown
### 1. Ingestion & Cleaning (`clean_data.py`)
- Loads the World Bank Remittance Prices Worldwide dataset (Excel)
- Filters for all Africa-related corridors bidirectionally — rows where Africa is either the source or destination
- Removes promotional noise (negative cost percentages) that would distort analysis
- Classifies each transaction into one of three flow types:
- `Intra-Africa` — both source and destination are African countries
- `Outbound (Africa to …