This repository contains the code and datasets for a Rainfall Prediction Model developed using R programming. The project focuses on forecasting rainfall based on historical data and various meteorological predictors. The model implementation includes linear regression and Generalized Additive Models (GAM) for improved accuracy.
-
Rainfall_Model.r: The main R script that implements the rainfall prediction model. It includes data preprocessing, model training, evaluation, and visualization.
-
Datasets: This directory contains the following datasets used in the analysis:
cdr_57002.csv: Rainfall data for Gauge G57002.gdf_57002.csv: Flow data for Gauge G57002.cdr_57004.csv: Rainfall data for Gauge G57004.gdf_57004.csv: Flow data for Gauge G57004.cdr_57005.csv: Rainfall data for Gauge G57005.gdf_57005.csv: Flow data for Gauge G57005.cdr_57006.csv: Rainfall data for Gauge G57006.gdf_57006.csv: Flow data for Gauge G57006.cdr_57007.csv: Rainfall data for Gauge G57007.gdf_57007.csv: Flow data for Gauge G57007.cdr_57015.csv: Rainfall data for Gauge G57015.gdf_57015.csv: Flow data for Gauge G57015.cdr_57017.csv: Rainfall data for Gauge G57017.gdf_57017.csv: Flow data for Gauge G57017.
To run the Rainfall Prediction Model, follow these steps:
-
Ensure you have R and RStudio installed on your system.
-
Clone or download this GitHub repository.
-
Open the
Rainfall_Model.rscript in RStudio. -
Install any required R packages if not already installed. You can do this by running the following command in R:
install.packages("package_name")
Run the script. It will load the datasets, preprocess the data, train the models, evaluate performance, and generate visualizations. Results The Rainfall Prediction Model provides forecasts for rainfall based on historical data and meteorological predictors. It employs both linear regression and Generalized Additive Models (GAM) to enhance accuracy. Model evaluation metrics, such as Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and Mean Absolute Percentage Error (MAPE), are included in the script for performance assessment.
License This project is licensed under the MIT License.
You can use this template as the content for your readme.txt file on GitHub. Feel free to modify it as needed to provide additional information or clarify any specific details about your project and datasets.