Six essential plots in time series data analysis
Seasonal plots, rolling window, time series decomposition and more
A picture is worth a thousand words
Yes, that’s right, a picture is worth a thousand words; and in data science a picture is probably worth more than a thousand words!
Data visualization is fundamental to data science, whether it is for exploratory data analysis, to build a better model, or for visual storytelling. Just by eyeballing a boxplot or a scatterplot, an experienced pair of eyes can instantaneously retrieve more information than by reading descriptive statistics in a table.
It is even more the case in time series data. Hard to imagine a time series analysis without a time series plot.
Below I’ll demonstrate six such essential plots and go through how to create each, interpret and extract information from them. I’m going to use R for this exercise because of a super useful library fpp2
specifically designed for time series analysis, and you can do most plots with only a couple lines.
So here are the plots we are going to explore:
- A simple time series plot
- Rolling window
- Seasonal plot