Analyzing temperature anomalies and crop yields across 16 West African countries using Python
# West Africa Crop Yield & Temperature Anomaly Analysis (Python)
Analyzing the relationship between temperature anomalies and crop yields across 16 West African countries (2020-2024) using Python.
## Overview
This project uses FAO FAOSTAT data covering 609 records across 16 countries and 10 crops to explore how rising temperatures are affecting agricultural yields in West Africa. It replicates and validates findings from an earlier Excel/Power Query/SQL/Looker Studio version of this project, demonstrating the same analytical workflow using pandas and matplotlib.
## Key Findings
- Cabo Verde recorded the highest average temperature anomaly (+2.25°C), Sierra Leone the lowest (+1.05°C)
- Regional average anomaly rose from +1.34°C (2020) to +1.69°C (2024), a 26% increase
- Cassava shows clear yield decline under high temperature conditions
- Maize yields declined from their 2020 baseline and never recovered
- Sugar cane shows the highest yield volatility of any crop
- Mauritania and Gambia combine high warming with low yields, making them the most at-risk nations
- Sweet potatoes and tomatoes show positive yield responses under heat, suggesting climate resilience
## Tools
Python, pandas, matplotlib, Jupyter Notebook
## Files
- `notebooks/01_exploration.ipynb` — full analysis notebook
- `data/westaf_temp_crop_final.xlsx` — source dataset
## Related Work
This project also exists as an Excel/SQL/Looker Studio dashboard, showing the same analysis across different toolsets.