hack1.-.Personal.-.Microsoft_.Edge.2024-10-26.14-17-05.mp4
Create a tool to better understand and predict rainfall patterns using satellite data, focusing on agriculture and water management.
Farmers and water managers need timely and accurate predictions of rainfall to make informed decisions regarding irrigation, crop planning, and water resource management. This project aims to provide a reliable predictive model combined with real-time satellite data and interactive features to assist in these tasks.
To get started, follow these steps:
- Clone the repository:
git clone https://github.com/AdityaJ9801/SkyPredict.git cd SkyPredict - Create a virtual environment (recommended):
python -m venv venv .\venv\Scripts\activate # On Mac: source venv/bin/activate
- Install the required libraries:
pip install -r requirements.txt
- Run the app:
streamlit run app.py
- Python 3.7+
- Required Libraries:
- Streamlit
- XGBoost
- Open Meteo API integration
- Gemini API integration (https://ai.google.dev/gemini-api/docs)
We developed a web application that predicts rainfall patterns and provides real-time weather updates using satellite data. The application is designed to assist farmers and stakeholders in agricultural planning and water management.
- Rainfall Prediction Model:
- Predicts whether the weather will be sunny or rainy based on current temperature, wind speed, humidity, and other factors.
- Real-time Weather Data:
- Fetches live satellite data for temperature, humidity, and wind speed using the Open Meteo API.
- Interactive Chatbot:
- Provides farmers with advice and answers questions using the Gemini API. The chatbot offers insights based on farm data, current weather conditions, and rainfall predictions.
- Data Visualization:
- Displays current weather data on a map based on latitude and longitude inputs.
- Visualizes weather trends and predictions through graphs.
- Source: Kaggle daily weather dataset (2008-2017)
- Attributes Used: Temperature, humidity, wind speed, rain_today, month, day
- Processing: Cleaned and filtered dataset to include only relevant attributes for the prediction model.
We trained the dataset using several supervised classification algorithms:
- CatBoostClassifier: 68% accuracy
- RandomForest: 69% accuracy
- Logistic Regression: 71% accuracy
- GaussianNB: 69% accuracy
- KNeighborsClassifier: 66% accuracy
- XGBoostClassifier: 70% accuracy
Based on evaluation results, we chose the XGBoostClassifier model for its better accuracy and performance.
The web application was built using Streamlit and integrates three core components:
- Open Meteo API: Provides real-time satellite data on temperature, humidity, and wind speed.
- Gemini API: Implements a chatbot for interaction and tailored advice based on current weather and farm data.
- Prediction Model: Predicts whether it will be sunny or rainy based on real-time data inputs (temperature, humidity, wind speed, etc.).
- Map Visualization: Displays current weather data on a map using longitude and latitude.
- Graphical Trends: Offers data visualizations to show weather patterns over time.
