# 🍽️ Kenyan Food Prices Pipeline
A simple data pipeline that loads WFP Kenyan food market prices into PostgreSQL for analysis, automated with Apache Airflow.
---
## Project Structure
```
Project_1/
food_prices.ipynb
├── 01_setup.sql # Database + staging table
├── 02_load_csv.py # Load CSV into PostgreSQL
├── 03_queries.sql # 6 SQL queries
├──food_prices_dag.py # Airflow
├── food_prices1_dag.py # Airflow
DAG
└── README.md
```
---
## Quick Start
```bash
# 1. Create database
psql -U postgres -c "CREATE DATABASE food_prices_db;"
# 2. Install packages
pip install pandas sqlalchemy psycopg2-binary
# 3. Load data
python 02_load_csv.py
# 4. Run Airflow
airflow standalone
```
---
## Data Issues Observed
1. **Commodity name inconsistencies** — Same commodity recorded under multiple names e.g. `Maize`, `Maize (white)`, `Maize (white, dry)` making aggregations unreliable.
2. **Extreme price outliers** — Suspicious spikes like Beans (dry) jumping 5,060% in one month suggesting data entry errors where KG and 90KG units were mixed up.
3. **Missing GPS coordinates** — 53 rows have NULL latitude and longitude preventing spatial analysis for those markets.
---
## Dataset
**Source:** World Food Programme (WFP)
**Coverage:** Kenya 2006–2026
**Size:** 18,379 rows
---
## 🏅 License
MIT License — free to use, modify and distribute.