Performing Analysis of Meteorological Data | Data Analysis Project using Python

Hello and Welcome to the wonderful guide on the data analysis project where we will build a data analysis project from scratch. The data analysis project is related to metrological data (weather data) where we will perform end-to-end data analysis. 

Table of Contents

  1. Dataset Overview
  2. Hands-On Data Analysis using Python
  3. Data Visualization
  4. Extracting different observations
  5. End Notes
Data Analysis Project using Python on Weather Dataset

Dataset Overview

In this small yet interesting project, we will be performing various tasks like data cleaning, data resampling, hypothesis testing, Data visualization in different ways. 
So, Metrological data is a weather dataset. many sites provide the historic dataset on many meteorological parameters such as pressure, temperature, humidity, wind speed, visibility. The dataset we have taken is easily available on Kaggle and you can simply download it from here.
Let's get started with our analysis and present our results.

Step-1) Import all the required libraries

1) Numpy:- for mathematical calculation on a single and multidimensional array
2) Pandas:- for data manipulation
3) Matplotlib:- data visualization library
4) seaborn:- data visualization library in support with Matplotlib.

import numpy as np 
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import warnings

Step-2) Load the dataset

data = pd.read_csv('weather_data.csv')

         (96543, 12)                                                                                                                                      

Step-3) Have a basic look over data and preliminary statical analysis of data

Weather Dataset Overview

Now, let's take a copy of data into any other instance so, that we will not make any kind of changes to the original data. 


Step-4) Check the Anomalies in Data

If any kind of irregularities is found in data like wrong data type or missing value then we will try to make it correct.

Anomalies Visualization in Data

Now, as we can see the Formatted Date column at first number has data type as an object, rather it is datetime. so let's make it correct.

Step-5)  Exploratory Data Analysis

1) Categorical Features

Visualize Categorical Features

The Daily summary column is of no use, so simply drop it out. Let's explore the remaining 2 categorical features, what can we see.

Statistical Data summarization

So, by seeing the above observation, we can say that the temperature will fall down when there will be rain or snow.

Summary concerning Precip Type

Visualize Data summary

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

After Resampling

Overview of Data after Resampling

Here, MS means Monthly Starting. we are displaying the average Apparent temperature w.r.t  Humidity with help of the mean function.

Relation between Temperature and Humidity

Visualize data relationship between Temperature and Humidity

The Problem Statement suggests that to check the variation of humidity of all the 10 years(2006-2016). So, let's explore the graph of some of the months to understand the variation of temperature concerning humidity.

let's take January first.
One Month Data Analysis

Function To make the plot for January month

One Month Data Visualization

Data Visualization using Line chart

let's take one more month of April

Data Visualization using Line chart


  • concerning humidity, every month changes only a little bit, in 2009 temperature is at a peak, but the humidity remains constant as usual. 

Let's check wind speed for Humidity

Data Visualization using Line chart

End Notes

Learning is an ever continuous process and its uses come in front of you when you do hands-on practice and apply its application in the real world to find the best out of it. so, you will only learn when you will practice all these codes in your notebook. so go and play with the dataset. I have uploaded all the analysis in the Kaggle notebook which you can use, copy and play with it. the link for the notebook is Analysis of Metrological Data.

Thank you for your time!
If you have any doubt, Feel free to post them in the comment section below


If you have any doubt or suggestions then, please let me know.

  1. Very nice visualization and you have expressed the outputs very well.

Previous Post Next Post