Performing Analysis of Meteorological Data
By: Imam Abdullah Khan
Tags: Intern, Data Visualization, Data Science, Data Analytics

This dataset has hourly temperature recorded for last 10 years starting from 2006–04–01 00:00:00.000 +0200 to 2016–09–09 23:00:00.000 +0200. It corresponds to Finland, a country in the Northern Europe. You can download the dataset from this Google drive link: https://drive.google.com/open?id=1ScF_1a-bkHi1qe8Rn78uxK6_5QwUD9Bu

Aim: We need to find whether the average Apparent temperature for the month of a month says April starting from 2006 to 2016 and the average humidity for the same period has increased or not.

What are the steps are involved?

step1: Import dataset and pandas library.

step2: Printing the head of data(First 5 Rows).

step3: Print the shape, type and description of data.

step4: Cleaning data.

step5: Check the dataset is proper or not

Step6: Visualizing the data.

Importing Dataset

I can download the dataset from https://drive.google.com/open?id=1ScF_1a-bkHi1qe8Rn78uxK6_5QwUD9B After I download I can use pandas library this library helps us data frame.

Printing Head of Data

This function returns the first n rows for the object based on position. It is useful for quickly testing if your object has the right type of data in it. Here we can mention how may record prints through the head() here I use only read just first 5 records. A similarly tail() function that is read below five records its also read last 5record default.

Printing the shape, type, columns and description of data

shape: It returns a tuple representing the dimensionality of the DataFrame i.e how many rows and columns present in the dataset.

It returns a tuple representing the dimensionality of the DataFrame i.e how many rows and columns present in the dataset. dtypes: It returns a Series with the data type of each column. The result’s index is the original DataFrame’s columns. Columns with mixed types are stored with the object dtype.

It returns a Series with the data type of each column. The result’s index is the original DataFrame’s columns. Columns with mixed types are stored with the dtype. columns: It returns the column labels of the DataFrame.

It returns the column labels of the DataFrame. description: It generates descriptive statistics which includes those that summarize the central tendency, dispersion and shape of a dataset’s distribution, excluding NaN values.

Tips: We can use it dataframename.info() methods it gives us dtypes, shape, null values.

Cleaning Data

Dropping the useless columns using the ‘drop()’ method.

Apparent temperature is most commonly applied to the perceived outdoor temperature.

Humidity:

Humidity is the concentration of water vapor present in the air. Water vapor, the gaseous state of water, is generally invisible to the human eye. Humidity indicates the likelihood for precipitation, dew, or fog to be present

Checking Dataset proper or not

I think the formatted date is not proper, so we need to make a date-time object. For this we use to_datetime() function. Then set index name as Formatted Date through set index function.

Now since we have been given hourly data, we need to resample it monthly.

Visualization

Plotting the dataset for the past ten years for all months

Here I use matplotlib that helps to visualize our last ten years records in month-wise

First import matplotlib library as mention alias name then I select which type of plot suitable for our dataset. Here I select line plot, But matplotlib plot function visualizes line plot by default.

Now I visualize January month from 2006–2016 likewise February, March, April………up to December 2016.

Similary code for January to December can written by changing variable name and index, such that index.month==1 is January like index.month==2 is Feb, index.month==12 December just put in Month in numerical.

Figures below show visualization from January to December.

Report:

From September to March Large difference in Apparent Temperature but no changes in Humidity and in April to August minor changes in temperature but here also no difference in humidity. exactly, November, December, January high changes than other months.

Conclusion:

In this article, We are learned how to analyze Meteorological Data using Pandas and Matplotlib. In the future We discussing through seaborn plote and tableau about Meteorological Data.