Forecasting precipitation — it is the application of science and technology to predict the amount of precipitation in a region. It is important to accurately determine rainfall for efficient water use, crop productivity and preliminary planning of water features.
In this article, we will use linear regression to predict rainfall. Linear regression tells us how many inches of precipitation we can expect.
The dataset is a publicly available weather dataset from Austin, Texas, available on Kaggle. The dataset can be found here .
Data comes in all forms, most of which are very messy and unstructured. They are rarely ready to use. Datasets big and small come with a lot of problems: invalid fields, missing and optional values, and values in forms other than what we want. To bring it into a workable or structured form, we need to "cleanse" our data and prepare it for use. Some common cleanup includes parsing, converting to a one-off state, deleting unnecessary data, etc.
In our case, our data has several days where some factors were not captured. And the amount of precipitation in cm was marked as T if there were traces of precipitation. Our algorithm requires numbers, so we cannot work with the alphabets that appear in our data. so we need to clean up the data before applying it to our model
Clean up the data in Python:
< br />
The precipitation in inches for the input is: [[1.33868402]] The precipit ation trend graph:
Precipitation graph against selected attributes:
A day (in red) with about 2 inches of precipitation is tracked by several parameters (the same day is tracked by several parameters such as temperature, pressure, etc.). The X-axis denotes days, and the Y-axis denotes the magnitude of an element such as temperature, pressure, etc. The graph shows that precipitation can be high if the temperature is high and the humidity is high.