WeatherMLPipeline is a Python-based project designed to fetch, preprocess, analyze, and model weather data. It utilizes data from the WeatherStack API, stores it in a MySQL database, and trains a machine learning model to predict weather conditions.
- Fetches real-time weather data for multiple cities using the WeatherStack API.
- Stores data in a MySQL database for persistent storage.
- Saves weather data to a CSV file for additional analysis.
- Preprocesses weather data with scaling and encoding for machine learning.
- Trains a Naive Bayes classification model to predict weather descriptions.
- Automatically updates the model if a more accurate version is available.
- Python: Core programming language.
- MySQL: Database for storing weather data.
- Pandas: Data manipulation and analysis.
- scikit-learn: Machine learning library for data preprocessing and modeling.
- Joblib: For saving and loading machine learning models.
- WeatherStack API: For fetching real-time weather data.
- Schedule: For scheduling data updates.
Before running this project, ensure you have the following installed:
- Python
- MySQL server
- Required Python libraries (install via
pip install -r requirements.txt
)
-
Clone the repository:
git clone https://github.com/your-username/WeatherMLPipeline.git cd WeatherMLPipeline