top of page

Data Scientist Program


Free Online Data Science Training for Complete Beginners.

No prior coding knowledge required!

How to use visualization to explain weather forecasting

After cleaning the data, the visualization follows to facilitate the understanding. To do this, we need to draw curves. These in Python are not enough and we need the NumPy and matplotlib libraries.

We use dataset from

Dataset description: The data set is at 10 min for about 4.5 months. The house temperature and humidity conditions were monitored with a ZigBee wireless sensor network. Each wireless node transmitted the temperature and humidity conditions around 3.3 min. Then, the wireless data was averaged for 10 minutes periods. The energy data was logged every 10 minutes with m-bus energy meters. Weather from the nearest airport weather station (Chievres Airport, Belgium) was downloaded from a public data set from Reliable Prognosis (, and merged together with the experimental data sets using the date and time column. Two random variables have been included in the data set for testing the regression models and to filter out non predictive attributes (parameters).

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

path = ""

df_energy = pd.read_csv(path)

We will change the data type and also put it as an index. The code belows illustrate it:

#change data type
df_energy["date"] = pd.to_datetime(df_energy["date"], dayfirst=True)

#date as an index
df_energy = df_energy.set_index(['date'])

the curve below shows the evolution of the wind as a function of the date.


There is anplot which present the disdribution of the temperature as a function of the date.

plt.ylabel("Temperature in ° C")

There is anothe plot which shows also the evolution of the temperature as a function of the date.

plt.ylabel("Temperature in ° C")


Recent Posts

See All
bottom of page