An introduction to time series

Time Series Analysis in Tableau

Christopher Hui

VP of Product, Tracked

What's time series data?

  • A sequence of observations taken at regular or irregular intervals over time

  • Granularity references the time period over which the data is collected (e.g. daily, weekly, monthly etc.)

A line chart showing US gasoline prices from 2008 to 2018

Typical time series data might include:

  • Daily fuel prices
  • LinkedIn posting time
  • Ridership patterns for e-Bikes
1 https://www.eia.gov/todayinenergy/detail.php?id=33562
Time Series Analysis in Tableau

Univariate or multivariate?

Univariate

  • Univariate time series analysis refers to the analysis of a single variable over time (e.g. Sales of a product over the past few years)

Multivariate

  • Multivariate time series analysis is the analysis of multiple variables that are measured over time

A univariate time series line chart showing the price of Copper from 1996 to 2008

A multivariate time series line chart showing the price of multiple commodities (Copper, Coal, Crude Oil) from 1996 to 2008

Time Series Analysis in Tableau

Continuous or discrete?

Continuous time model

  • Used when data is measured continuously and not at fixed intervals (e.g. stock prices)
  • These models take into account the exact time interval between measurements

Discrete time model

  • Used when data is measured and recorded at specific intervals (e.g. daily rainfall)
  • Does not take into account the time intervals between measurements

An image showing a visualization of a continuous time series

An image showing a visualization of a discrete time series

Time Series Analysis in Tableau

Formatting date time

  • Common date time formatting functions include:
- DATENAME()
- DATEPART()
- DATETRUNC()
  • Formatting functions are focused on manipulating the datetime string to suit the granularity of interest. (e.g. year to quarter)
Time Series Analysis in Tableau

Exploring date time

  • Common date time exploration functions include:
- DATEDIFF() 
- DATEADD()
  • Exploration functions are focused on calculations using the time series data explicitly (i.e. days between customer purchases)
Time Series Analysis in Tableau

The dataset - Citibike data

Time Series Analysis in Tableau

Let's practice!

Time Series Analysis in Tableau

Preparing Video For Download...