This project is going to focus on crop health analytics. This dataset simulates real-world smart farming operations powered by IoT sensors and satellite data. It captures environmental and operational variables that affect crop yield across 500 farms located in regions like India, the USA, and Africa.
# ๐พ Crop Yield Prediction & Data Exploration Project
This project analyzes crop yield data using **SQL**, **Python (scikit-learn)**, and **Tableau**, combining data exploration and machine learning to understand and predict agricultural productivity.
## ๐ Project Overview
- **Goal:** Predict crop yield (`yield_kg_per_hectare`) and explore underlying patterns in agricultural data.
- **Data:** 500-row dataset containing features like soil type, rainfall, and crop varieties.
- > ๐ `Smart_Farming_Crop_Yield_2024.csv`
- **Tools Used:**
- ๐ Python and R (for modeling and data cleaning)
- ๐งฎ SQL (for early data exploration)
- ๐ Tableau (for visual dashboards)
- ๐ฆ scikit-learn (for regression models)
## EDA PHASE
### ๐ SQL Queries:
EDA was conducted using SQL to uncover:
- Top performing crops, regions with highest yield, most frequent crop disease for each crop
- Crop yield grouped by region and season
> ๐ `cropeda.sql`
### R and Python
EDA using R and Python:
- Filtering unecessary columns for linear regression such as farm_id and sensor_id
- Building multiple linear regression models to find out how various predictors explain yield_kg_hectare
- Stepwise model which concluded the best model was yield_kg_hectare explained by rainfall but it still had a low R^2 value
- Null values and data completeness
> ๐ `farm_regression.R`
> ๐ `Smart_Farm.ipynb`
### ๐ Analysis
#### 1. ๐พ Disease Distribution by Crop
##### Takeaways
* Soybean and Cotton face the most Severe disease instances.
* Maize and Wheat appear to be the most resilient, with higher proportions of healthy (None) or mild cases.
* This graph can help prioritize crop-specific disease intervention efforts.
#### 2. โ๏ธ Is Temperature Related to Disease Outbreaks?
> This graph shows that in this particular dataset, there is little to no apparent relationship between the average temperature and the severity of crop disease outbreaks. The average temperature remains relatively constant (around 24.5ยฐC) regardles โฆ