Skip to content

erharsh2104/Rainfall-Prediction-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🌧️ Rainfall Prediction Project

This project uses the Austin Weather dataset to predict daily precipitation (rainfall) using Linear Regression in Python.


πŸ“– Description

This project focuses on predicting daily rainfall levels in Austin, Texas, using historical weather data.
The dataset includes weather attributes such as temperature, humidity, dew point, visibility, wind speed, and sea-level pressure.

By applying data cleaning, preprocessing, and linear regression modeling, the project demonstrates how different weather parameters influence precipitation.
The goal is not only to predict rainfall amounts but also to visualize and understand trends through correlation heatmaps, scatter plots, and actual vs predicted comparisons.


πŸ“Œ Project Overview

The objective of this project is to:

  • Clean and preprocess the Austin weather dataset
  • Handle missing values and special symbols like "T" (trace) and "-"
  • Explore weather features such as temperature, humidity, visibility, and wind
  • Build a Linear Regression model to predict precipitation
  • Evaluate the model with metrics (RMSE and RΒ² score)
  • Visualize data trends and model results

πŸ“Š Dataset

  • Source: Austin Weather dataset (CSV)
  • Features:
    • Temperature (High, Avg, Low)
    • Humidity (High, Avg, Low)
    • Dew Point
    • Visibility (High, Avg, Low)
    • Wind (High, Avg, Gust)
    • Sea Level Pressure
    • Precipitation (target variable)

βš™οΈ Steps Performed

  1. Data Loading & Inspection
  2. Data Cleaning & Preprocessing
    • Removed irrelevant columns (Date, Events)
    • Handled missing values & replaced "T" with 0
    • Converted all features to numeric
  3. Feature Selection – Used all relevant numeric features
  4. Train-Test Split – 80% training, 20% testing
  5. Model Training – Linear Regression with scikit-learn
  6. Evaluation – RMSE and RΒ² metrics
  7. Visualization – Correlation heatmap, scatter plots, Actual vs Predicted plot

πŸ“ˆ Results

  • Model Evaluation:

    • RMSE (Root Mean Squared Error)
    • RΒ² Score (explained variance of precipitation prediction)
  • Insights:

    • Precipitation increases with humidity
    • Lower visibility often correlates with rainfall
    • Predictions align fairly well with actual precipitation values

πŸ› οΈ Tech Stack

  • Python
  • Pandas, NumPy – Data handling
  • Matplotlib, Seaborn – Visualization
  • Scikit-learn – Machine learning model

πŸš€ How to Run

  1. Clone this repository
    git clone https://github.com/erharsh2104/rainfall-prediction.git
    cd rainfall-prediction
    

jupyter notebook Rainfall_Prediction_Project.ipynb

✨ Author

πŸ‘¨β€πŸ’» Harsh Tripathi

Engineering Student @ Indian Institute of Information Technology, Raichur, Karnataka

πŸ“§ tripathiharsh2104@gmail.com

About

This project focuses on predicting daily rainfall levels in Austin, Texas, using historical weather data. The dataset includes weather attributes such as temperature, humidity, dew point, visibility, wind speed, and sea-level pressure.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors