An interactive dashboard for analyzing and predicting crop yield using agricultural input data. Built with PySpark, Streamlit, Plotly, Pandas, and packaged with Unified Python Packaging (uv).
- ๐ Predict crop yield using Linear Regression and Random Forest
- ๐งฎ Visualize actual vs. predicted yield and residuals
- ๐ Interactive charts, correlation heatmaps, and feature importance
- ๐งฉ Dynamic filters and dropdowns for granular data exploration
- ๐งผ Clean, responsive layout with a smooth UX using Streamlit
| Actual vs Predicted |
|---|
![]() |
| Nitrogen vs Yield |
|---|
![]() |
smart-farm-predic/
โ
โโโ proj.py # Main Streamlit dashboard logic
โโโ main.py # Optional entry point (can run proj.py)
โโโ smart_farming_crop_yield_prediction.csv
โโโ pyproject.toml # Project metadata and dependencies (uv)
โโโ uv.lock # Locked dependencies (auto-generated)
โโโ .venv/ # Virtual environment (optional)
โโโ assets/ # Images and visual assets
โโโ README.md
Make sure Python >=3.10 and uv are installed.
git clone https://github.com/Aditya-jaiswal07972/Spark-Smart-Farm-yield-prediction.git
cd smart-farm-predicUsing a virtual environment:
uv venv
uv pip installOr install globally:
uv pip install --system# Option 1: Directly run the Streamlit app
streamlit run proj.py
# Option 2: Use the CLI entry point
python main.pyAll dependencies are managed via pyproject.toml. Key packages:
streamlitโ for building the interactive dashboardpysparkโ for data processing at scalepandas,plotly-express,seaborn,matplotlibโ for analysis and visualization
Made with โค๏ธ by Aditya Jaiswal
Released under the MIT License. Feel free to fork, use, and contribute!

