"Your Friend in Smart Agriculture"
KrishiMitra is an advanced AI-powered crop recommendation system with sustainability scoring, intelligent filtering, and comprehensive fertilizer recommendations. Built to empower farmers with data-driven agricultural decisions while promoting sustainable farming practices.
- Machine Learning model trained on crop suitability data
- Intelligent probability scoring based on soil and environmental conditions
- Season-specific crop filtering and recommendations
- Carbon Footprint Assessment: 0-10 scale scoring for environmental impact
- Water Efficiency Ratings: Resource usage optimization metrics
- Soil Health Impact: Long-term agricultural sustainability analysis
- Biodiversity Considerations: Ecosystem impact evaluation
- Automatic Rainfall Calculation: District + Season + Water Source integration
- Real-time Updates: Dynamic calculations as user changes selections
- Water Source Integration: Groundwater, Canal, River, Pond/Lake contributions
- Fertilizer Requirements: Filter by Low/Medium/High fertilizer needs
- Sustainability Levels: Filter by environmental impact scores
- Smart Sorting: Sort by suitability, sustainability, or fertilizer requirements
- Basal Application Schedules: Precise timing and quantities
- Top-dressing Plans: Follow-up fertilization strategies
- Organic Matter Guidance: Compost and farmyard manure recommendations
- Micronutrient Specifications: Zinc, Boron, Molybdenum requirements
- Complete Timing Calendar: Full seasonal application schedules
- Responsive Design: Works on desktop, tablet, and mobile devices
- Interactive Elements: Smooth animations and hover effects
- Professional Styling: Modern gradient design with intuitive navigation
- Visual Feedback: Progress indicators and real-time updates
- Python 3.8 or higher
- pip package manager
-
Clone or download the project
cd "G:\sih project\crop recoomadation\new daa"
-
Install dependencies
pip install -r requirements.txt
-
Run the application
python app.py
-
Access the system Open your web browser and navigate to:
http://127.0.0.1:5000
KrishiMitra/
βββ app.py # Main Flask application
βββ crop_data.py # Crop data, sustainability scores, and functions
βββ crop_model.pkl # Trained machine learning model
βββ requirements.txt # Python dependencies
βββ setup_and_run.py # Easy setup and launch script
βββ templates/
β βββ index.html # Web interface template
βββ Crop_recommendation.csv # Training dataset (reference)
βββ README.md # This documentation
- Flask web framework
- Machine learning model integration
- API endpoints for data and calculations
- Advanced filtering and sorting logic
- Sustainability scoring integration
- Crop information and characteristics
- Sustainability scoring metrics
- Fertilizer requirement categories
- Detailed fertilizer recommendations
- Regional rainfall data
- Water source contribution factors
- Responsive web interface
- Advanced filter controls
- Real-time rainfall calculations
- Interactive recommendation displays
- Detailed fertilizer plan expansion
- Random Forest Classifier
- Trained on comprehensive crop dataset
- Features: N, P, K, temperature, humidity, pH, rainfall
- Supports 22 different crop types
- Rice, Maize
- Chickpea, Kidneybeans, Pigeonpeas, Mothbeans, Mungbean, Blackgram, Lentil
- Pomegranate, Banana, Mango, Grapes, Watermelon, Muskmelon, Apple, Orange, Papaya, Coconut
- Cotton, Jute, Coffee
- Carbon Score: Greenhouse gas emissions and carbon sequestration
- Water Efficiency: Water usage optimization and conservation
- Soil Health: Impact on soil fertility and structure
- Biodiversity: Effect on local ecosystem diversity
- High Sustainability (8.0+): Legumes, environmentally friendly crops
- Medium Sustainability (5.5-7.9): Balanced environmental impact
- Low Sustainability (<5.5): High input, resource-intensive crops
- Legumes (nitrogen-fixing): Chickpea, Lentil, Pigeonpeas, etc.
- Benefit: Reduced input costs, environmental sustainability
- Moderate input requirements: Maize, Pomegranate, Coffee, etc.
- Benefit: Balanced productivity and sustainability
- Intensive input needs: Rice, Cotton, Banana, etc.
- Benefit: High productivity potential with proper management
- Enter Soil Parameters: N, P, K levels, temperature, humidity, pH
- Select Location: Choose season, district, and water source
- Apply Filters (Optional): Set fertilizer and sustainability preferences
- Get Recommendations: View ranked crop suggestions with detailed information
- Explore Details: Click "Detailed Fertilizer Plan" for comprehensive guidance
GET /get_rainfall_data- Retrieve rainfall calculation dataGET /calculate_rainfall- Calculate water availability for specific conditionsGET /get_filter_data- Get filtering options and categoriesGET /get_fertilizer_recommendation/<crop_name>- Get detailed fertilizer plan
This system is designed for agricultural decision support and sustainable farming practices.
Educational and research use.
This system promotes:
- Sustainable Agriculture: Environmentally conscious crop selection
- Data-Driven Farming: Evidence-based agricultural decisions
- Resource Optimization: Efficient use of water and fertilizers
- Climate-Smart Agriculture: Carbon footprint consideration
- Farmer Empowerment: Easy-to-use decision support tools
Built with β€οΈ for sustainable agriculture and environmental conservation