๐ Clim_AI_te: Predict. Adapt. Sustain. โก
๐ฅ Inspiration
Climate change has caused extreme weather events, disrupting agriculture, transportation, and daily life. We wanted to build an AI-powered climate prediction tool that helps people understand and prepare for upcoming weather conditions. By leveraging machine learning, we provide accurate forecasts based on historical weather data.
๐ง What We Learned
Throughout this project, we explored:
- Feature engineering to extract meaningful insights from weather data.
- Support Vector Machines (SVM) and how it performs in climate classification.
- Streamlit for building interactive web applications.
- Overcoming challenges in weather data inconsistencies and missing values.
๐ ๏ธ How We Built It
We followed a structured approach:
1๏ธโฃ Data Collection & Preprocessing
We used a weather dataset containing:
dateโ Timestamp of the weather record.precipitationโ Amount of rainfall in mm.temp_maxโ Maximum daily temperature.temp_minโ Minimum daily temperature.windโ Wind speed in km/h.weatherโ Weather condition (e.g., sunny, rainy, foggy).
Handled missing values and normalized numerical features.
Converted weather conditions into numerical labels for model training.
2๏ธโฃ Model Training & Optimization
- Implemented SVM for weather classification based on input features.
- Tuned hyperparameters to optimize prediction accuracy.
- Evaluated the model using precision, recall, and accuracy metrics.
3๏ธโฃ Building the Streamlit App
- Designed an interactive UI for easy user input.
- Allowed users to enter weather conditions (temperature, wind, precipitation, etc.).
- Integrated real-time prediction visualization.
### ๐ Streamlit App Features
Home page:
๐จ Enhanced UI & Design
- Improved homepage design with a better-aligned image for an aesthetic and engaging look.
- Increased font size and optimized layout spacing for better readability and user experience.
๐ญ Fun Facts & Jokes
- The Home Page now features a โTell me a jokeโ button, displaying a random weather-related joke for a fun user experience.
๐ฎ Climate Prediction
- Users can input weather parameters (temperature, wind speed, precipitation) to get real-time weather predictions using our trained ML model.
- The app uses Support Vector Machines (SVM) to classify weather into categories like Sun, Snow, Rain, Drizzle, and Fog.
๐ Clothing Recommendations
- Based on the predicted weather, the app suggests two outfit ideas for men and women to help users dress appropriately.
- Example: For Rainy Weather, the recommendations include:
- Men: Raincoat with waterproof pants, boots, and an umbrella
- Women: Trench coat with waterproof leggings, boots, and an umbrella
- Men: Raincoat with waterproof pants, boots, and an umbrella
๐ฒ Food Recommendations
- Provides detailed meal suggestions based on weather conditions, ensuring users eat according to the climate.
- Example: On a cold snowy day, the app suggests hot soups, stews, and warm drinks like spiced tea.
## ๐ ๏ธ Built With
- Python โ Core programming language for data processing and machine learning.
- Pandas & NumPy โ For handling and preprocessing weather data.
- Matplotlib & Seaborn โ For visualizing trends in climate data.
- Scikit-learn โ For implementing and training the SVM model.
- Streamlit โ To build an interactive web app for real-time predictions.
- pickle โ To save and load the trained SVM model efficiently.
- Google Colab โ For model training and experimentation.
- Git & GitHub โ For version control and collaboration.
๐ง Challenges We Faced
- Time-series Complexity โ Weather data is sequential, making it challenging for traditional ML models.
- Data Preprocessing โ Handling missing values and encoding categorical weather types.
- Balancing Performance & User Experience โ Ensuring real-time predictions without lag.
- Model Selection โ Testing different ML models before finalizing SVM.
๐ Future Enhancements
- Advanced models (LSTMs, CNNs) for improved forecasting.
- Live weather API integration for real-time data inputs.
- Mobile-friendly app version for wider accessibility.
- IoT integration to pull sensor-based climate data directly.
๐ฑ ClimAIte is just the beginning! By harnessing AI, we can drive sustainable decision-making and improve climate preparedness.
Built With
- github
- googlecolab
- logisticregression
- matplotlib
- numpy
- pandas
- pickel
- python
- randomforest
- scikit-learn
- seaborn
- stramlit
- svm
Log in or sign up for Devpost to join the conversation.