This project uses the Austin Weather dataset to predict daily precipitation (rainfall) using Linear Regression in Python.
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.
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
- 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)
- Data Loading & Inspection
- Data Cleaning & Preprocessing
- Removed irrelevant columns (
Date,Events) - Handled missing values & replaced
"T"with0 - Converted all features to numeric
- Removed irrelevant columns (
- Feature Selection β Used all relevant numeric features
- Train-Test Split β 80% training, 20% testing
- Model Training β Linear Regression with scikit-learn
- Evaluation β RMSE and RΒ² metrics
- Visualization β Correlation heatmap, scatter plots, Actual vs Predicted plot
-
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
- Python
- Pandas, NumPy β Data handling
- Matplotlib, Seaborn β Visualization
- Scikit-learn β Machine learning model
- Clone this repository
git clone https://github.com/erharsh2104/rainfall-prediction.git cd rainfall-prediction
jupyter notebook Rainfall_Prediction_Project.ipynb
π¨βπ» Harsh Tripathi
Engineering Student @ Indian Institute of Information Technology, Raichur, Karnataka