# Pan-African Food Security Risk Radar (PAFSR) 🌍
### *A Multivariate Machine Learning Analysis of Hunger Drivers in Sub-Saharan Africa*
---
## đź“– Executive Summary
Why do some nations starve while others thrive? The **Pan-African Food Security Risk Radar** abandons static datasets to build a **live ETL pipeline** that ingests 13 years of economic, environmental, and political data from the **World Bank API**.
This project investigates the hypothesis that *Food Security is primarily an agricultural problem.* Our findings disprove this, revealing that **Economic Purchasing Power (GDP)** is a 3x stronger predictor of hunger than Agricultural Production or Rainfall. Using a **Random Forest Regressor**, we successfully modeled the vulnerability of 54 African nations with **65% accuracy**, significantly outperforming traditional linear models.
---
## 🏗️ The Data Pipeline
Unlike standard analysis projects that rely on pre-cleaned CSVs, this project engineers its own dataset from scratch.
* **Source:** World Bank Open Data API (Live Fetch).
* **Scope:** 54 African Nations (2010–2023).
* **ETL Architecture:**
1. **Extract:** Python script (`wbgapi`) queries 15+ years of data for 4 distinct indicators.
2. **Transform:** Handles missing values, enforces "Wide Format" pivoting, and filters for the 54-nation African continent.
3. **Load:** Stores clean, normalized data in a local **SQLite** warehouse (`food_security.db`).
---
## 🔍 Methodology: The "Three Pillars" Model
We analyzed food insecurity through three distinct lenses:
| Pillar | Metric Used | Hypothesis |
| :--- | :--- | :--- |
| **1. Economic Access** | **GDP per Capita (PPP)** | *Can people afford food?* |
| **2. Market Stability** | **Food Price Inflation** | *Are prices volatile?* |
| **3. Political Stability** | **governance Estimate** | *Is conflict disrupting supply?* |
| **4. Environmental** | **Food Production Index** | *Did the harvest fail?* |
---
## 📊 Key Findings & Insights
### 1. The "P …