Skip to content

BhaveshBhakta/Crop-Yield-Prediction

Repository files navigation

Indian Crop Yield Prediction Using Machine Learning

This repository contains a machine learning-based solution to predict crop yield in India, considering multiple input parameters. The project leverages a Random Forest Regressor model and includes an interactive and visually appealing website to enhance user experience.

Project Overview

Indian agriculture depends heavily on precise crop yield predictions. This project helps farmers, policymakers, and agricultural stakeholders make informed decisions by predicting crop yield based on key input parameters.

Features:

  • Extensive Data: Covers all states and over 600 districts of India.
  • User Inputs: Crop Type, Season, Area, Crop Year, and more.
  • Machine Learning: Random Forest Regressor for accurate yield predictions.
  • Dynamic Website: A user-friendly interface featuring animations using GSAP and smooth scrolling powered by Lenis.

Tech Stack

Backend:

  • Machine Learning: Random Forest Regressor
  • Python Libraries: Pandas, NumPy, Scikit-learn

Frontend:

  • UI Enhancements: GSAP for animations and Lenis for smooth scrolling
  • Web Framework: Flask
  • HTML/CSS/JavaScript: For responsive and dynamic user interface

How It Works

  1. Input Parameters: Users input crop type, season, area, crop year, and other relevant details.
  2. Prediction Model: The Random Forest Regressor processes the input and predicts the crop yield.
  3. Output: The predicted yield is displayed on the website in a clean and interactive format.

Highlights

  • Comprehensive Data: A wide dataset ensures accurate predictions for different regions and conditions.
  • Intuitive Design: The website combines functionality with aesthetics for a seamless user experience.
  • Dynamic Animations: GSAP and Lenis make the interface engaging and modern.

Setup Instructions

  1. Clone this repository:

    git clone https://github.com/BhaveshBhakta/Crop-Yield-Prediction.git
    cd Crop-Yield-Prediction
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the Flask app:

    python app.py
  4. Open the app in your browser at http://127.0.0.1:5000/.

Project Structure

📦 indian-crop-yield-prediction
├── app.py                # Flask application
├── static/               # Static files (CSS, JS, images)
├── templates/            # HTML templates
├── requirements.txt      # Python dependencies
└── README.md             # Project documentation

Dataset

The dataset includes:

  • State-level Data: Comprehensive data for all Indian states.
  • District-level Data: Covers over 600 districts for granular analysis.

Contributing

Contributions are welcome! Feel free to fork the repository, make improvements, and submit a pull request.

Website Overview

Cypa

Screenshot 2024-11-26 222147

Screenshot 2024-11-26 222210

About

Indian Crop Yield Prediction using Machine Learning. Predicts agricultural yield based on crop type, season, area, and year using a Random Forest Regressor. Includes a dynamic, GSAP-enhanced Flask web app for interactive user experience.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors