Creating Multivariate Charts

Over 70 recipes for creating visual stories with your data using Tableau

(For more resources related to this topic, see here.)

With increasing number of variables, any analysis can become challenging and any observations harder; however, Tableau simplifies the process for the designer and uses effective layouts for the reader even in multivariate analysis. Using various combinations of colors and charts, we can create compelling graphics that generate critical insights from our data. Among the charts covered in this article, facets and area charts are easier to understand and easier to create compared to bullet graphs and dual axes charts.

Creating facets

Facets are one of the powerful features in Tableau. Edward Tufte, a pioneer in the field of information graphics, championed these types of charts, also called grid or panel charts; he called them small multiples. These charts show the same measure(s) across various values of one or two variables for easier comparison.

Getting ready

Let's use the sample file Sample – Coffee Chain (Access). Open a new worksheet and select Sample – Coffee Chain (Access) as the data source.

How to do it...

Once the data file is loaded on the new worksheet, perform the following steps to create a simple faceted chart:

  1. Drag-and-drop Market from Dimensions into the Columns shelf.
  2. Drag-and-drop Product Type from Dimensions into the Rows shelf.
  3. Drag-and-drop Profit from Measures into the Rows shelf next to Product Type.
  4. Optionally, you can drag-and-drop Market into the Color Marks box to give color to the four bars of different Market areas. The chart should look like the one in the following screenshot:

How it works...

When there is one dimension on one of the shelves, either Columns or Rows, and one measure on the other shelf, Tableau creates a univariate bar chart, but when we drop additional dimensions along with the measure, Tableau creates small charts or facets and displays univariate charts broken down by a dimension.

There's more...

A company named Juice Analytics has a great blog article on the topic of small multiples. This article lists the benefits of using small multiples as well as some examples of small multiples in practice. Find this blog at http://www.juiceanalytics.com/writing/better-know-visualization-small-multiples/.

Creating area charts

An area chart is an extension of a line chart. The area chart shows the line of the measure but fills the area below the line to emphasize on the value of the measure. A special case of area chart is a stacked area chart, which shows a line per measure and the area between the lines is filled. Tableau's implementation of area charts uses one date variable and one or more measures.

Getting ready

Let's use the sample file Sample – Superstore Sales (Excel). Open a new worksheet and select Sample – Superstore Sales (Excel) as the data source.

How to do it...

