Skip to content

A machine learning project for predicting flood occurrences using weather data. Includes data fetching, model training, and an automated prediction pipeline. πŸš€

Notifications You must be signed in to change notification settings

anujjainbatu/automated-flood-prediction-ml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Automated Flood Prediction ML

This project aims to predict flood occurrences based on various weather parameters. It includes data fetching, model training, and prediction scripts.


Project Structure

.DS_Store
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ FloodPrediction.csv
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ flood_prediction_model.pkl
β”œβ”€β”€ notebooks/
β”‚   β”œβ”€β”€ flood_prediction.ipynb
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ data_fetcher.py
β”‚   β”œβ”€β”€ run_pipeline.py
β”œβ”€β”€ requirement.txt

Directory Breakdown

  • πŸ“‚ data/ - Contains the dataset used for training and prediction.
  • πŸ“‚ models/ - Stores the trained machine learning model.
  • πŸ“‚ notebooks/ - Includes Jupyter notebooks for data exploration and model training.
  • πŸ“‚ scripts/ - Houses Python scripts for data fetching and running the prediction pipeline.
  • πŸ“„ requirement.txt - Lists the dependencies required for the project.

Setup

1️⃣ Clone the repository

git clone https://github.com/anujjainbatu/automated-flood-prediction-ml.git

2️⃣ Create a virtual environment

python3 -m venv venv
source venv/bin/activate  # For macOS/Linux
venv\Scripts\activate    # For Windows

3️⃣ Install dependencies

pip install -r requirement.txt

Usage

πŸ“₯ Data Fetching

To fetch the latest weather data and update the database, run:

python scripts/data_fetcher.py

πŸš€ Running the Prediction Pipeline

To execute the entire prediction pipeline, including data fetching, model prediction, and saving predictions to the database, run:

python scripts/run_pipeline.py

⏳ Automating with Cron Job

To automate the prediction pipeline with a cron job, add the following line to your crontab (e.g., to run the script every day at midnight):

0 0 * * * /usr/bin/python3 /path/to/your/workspace/scripts/run_pipeline.py

πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A machine learning project for predicting flood occurrences using weather data. Includes data fetching, model training, and an automated prediction pipeline. πŸš€

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published