Crop_Recommendation / Business_and_Data_Understanding.py
varshitha22's picture
Update Business_and_Data_Understanding.py
adcfce0 verified
import streamlit as st
# Set page configuration
st.set_page_config(page_title="Crop Compass", page_icon="🌾", layout="wide")
# Title with styling
st.markdown(
"""
<h1 style="text-align: center; color: #2E8B57;">🧭 Crop Compass : Smart Farming with Soil & Seasons πŸŒ±πŸ“ŠπŸŒ¦οΈ</h1>
<hr style="border: 1px solid #2E8B57;">
""",
unsafe_allow_html=True,
)
# Subtitle
st.markdown(
"<h3 style='text-align: center; color: #555;'>Guiding Farmers to the Best Crops with Smart Soil & Weather Insights</h3>",
unsafe_allow_html=True,
)
# Display crop image
st.image(
"https://huggingface.co/spaces/varshitha22/Crop_Recommendation/resolve/main/crop%20image.jpg",
width=900 # Adjust size as needed
)
# Business Problem Section
st.markdown("""
### 🌱 Business Problem
Farmers often struggle to decide which crop to grow because soil quality, weather, and rainfall change from place to place. If they choose the wrong crop, they may get a poor harvest, lose money, and damage the soil. Many farmers choose crops based on experience instead of scientific data, which can lead to poor harvests. Soil nutrients like Nitrogen, Phosphorus, and Potassium, along with temperature, humidity, pH, and rainfall, affect crop growth.
### 🎯 Business Objective
The goal of this project is to develop a *Crop Compass: Smart Farming with Soil & Seasons* that helps farmers make data-driven decisions* on crop selection. By analyzing key factors such as soil nutrients (Nitrogen, Phosphorus, Potassium), weather conditions (temperature, humidity, rainfall), and soil pH, the system will provide *accurate crop suggestions* suited to specific land conditions.
### πŸ“Š Data Understanding
#### *Soil Nutrients:*
- **Nitrogen (N):** Important for leaf and stem growth (ratio of Nitrogen content in soil).
- **Phosphorus (P):** Helps with root and flower development (ratio of Phosphorus content in soil).
- **Potassium (K):** Improves plant health and water regulation (ratio of Potassium content in soil).
#### *Climate Factors:*
- **Temperature:** Affects plant growth and yield (temperature in degrees Celsius).
- **Humidity:** Influences plant transpiration and disease risk (relative humidity in %).
- **Rainfall:** Provides water for crops and affects crop choice (rainfall in mm).
- **Soil pH (pH Value):** Affects how well plants absorb nutrients.
""")
st.markdown("<h3 style='text-align: left; color: #D35400;'>Soil Nutrients</h3>", unsafe_allow_html=True)
st.markdown("<ul style='color: #1F618D;'><li><b>Nitrogen</b> (N)</li><li><b>Phosphorus</b> (P)</li><li><b>Potassium</b> (K)</li></ul>", unsafe_allow_html=True)
st.markdown("<h3 style='text-align: left; color: #28B463;'>Climate Factors</h3>", unsafe_allow_html=True)
st.markdown("<ul style='color: #1F618D;'><li><b>Temperature</b></li><li><b>Humidity</b></li><li><b>Rainfall</b></li></ul>", unsafe_allow_html=True)
st.markdown("<h3 style='text-align: left; color: #AF7AC5;'>Soil pH</h3>", unsafe_allow_html=True)
st.markdown("<ul style='color: #1F618D;'><li><b>pH Value</b></li></ul>", unsafe_allow_html=True)