While starting any project related to time series (and not only), one of the very first steps is to visualize the data. We do so to inspect the data we are dealing with and learn something about it, for example:

  • are there any patterns in the data?
  • are there any unusual observations (outliers)?
  • do the properties of the series of observations change over time (non-stationarity)?
  • are there any relationships between the variables?

And that is only the beginning. The characteristics of the data that we learn from answering those questions should be then incorporated into the modeling approach we want to follow. Otherwise, we risk having a poor model that is not able to capture the special traits of the data we have. And as we learned time and time again — garbage in, garbage out.

In this article, I present a few types of plots that are very helpful while working with time series and briefly describe how we can interpret the results.

Data

In this article, we will take a look at the famous Airline Passengers dataset, which you probably have already seen a few times in other articles or statistical handbooks/classes. It’s very popular due to the simplicity of the observable patterns in it. That is also why it will serve its purpose well to illustrate different types of plots used for time series analysis.

The dataset is also included in one of the plotting libraries we will use today — seaborn. We load the data by running the following lines. Additionally, we combine the year and month column to create a report_date field, which is a datatime.date object.

#machine-learning #python #education #programming #time-series-analysis

5 types of plots that will help you with time series analysis
1.55 GEEK