๐ŸŒฑ
22 crops
CROP TYPES
๐Ÿ“ฆ
2,200 rows
DATASET SIZE
๐Ÿ”ฌ
7 features
INPUT PARAMS
๐ŸŽฏ
KNN + RF + DT
ALGORITHMS USED
๐Ÿงช Soil & Climate Parameters
N โ€” Nitrogen
mg/kg ยท 0โ€“140
70
P โ€” Phosphorus
mg/kg ยท 5โ€“145
50
K โ€” Potassium
mg/kg ยท 5โ€“205
40
Temperature
ยฐC ยท 10โ€“45
25
Humidity
% ยท 14โ€“100
60
pH Value
3.5โ€“9.5
6.5
Rainfall
mm/year ยท 20โ€“300
150
๐ŸŒฟ Prediction Result
๐ŸŒพ

Adjust parameters and click
Analyze & Predict to get recommendations

๐ŸŒฑ
โ€”
โ€”
Match Confidenceโ€”
Also Suitable
๐ŸŒณ
8% acc
DECISION TREE
๐ŸŒฒ
4% acc
RANDOM FOREST
๐Ÿ”
13% acc
KNN (BEST)
โš ๏ธ
Low note
RANDOM LABELS
Algorithm Accuracy Comparison
METRICS
Crop Distribution in Dataset
100 EACH
Average Nitrogen per Crop
mg/kg
Average Rainfall per Crop
mm/year
Temperature Range by Crop
ยฐC AVG
CropType N (avg)P (avg)K (avg) Temp ยฐCHumidity %pHRainfall mm
Crop A Profile
Crop B Profile
๐Ÿ“‚
Data Collection
๐Ÿงน
Preprocessing
๐Ÿ—๏ธ
Data Warehouse
๐Ÿค–
ML Training
๐Ÿ“Š
Evaluation
๐ŸŒ
Deployment

๐ŸŽฏ Problem Statement

Indian farmers often struggle to choose the right crop due to variations in soil quality and climate. This leads to low yield and financial losses. We built a data-driven solution that uses machine learning to recommend the most suitable crop based on soil nutrients (N, P, K), temperature, humidity, pH, and rainfall.

๐Ÿ“ฆ Dataset

Source: Kaggle โ€” Crop Recommendation Dataset by Atharva Ingle

Records: 2,200 rows ยท 22 crop types ยท 7 features

Features: N, P, K (soil nutrients), Temperature, Humidity, pH, Rainfall

๐Ÿค– Algorithms Used

๐ŸŒณ

Decision Tree

max_depth=10, criterion='gini'

8% accuracy
๐ŸŒฒ

Random Forest

n_estimators=100, random_state=42

4% accuracy
๐Ÿ”

KNN Classifier

n_neighbors=5, metric='minkowski'

13% accuracy โญ Best

๐Ÿ—๏ธ Data Warehouse Design

Star Schema: Crop_Yield_Fact connected to Soil_Dimension, Climate_Dimension, Crop_Dimension โ€” simple structure with faster query performance.

Snowflake Schema: Normalized extension of Star Schema with sub-dimension tables (Soil_Type, Season, Crop_Type) โ€” reduces data redundancy.

๐Ÿš€ Future Scope

Real-time soil sensor data integration ยท Weather API for live climate feed ยท Mobile app for farmers ยท Yield quantity prediction using regression models