Developing a supervised machine learning model capable of predicting regional crop yield in Kenya using historical production data, climate variables, and agricultural input usage.
# Kenya Regional Crop Yield Prediction Using Machine Learning
## 📌 Project Overview
Agriculture is a critical sector in Kenya, supporting food security, employment, and economic stability. However, crop yields are highly sensitive to climate variability, regional differences, and agricultural input usage.
This project develops a machine learning pipeline to predict regional crop yields using historical production data, climate indicators, and pesticide usage. The goal is to provide data-driven insights that can support early warning systems, resource allocation, and agricultural planning.
---
## 🎯 Problem Statement
Traditional yield estimation relies on historical averages, limiting the ability to anticipate food shortages and climate-related production risks.
This project addresses the question:
> **How accurately can regional crop yields in Kenya be predicted using climate variables and agricultural input data?**
---
## 🧭 Objectives
- Predict crop yield at the regional level using supervised machine learning.
- Identify regions most sensitive to rainfall and temperature variability.
- Evaluate the influence of pesticide usage on yield outcomes.
- Explore whether predictive models can provide early warning signals for potential food shortages.
---
## 🗂️ Data Sources
### 1. Kenya Agricultural Production Dataset
- **Source:** Kaggle
- **File:** `Kenya Agricultural production.xlsx`
- **Variables:** Year, Crop, Area Harvested, Production, Yield
- **Purpose:** Historical crop production metrics.
### 2. HarvestStat Africa – Regional Crop Data
- **Source:** HarvestStat GitHub
- **File:** `adm_crop_production_KE.csv`
- **Variables:** Region, Crop, Area, Production
- **Purpose:** Regional yield modeling.
### 3. Climate Data (Rainfall & Temperature)
- **Source:** OpenAfrica
- **Variables:** Year, Month, Rainfall (mm), Temperature (°C)
- **Purpose:** Environmental drivers of yield variability.
### 4. Pesticide Usage Data
- **Source:** KAPSARC Data Portal
- **Va …