Crop Recommendation & Soil Moisture Pipeline

A two-part agricultural decision-support project. Part 1 is a 22-class crop classifier that recommends what to grow given soil + climate features. Part 2 is the data pipeline that would feed the classifier from real-world sensors and weather services — built around the Penman-Monteith evapotranspiration model. Architecture flowchart LR subgraph DATA["Data Pipeline (Part 2)"] WB["WeatherBit APIsolar_rad, dewpt,DNI, DHI, GHI,wind_spd"] --> AGG["Multi-source averaging(temp, wind across APIs)"] OW["OpenWeather APItemp, wind"] --> AGG AGG --> PM["Penman-Monteith calces, ea, VPD, delta,alpha, net Rn, G"] PM --> DB["SQLite(CRUD wrapper)"] end subgraph ML["Crop Classifier (Part 1)"] DS["Kaggle Crop Recommendation2,200 samples × 22 crops"] --> FE["Feature engineering+ Crop_Type+ Sown_Season"] FE --> SPLIT["80/20 split"] SPLIT --> NB["Gaussian Naive Bayes"] SPLIT --> RF["Random Forest"] RF --> PKL["model.pkl"] end DB -.->|"intended runtime feed"| RF PKL --> APP["Flask + Bootstrapweb app"] Part 1 — Crop classifier Data: the standard Kaggle Crop Recommendation dataset — 2,200 samples balanced across 22 crops (rice, maize, jute, cotton, coconut, papaya, orange, apple, muskmelon, watermelon, grapes, mango, banana, pomegranate, lentil, blackgram, mungbean, mothbeans, pigeonpeas, kidneybeans, chickpea, coffee), 100 per class. Features: N / P / K (soil nutrients), temperature, humidity, pH, rainfall. ...

February 15, 2024