Get startedGet started for free

An introduction to time series

1. An introduction to time series

Welcome to this course on time series in Tableau! From the fuel prices you see everyday, to the timestamp of your post on LinkedIn - these are examples of data related to time. As a data professional, understanding the different types of time series data that exist, as well as the techniques to analyze this data will be indispensable as you build up your data analytics competencies. I’m Chris Hui, and together, we’ll tackle time series analysis from foundations such as discrete and continuous time series to more advanced concepts such as Z-Values and how we can treat our data. Let's get started.

2. What's time series data?

You're likely more familiar with time series than you think. Time series data can be defined as a sequence of observations that are taken at regular, or irregular intervals over a specified duration. This could be at a daily, weekly, monthly or even finer granularity. Examples of time series data might include everyday situations such as: The fuel price you see on your daily drive. The timestamp for your LinkedIn Post. TO the time you tag-on for your e-Bike ride. Time series is everywhere around us.

3. Univariate or multivariate?

Now with time series, you might be interested in just one variable, or multiple variables. This is known as univariate and multivariate analysis - two common types of time series analysis you will deal with. For example, you might be interested in the sales performance of a particular product, say copper; you would perform univariate analysis on the sales lifecycle of that commodity. Similarly, another example for multivariate analysis, might be that you're an analyst interested in understanding the pricing relationships between multiple commodities such as Crude Oil, Coal, and Copper. Both are powerful techniques that reveal important information depending on the context.

4. Continuous or discrete?

Previously, we've mentioned the analysis type, being univariate or multivariate. Beyond this, time series models can be classified into two main types; continuous and discrete. Continuous, as the name implies, is used when data is measured continuously and not at fixed intervals. These models take into account the exact time interval between measurements and assume that there is a continuous flow of data. For example, in the image shown we can see that the data is continuously collected on the time axis without a specified interval. Discrete on the other hand is when data is measured and recorded at specific intervals, such as daily, weekly, or monthly. Discrete models do not take into account the time interval between measurements and assume that each measurement is independent of the others. For example, in the image shown, we can see how we have specific time points where the data is measured and collected. It's important to understand whether your data is continuous or discrete, as this impacts the treatment method you'll undertake.

5. Formatting date time

There are two main types of manipulation you'll perform with time series; date time formatting and date time exploration. Often the date-time field of interest can be transformed using a combination of DATENAME(), DATEPART() and DATETRUNC() fields that you'll grow familiar with. Of the three functions we've listed above, we'll be covering each of these but pay specific attention to the flexibility of DATEPART() as it enables us to extract the year, month, day, hour, or even minute.

6. Exploring date time

Tableau also comes equipped with datetime exploration functions. Exploration functions are focused on time series calculations which reveal specific time-based insights, such as the date between customer transactions revealing the frequency a customer buys items from you. You'll need to be comfortable with both date time formatting and date time explorations as an analytics professional.

7. The dataset - Citibike data

Lastly, let’s have a look at the dataset which we will use in this chapter. We will be working with the publicly available Citibikes biking dataset, where we’ll be seeking to analyze the starting time of bike rides, the customer type and the type of bike that was ridden, amongst other ridership statistics.

8. Let's practice!

Now it's time to put your new found knowledge of time series to the test! Let's practice.