Once the data is loaded on the new worksheet, perform the following steps to create an area chart:

  1. Click on the Show Me button to bring the Show Me toolbar on the screen.
  2. Select Order Date from Dimensions and Order Quantity from Measures by clicking and holding the Ctrl key.
  3. Click on Area charts (continuous) from the Show Me toolbar.
  4. Drag-and-drop Order Date into the Columns shelf next to YEAR(Order Date.
  5. Expand YEAR(Order Date), seen on the right-hand side, by clicking on the plus sign.
  6. Drag-and-drop Region from Dimensions into the the Rows shelf to the left of SUM(Order Quantity). The chart should look like the one in the following screenshot:

How it works…

When we added Order Date for the first time, Tableau, by default, aggregated the date field by year; therefore, we added Order Date again to create aggregation by quarter of the Order Date. We also added Region to create facets on the regions that provide trends of order quantity over time.

There's more...

A blog post by visually, an information graphics company, discusses the key differences between line charts and area charts. You can find this post at http://blog.visual.ly/line-vs-area-charts/.

Creating bullet graphs

Stephen Few, an information visualization consultant and author, designed this chart to solve some of the problems that the gauges and meters type of charts poses. Gauges, although simple to understand, take a lot of space to show only one measure. Bullet graphs are a combination of the bar graph and thermometer types of charts, and they show a measure of interest in the form of a bar graph (which is the bullet) and target variables.

Getting ready

Let's use the sample file Sample – Coffee Chain (Access). Open a new worksheet and select Sample – Coffee Chain (Access) as the data source.

How to do it...

Once the data is loaded on the sheet, perform the following steps to create a bullet graph:

  1. Click on the Show Me button to bring the Show Me toolbar on the screen.
  2. While holding the Ctrl key, click on Type and Market from Dimensions and Budget Sales and Sales from Measures.
  3. Click on the bullet graphs icon on the Show Me toolbar.
  4. Right-click on the x axis (the Budget Sales axis) and click on Swap Reference Line Fields. The final chart should look like the one in the following screenshot:

How it works...

Although bullet graphs maximize the available space to show relevant information, readers require detailed explanation as to what all the components of the graphic are encoding. In this recipe, since we want to compare the budgeted sales with the actual sales, we had to swap the reference line from Sales to Budget Sales. The black bar on the graphic shows the budgeted sales and the blue bar shows the actual sales. The dark gray background color shows 60 percent of the actual sales and the lighter gray shows 80 percent of the actual sales. As we can see in this chart, blue bars crossed all the black lines, and that tells us that both the coffee types and all market regions exceeded the budgeted sales.

There's more...

A blog post by Data Pig Technologies discusses some of the problems with the bullet graph. The main problem is intuitive understanding of this chart. You can read about this problem and the reply by Stephen Few at http://datapigtechnologies.com/blog/index.php/the-good-and-bad-of-bullet-graphs/.

Creating dual axes charts

Dual axes charts are useful to compare two similar types of measures that may have different types of measurement units, such as pounds and dollars. In this recipe, we will look at the dual axes chart.

Getting ready

Let's use the same sample file, Sample – Coffee Chain (Access). Open a new worksheet and select Sample – Coffee Chain (Access) as the data source.

How to do it...

Once the data is loaded on the sheet, perform the following steps to create a dual axes chart:

  1. Click on the Show Me button to bring the Show Me toolbar on the screen.
  2. While holding the Ctrl key, click on Date, Type, and Market from Dimensions and Sales and Budget Sales from Measures.
  3. Click on the dual line graph icon on the Show Me toolbar.
  4. Click-and-drag Market from the Rows shelf into the Columns shelf.
  5. Right-click on the Sales vertical axis and click on Synchronize Axis. The chart should look like the one shown in the following screenshot:

How it works...

Tableau will create two vertical axes and automatically place Sales on one dual axes charts vertical axis and Budget Sales on the other. The scales on both the vertical axes are different, however. By synchronizing the axes, we get the same scales on both axes for better comparison and accurate representation of the patterns.

Creating Gantt charts

Gantt charts are most commonly used in project management as these charts show various activities and tasks with the time required to complete those tasks. Gantt charts are even more useful when they show dependencies among various tasks. This type of chart is very helpful when the number of activities is low (around 20-30), otherwise the chart becomes too big to be understood easily.

Getting ready

Let's use the sample file Sample – Superstore Sales (Excel). Open a new worksheet and select Sample – Superstore Sales (Excel) as the data source.

How to do it...

Once the data is loaded, perform the following steps to create a Gantt chart:

  1. Click on Analysis from the top menu toolbar, and if Aggregate Measures is checked, click on it again to uncheck that option.
  2. Click on the Show Me button to bring the Show Me toolbar on the screen.
  3. While holding the Ctrl key, click on Order Date and Category (under Products) from Dimensions and Time to Ship from Measures.
  4. Click on the Gantt chart icon on the Show Me toolbar.
  5. Drag-and-drop Order Date into the Filters pane.
  6. Select Years from the Filter Field [Order Date] options dialog box and hit Next.
  7. Check 2012 from the list and hit OK.
  8. Right-click on YEAR(Order Date) on the Columns shelf and select the Day May 8, 2011 option.
  9. Drag-and-drop Order Date into the Filters pane.
  10. Select Months from the Filter Field [Order Date] options dialog box and hit Next.
  11. Check December from the list and hit OK.
  12. Drag-and-drop Region from Dimensions into the Color Marks input box.
  13. Drag-and-drop Region from Dimensions into the Rows shelf before Category. The generated Gantt chart should look like the one in the following screenshot:

How it works...

Representing time this way helps the reader to discern which activity took the longest amount of time. We added the Order Date field two times in the Filters pane to first filter for the year 2012 and then for the month of December. In this recipe, out of all the products shipped in December of 2012, we can easily see the red bars for the West region in the Office Supplies category is longer, suggesting that these products took the longest amount of time to ship.

There's more...

Andy Kriebel, a Tableau data visualization expert, has a great example of Gantt charts using US presidential data. The following link shows the lengths of terms in office of Presidents from various parties: http://vizwiz.blogspot.com/2010/09/tableau-tip-creating-waterfall-chart.html

Creating heat maps

A heat map is a visual representation of numbers in a table or a grid such that the bigger numbers are encoded by darker colors or bigger sizes and the smaller numbers by lighter colors or smaller sizes. This type of representation makes the reader's pattern detection from the data easier.

Getting ready

Let's use the same sample file, Sample – Superstore Sales (Excel). Open a new worksheet and select Sample – Superstore Sales (Excel) as the data source.

How to do it...

Once the data is loaded, perform the following steps to create a heat map chart:

  1. Click on the Show Me button to bring the Show Me toolbar on the screen.
  2. While holding the Ctrl key, click on Sub-Category (under Products), Region, and Ship Mode from Dimensions and Profit from Measures.
  3. Click on the heat maps chart icon on the Show Me toolbar.
  4. Drag-and-drop Profit from Measures into the Color Marks box. The generated chart should look like the one in the following screenshot:

Summary

When we created the chart for the first time, Tableau assigned various sizes to the square boxes, but when we placed Profit as a color mark, red was used for low amounts of profit and green was used for higher amounts of profit. This made spotting of patterns very easy. Binders and Binder Accessories, shipped by Regular Air in the Central region, generated very high amounts of profit and Tables, shipped by Delivery Trucks in the East region, generated very low amounts of profit (it actually created losses for the company).

Resources for Article:


Further resources on this subject:


Books to Consider

FusionCharts Beginner’s Guide: The Official Guide for FusionCharts Suite
$ 26.99
Zen Cart: E-commerce Application Development
$ 15.00
Windows Server 2003 Active Directory Design and Implementation: Creating, Migrating, and Merging Networks
$ 18.00
comments powered by Disqus