Skip to content

biibekk/Rainfall-Prediction-Delhi-NCR-ML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rainfall Prediction in Delhi NCR Using Machine Learning

This project predicts rainfall patterns in the Delhi NCR region using machine learning and provides an interactive user interface built with Streamlit.

The problem is addressed in two ways:

  • Classification: Predict whether it will rain (Yes / No)
  • Regression: Predict the amount of rainfall

The models are trained on historical daily weather data (2014–2024) collected for major cities in Delhi NCR.


Region Covered

Delhi NCR
(Cities include Delhi, Noida, Greater Noida, Ghaziabad, Gurugram, Faridabad)


Dataset Description

  • Data Type: Historical daily weather data
  • Time Period: 2014–2024
  • Source: Open-Meteo Historical Weather API

Features:

  • Maximum & minimum temperature
  • Relative humidity
  • Wind speed
  • Precipitation hours
  • Rainfall (daily sum)

Target Variables:

  • Rain Occurrence → Classification
  • Rainfall Amount → Regression

Tech Stack

  • Python
  • Pandas, NumPy
  • Scikit-learn
  • Matplotlib, Seaborn
  • XGBoost
  • Streamlit

Models Used

Classification

  • Logistic Regression
  • Random Forest Classifier
  • XGBoost Classifier

Regression

  • Linear Regression
  • Random Forest Regressor
  • XGBoost Regressor

Evaluation Metrics

  • Classification: Accuracy, Precision, Recall
  • Regression: RMSE, R² Score

Project Workflow

  1. Data Loading
  2. Exploratory Data Analysis (EDA)
  3. Data Preprocessing
  4. Feature Engineering
  5. Train–Test Split
  6. Classification Modeling
  7. Regression Modeling
  8. Model Evaluation
  9. Conclusion & Future Scope

Interactive Application (Streamlit)

The project includes an interactive Streamlit web application (app.py) that allows users to:

  • Enter weather-related input features
  • Predict rain occurrence
  • Estimate rainfall amount in real time

This demonstrates the deployment of machine learning models in a user-friendly interface.


How to Run

1. Clone the repository

git clone https://github.com/biibekk/Rainfall-Prediction-Delhi-NCR-ML.git

cd Rainfall-Prediction-Delhi-NCR-ML

2. Create a virtual environment (Optional)

python -m venv venv

Activate the virtual environment

macOS / Linux

source venv/bin/activate

Windows

venv\Scripts\activate

3. Install dependencies

pip install -r requirements.txt

4. Run the Jupyter notebook

Open and run: Rainfall_Prediction_Delhi_NCR.ipynb

5. Run the Streamlit app

streamlit run app.py

About

End-to-end machine learning project to predict rainfall in Delhi NCR using classification and regression, with an interactive Streamlit web app.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors