AI-based crop price prediction system using Machine Learning, Flask, React, and MongoDB. Helps farmers predict mandi prices.
# KrishiPredict – Crop Price Prediction System
## Live Demo
cropsense-karnataka.onrende…
A web application that helps Karnataka farmers analyze crop prices and predict future prices using machine learning.
## Tech Stack
This project is built with:
- **Vite** + **React** + **TypeScript**
- **Tailwind CSS** with **shadcn/ui** components
- **Recharts** for data visualization
- **React Router** for navigation
## Getting Started
### Prerequisites
- Node.js 18+ and npm
### Installation
Clone the repository and install dependencies:
```sh
npm install
```
### Running Locally
Start the development server:
```sh
npm run dev
```
Open
localhost in your browser.
### Building for Production
```sh
npm run build
```
## Sample Dataset
A sample dataset is available at `public/data/sample_dataset.csv`. It contains crop price records for Karnataka districts with the following columns:
| Column | Description |
|--------|-------------|
| `date` | Date of price record (YYYY-MM-DD) |
| `state` | State (Karnataka) |
| `district` | District name |
| `market` | APMC market name |
| `commodity` | Crop name (Jowar, Ragi, Maize, Rice, Groundnut) |
| `min_price` | Minimum price (₹ per quintal) |
| `max_price` | Maximum price (₹ per quintal) |
| `modal_price` | Modal (most common) price – used for analysis |
## Features
- **Multi-language support** (English + Kannada)
- **Crop selection** (Jowar, Ragi, Maize, Rice, Groundnut)
- **Historical price analysis** with trend and district comparison charts
- **Price prediction** for future dates using trend-based models
- **CSV upload** – bring your own APMC dataset