Performing Analysis of Meteorological Data Using Python
By: Valliammai V
Tags: Python, Kaggle, Data Science, Data Analysis, Data Visualization

Data analysis is a process of collecting, transforming, cleaning, and modeling data with the goal of discovering the required information. The results so obtained are communicated, suggesting conclusions, and supporting decision-making. Data visualization is at times used to portray the data for the ease of discovering the useful patterns in the data.

One type of data that’s easier to find on the internet is Weather data. Many sites provide historical data on many meteorological parameters such as Precip Type,pressure, temperature, humidity, wind speed, visibility, etc.

Following is the Hypothesis of the Analysis : “Has the Apparent temperature and humidity compared monthly across 10 years of the data indicate an increase due to Global warming.”

We are going to analyze Weather data-set. You can find the dataset from the mentioned kaggle link(https://www.kaggle.com/muthuj7/weather-dataset).I have used Google Colab and Python Language for analysis .Our main aim is to perform data cleaning ,data normalizing ,testing the hypothesis and deriving appropriate insights. So lets begin our data analysis using Meteorological Data!

Import all the essential libraries such as Pandas , Numpy, Matplotlib and Seaborn.

2.Upload our dataset to Google Colab

upload to colab

3.The dataset stored in the colab is now transferred to pandas dataframe called data.

4.Print the first five datasets for analysis

5. Print the last five datasets for analysis

6.It describes the aspects of the data such as integer, float, Python object, etc

7.shape is a tuple that gives you an indication of the number of dimensions in the array

8.The describe function computes a summary of statistics pertaining to the DataFrame columns. This function gives the mean, std and IQR values is used to view some basic statistical details like percentile, mean, std etc.

9.The info function is used to print a concise summary of a DataFrame. This method prints information about a DataFrame including the index dtype and column dtypes

10. It displays the column labels of the DataFrame

11.But before visualization, we need to make date features -> date time object . For this we use to_datetime() fn

11. Cleaning the Dataset. Our main aim is to analyze the change in temperature and humidity so we focus on important factors only. Here we Convert Date to a proper format and then resample the data.

12.Check the datasets whether the columns had been dropped by printing the head

13. since we have been given hourly data, we need to resample it monthly. Resampling is a convenient method for frequency conversion. Object must have a datetime like index

After resampling:

Here “MS” denotes: Month starting We are displaying the average apparent temperature and humidity using mean() function

14.Plotting the variation in Apparent Temperature and Humidity with time.From the plot we can say that humidity remained almost constant in these years. Even the average apparent temperature is almost same (since peaks lie on the same line)

15..Plotting the variation in Apparent Temperature with Humidity by using Matplotlib Library.

16.If we want to specifically retrieve the data of a particular month from every year, say April in this case then

17.Plotting the variation in Apparent Temperature and Humidity for the month of April every year.No change in average humidity. Increase in average apparent temperature can be seen in the year 2009 then again it dropped in 2010 then there was a slight increase in 2011 then a significant drop is observed in 2015 and again it increased in 2016

18.Comparing the Summary with the Apparent Temperature by Scatter plot

19. Analyzing the peaks and dips in the graphs by Comparing the Variation in Humidity with the Month of April by Line plot

20.Comparing the Variation in Apparent Temperature with the Month of April by Line plot

Conclusion:

"Global Warming must be seen as an economic and Security threat”

From this analysis we could state that Global Warming is significantly increasing which in turn is deteriorating the weather conditions and ecosystems and There is No change in average humidity. Hence from this analysis we have assembled useful insights which say that over the past years the temperature is consistently increasing and there is a slight rise humidity in some years but mostly remained same throughout.

“Global Warming isn’t a Prediction.It is happening”