Tableau Scatterplot Animation

Tableau Scatter Plot Animation

In this tutorial, we will talk about how to create a Tableau scatter plot and animate it by category using autoplay. You will learn:

  • How to create a scatter plot using Tableau?
  • How to add trend lines to scatter plot?
  • How to add annotation to Tableau charts?
  • How to automatically create charts by category and autoplay the charts?

Resources for this post:

  • More tutorials on visualization
  • If you prefer the video version of the tutorial, watch the video below on YouTube.
Tableau Scatter Plot Animation – GrabNGoInfo.com

Let’s get started!

Step 1: Read Data into Tableau

Tableau provides a wide variety of options for connecting to a data source. The file types Tableau can read include Microsoft Excel, Text file, JSON file, PDF file, etc. The server types that Tableau can connect to include MySQL, Oracle, Amazon Redshift, Google Drive, etc. Please refer to my tutorial How To Connect Tableau To Google Drive for more details on Google Drive connection.

In this example, we will use the sample dataset that comes with Tableau.

To connect to the sample dataset called superstore, click Sample – Superstore under Saved Data Sources.

Tableau Sample Data – GrabNGoInfo.com

Step 2: Create Tableau Scatter Plot

We would like to create a scatter plot to understand how sales changes with the quantity

Step 2.1: Drag Quantity to Columns and Sales to Rows, and you will see one data point on the chart.

Tableau Scatter Plot – GrabNGoInfo.com

Step 2.2: Drag Order Date to Detail, and change Year to Day that represents the individual dates.

Tableau Scatter Plot Date – GrabNGoInfo.com

After changing to Day, each circle represents the sales and quantity of a single day.

Step 2.3: Click the downward arrow next to Automatic and select Circle.

Step 2.4: Drag Region to Color. We can see that the scatter plot now has four colors, and each color represents one region.

Tableau Scatter Plot by Category – GrabNGoInfo.com

Step 2.5: Click the Color card and change Opacity from 100% to 50%. Now we can see the overlapping circles.

Tableau Scatter Plot Change Opacity – GrabNGoInfo.com

Step 2.6: Drag Distinct to Size and we can see the circles of different sizes. A larger size means a bigger discount and a smaller size means a smaller discount.

Tableau Scatter Plot Bubble Size – GrabNGoInfo.com

The size of the bubble can be adjusted by dragging the slide bar in the Size card.

Tableau Scatter Plot Adjust Bubble Size – GrabNGoInfo.com

Step 3: Add Trend Line to Scatter Plot

To add trend lines to the scatter plot, right-click on the scatter plot, select Trend Lines, then Show Trend Lines.

Tableau Add Trend Line to Scatter Plot – GrabNGoInfo.com

You will see one trend line for each region.

Tableau Trend Lines with Scatter Plot – GrabNGoInfo.com

Step 4: Animate Tableau Scatter Plot

In step 4, we will animate the scatter plot by year to see how the data changes over the year.

Step 4.1: Drag Order Date to Pages.

Tableau Animate Scatter Plot by Year – GrabNGoInfo.com

Step 4.2: Right-click the chart area, then go to Annotate and select Area.

Tableau Annotate Area – GrabNGoInfo.com

Step 4.3: In the Edit Annotation popup window, type Year, then click Insert in the menu and select Page Name.

Tableau Edit Annotation – GrabNGoInfo.com

Step 4.4: Format the annotation. I increased the text size from 10 to 24.

Tableau Format Annotation – GrabNGoInfo.com

After clicking the blue OK button, we can see the year showing up on the chart, and a card for animation showing up on the right-hand side. We can move the annotation text around and change the size of the text box.

Tableau Page Annotation – GrabNGoInfo.com

Step 4.5: To remove the background of the annotation text box, right lick the annotation and select Format.

Tableau Annotation Format – GrabNGoInfo.com

A Format Annotation pane will show up on the left-hand side. Choose Shading and select None.

Tableau Format Annotation – GrabNGoInfo.com

A Format Annotation pane will show up on the left-hand side. Choose Shading and select None. and the annotation background became transparent.

Tableau Annotation Transparant Background – GrabNGoInfo.com

Step 4.6: Click the triangle to play the scatter plot by year, and select the number of bars to change speed. One bar means the speed is slow, two bars represents medium speed, and three bars represents fast speed.

Tableau Page Animation – GrabNGoInfo.com

Summary

In this tutorial, we talked about how to create a Tableau scatter plot and animate it by category using autoplay. You learned:

  • How to create a scatter plot using Tableau?
  • How to add trend lines to the scatter plot?
  • How to add an annotation to Tableau charts?
  • How to automatically create charts by category and autoplay the charts?

For more information about data science and machine learning, please check out my YouTube channel and Medium Page or follow me on LinkedIn.

Recommended Tutorials

Leave a Comment

Your email address will not be published. Required fields are marked *