Reader small image

You're reading from  Tableau Cookbook - Recipes for Data Visualization

Product typeBook
Published inDec 2016
PublisherPackt
ISBN-139781784395513
Edition1st Edition
Tools
Right arrow
Author (1)
Shweta Sankhe-Savale
Shweta Sankhe-Savale
author image
Shweta Sankhe-Savale

Shweta Sankhe-Savale is the Co-founder and Head of Client Engagements at Syvylyze Analytics (pronounced as "civilize"), a boutique business analytics firm specializing in visual analytics. Shweta is a Tableau Desktop Qualified Associate and a Tableau Accredited Trainer. Being one of the leading experts on Tableau in India, Shweta has translated her experience and expertise into successfully rendering analytics and data visualization services for numerous clients across a wide range of industry verticals. She has taken up numerous training as well as consulting assignments for customers across various sectors like BFSI, FMCG, Retail, E-commerce, Consulting & Professional Services, Manufacturing, Healthcare & Pharma, ITeS etc. She even had the privilege of working with some of the renowned Government and UN agencies as well. Combining her ability to breakdown complex concepts, with her expertise on Tableau's visual analytics platforms, Shweta has successfully trained over a 1300+ participants from 85+ companies.
Read more about Shweta Sankhe-Savale

Right arrow

Chapter 2. Ready to Build Some Charts? Show Me!

In this chapter, we will cover the following recipes:

  • Building views manually

  • Building views automatically

  • Understanding Show Me!

  • Creating a Text table

  • Creating a Highlight table

  • Creating a Heat map

  • Creating a Bar chart

  • Creating a Stacked Bar chart

  • Creating a Pie chart

  • Creating a Line chart

  • Creating an Area chart

  • Creating a Treemap

  • Creating a Packed Bubble chart

  • Creating a Word cloud

Introduction


In the previous chapter, we saw how to connect to data, got ourselves acquainted with Tableau's User Interface, and created a simple visualization. Moving forward, in this chapter we will focus on how we can visualize our data and get introduced to the various chart types in Tableau.

Tableau is a new-generation data visualization tool with a user-friendly interface, and empowers users with the ability to quickly analyze their data and instantly create rich, powerful, and interactive visualizations. We can create visualizations in Tableau by adopting the Manual approach or the Automatic approach. Let's understand both these approaches in the following sections.

Building views manually


The Manual approach in Tableau is a simple drag and drop functionality that users can adopt to build visualizations. This approach gives the users power and flexibility to decide how they want to create their views. In the following recipe, we will build some basic views using the Manual approach.

Getting ready

We can manually build a view in Tableau by dragging and dropping the Dimensions and Measures pane into the Rows or Columns shelf. We will see this approach in the following recipe, and to do this, we will continue working in the workbook named My first Tableau Workbook, which we created and saved in Chapter 1, Keep Calm and Say Hello to Tableau.

How to do it…

  1. If the workbook isn't already open, then open it by double-clicking on My first Tableau Workbook.twb by navigating to Documents | My Tableau Repository | Workbooks. Once we do this, we will see the view shown in the following screenshot:

  2. Now, to create our next visualization, create a new worksheet by right...

Building views automatically


In the previous recipe, we saw how we could use the manual Drag and Drop approach to build our visualizations. There are, however, two ways in which we can automatically create views in Tableau, and they are as follows:

  • Add to Sheet: Double-Click

  • Show Me!

In the following recipe, we will understand the Add to Sheet: Double-Click approach, which is simply the act of double-clicking on the Dimensions and Measures fields that we want to analyze.

Getting ready

We will continue working in our existing workbook, My first Tableau Workbook, and recreate the same example that we used in the previous recipe by using the Ship Mode and Sales fields. Let's see how this is done.

How to do it…

  1. To use the Double-click approach, first create a new worksheet by pressing Ctrl + M on your keyboard.

  2. Then, let us rename the sheet from Sheet 3 to Automatic approach-double-click.

  3. Next, double-click on Sales in the Measures pane, followed by double-clicking on the Ship Mode field from the Dimensions...

Understanding Show Me!


Representing data in a visual format is essential from the point of view of faster and better decision making. The only problem is that not all analysts are familiar with the graphical design principles that could help them build visualizations that can be further used for decision making.

However important an insight, if visualized unclearly, it can mar the effectiveness of the decision-making process. A visual analysis tool that can automatically show the data using the best practices of data visualization is the answer to this.

Tableau is a great data visualization tool that is intuitive and incorporates the best practices of data visualization. Among the many fascinating features of Tableau, Show Me! is one of the most powerful features and helps us visually display our data while abiding by the principles of data visualization. Depending on the selected Dimensions and Measures, the Show Me! panel gives us all the possible visualization choices. It also has an in...

Creating a Text table


It is said that a picture is worth a thousand words, and hence, instead of just looking at numbers in a grid format and trying to make sense out of them, it is always better to analyze the data visually. Having said that, there may be occasions when we are required to represent some data as numbers. This is where we can use Text tables in Tableau.

Text tables are also known as Crosstabs views and are typically used to show important numbers at a glance. They are very similar to Excel's pivot table.

Getting ready

Let's create a Text table view that shows the sales for different product categories across different regions. Let's see how we can build this.

How to do it…

  1. Create a new worksheet by pressing Ctrl + M on your keyboard. This will create a new sheet called Sheet 5. Let us rename it as Text table.

  2. Then let us drag the Region field from the Dimensions pane and drop it into the Columns shelf.

  3. Next, let us drag the Category field from the Dimensions pane and drop it into...

Creating a Highlight table


A Highlight table is actually a Text table with conditional formatting where the color of the cell will denote the value of Measure. When we create a Highlight table, we make use of colors to show values from the highest to the lowest. This is great for comparing a field's value within a row or column or even within an entire table.

Getting ready

To get started with the recipe for creating a Highlight table, we will continue working in our existing Tableau workbook. Since this is an extension of the Text table, we will first recreate the Text table in a separate sheet and continue working on it. As shown in the previous recipe, our Highlight table will show the sales for different product categories across different regions. Let's check out the steps.

How to do it…

  1. Since we are going to take up the same example as discussed in our previous recipe, let's duplicate the Text table sheet and rename it as Highlight table. We can either right-click on the Text table tab...

Creating a Heat map


In the earlier sections, we read about the Text table, which just shows numbers. Then we read about the Highlight table where we used a color in addition to the text to find out which values were high and which values were low. A Heat map is a step advanced than the Highlight table. With a Heat map, we can compare both the size and color values. In a Heat map, we can also compare two different Measures for a combination of Dimensions.

Getting ready

To create a Heat map, we will compare Sales and Profit for product categories across Regions. Let's understand how to build a Heat map.

How to do it…

  1. Create a new sheet by pressing Ctrl + M on your keyboard and rename it to Heat map.

  2. Next, let us drag Category into the Rows shelf and Region into the Columns shelf.

  3. Then we will change the mark type to Squares from the marks dropdown in the Marks shelf. Refer to the following image:

  4. Next we will Sales from the Measures pane and drop it into the Size shelf in the Marks card. Refer to...

Creating a Bar chart


Bar chart is one of the most commonly used chart type that will help us quickly compare information across various categories. In a bar chart, the height (in the case of a vertical bar chart) or the length (in the case of a horizontal bar chart) of the bar is what determines the value. They are very effective when we want to split our quantifiable data into different categories and find quick trends in the data, for example, the number of sales across different customer segments, the profit across various product categories, and so on. The bar chart in Tableau uses the Bar mark type.

Getting ready

In the following recipe, we will continue working in our existing workbook to create a bar chart that shows the sales across different regions. We will use the Sales field from the Measures pane and the Region field from the Dimensions pane. Let's see how this is done.

How to do it…

  1. We will create a new worksheet by pressing Ctrl + M on your keyboard and rename it to Bar chart...

Creating a Stacked Bar chart


A Stacked Bar chart is an extension of the bar chart where we use colors to represent additional information. These are typically used when we are trying to show a comparison within a particular category as well as across categories.

So, for example, in the previous recipe where we created a bar chart showing Sales across Region, we would additionally want to look at the performance of various product categories within a particular region and compare their performance across regions. To understand this, we will create a Stacked Bar chart.

How to do it…

  1. Let us duplicate the Bar chart sheet by right-clicking on the sheet tab of Bar chart and then selecting the Duplicate Sheet option. Refer to the following image:

  2. We will then rename the new sheet to Stacked bar chart.

  3. Next, we will drag Category from the Dimensions pane and drop it into the Color shelf in the Marks card. Refer to the following image:

How it works…

In the earlier bar chart, the Sales across Region bar...

Creating a Pie chart


Just like bar charts, pie charts too are very widely used. They are typically used to show relative proportions or percentage distributions, and the size of the slice indicates the contribution to the total value.

The pie chart in Tableau uses the Pie mark type.

Getting ready

In the following recipe, we will create a Pie chart to show the sales across different customer segments. We can create a Pie chart by selecting the necessary fields from the Dimensions and Measures fields and then selecting the Pie chart option from Show Me!. However, in the following recipe, we will build it manually using the Marks card. Let's see how this can be done.

How to do it…

  1. Create a new sheet and rename it to Pie chart.

  2. Then select Pie mark from the Marks dropdown in the Marks card. Refer to the following image:

  3. Next, let us drag Sales from the Measure pane and drop it into the Size shelf. Follow this up by dragging the Sales field again from the Measure pane and this time dropping it into...

Creating a Line chart


Another frequently used chart type is the Line chart, which is primarily used to show trends over a period of time. This chart type helps us focus on the peaks and dips in the values over a period of time.

The line chart in Tableau uses the Line mark type.

Getting ready

To understand this chart type better, let's create a Line chart to show profit for all the months over the last 4 years.

How to do it…

  1. Let us create a new sheet and rename it to Line chart.

  2. Next, we will drag Order Date from the Dimensions pane and drop into the Columns shelf.

  3. Drag Profit from the Measures pane and drop it into the Rows shelf. Refer to the following image:

  4. Next, we will click on the dropdown for the Blue pill in the Rows shelf, which says Year(Order Date), and select the Month option from the second list—not the first list, which is identical—showing Year, Quarter, Month, and so on. Refer to the following image:

  5. Once we do this, we will get the view as shown in the following image:

How it works...

Creating an Area chart


In a very simplistic way, an Area chart is a stacked line chart. It is an essentially a line chart where the space between each line and the next line is filled with a color. These charts are typically used to show the relative proportions of totals or percentage relationships. This type of chart is not the best way to show specific values along the line, but it can clearly show the total values so you can get an idea of how a dimension contributes to an overall trend.

Getting ready

The Area chart is an extension of the Line Chart and hence we will work on the line chart that we created earlier. In the Line chart recipe, we showed the profit for every month over the last four years. For the Area Chart, we will show the sales for every month over the last four years. Let's see how this is done.

How to do it…

  1. While on the Line chart sheet, let us right-click on the sheet name and select the Duplicate sheet option. We will get a new sheet; rename it to Area chart.

  2. We will...

Creating a Treemap


Treemaps are useful for representing hierarchical (tree-structured) data as a part-to-whole relationship. It shows data as a set of nested rectangles, and each branch of the tree is given a rectangle, which represents the amount of data it comprises. These can then be further divided into smaller rectangles that represent subbranches, based on its proportion to the whole.

We can show information via the color and size of the rectangles and find out patterns that would be difficult to spot in other ways. They make efficient use of the space and hence can display a lot of items in a single visualization simultaneously.

Getting ready

We will create a Treemap to show the sales and profit across various product subcategories. Let's see how to create a Treemap.

How to do it…

  1. We will first create a new sheet and rename it as Treemap.

  2. Next, we will drag Sales from the Measures pane and drop it into the Size shelf.

  3. We will then drag Profit from Measures pane and drop it into the Color...

Creating a Packed Bubble chart


A Packed bubble chart is a cluster of circles where we use dimensions to define individual bubbles, and the size and/or color of the individual circles represent measures. Bubble charts have many benefits and one of them is to let us spot categories easily and compare them to the rest of the data by looking at the size of the bubble. This simple data visualization technique can provide insight in a visually attractive format.

The Packed Bubble chart in Tableau uses the Circle mark type.

Getting ready

To create a packed bubble chart, we will continue with the same example that we saw in the Treemap recipe. In the following section, we will see how we can convert the Treemap we created earlier into a Packed Bubble chart.

How to do it…

  1. Let us duplicate the Tree Map sheet name and rename it to Packed Bubble chart.

  2. Next, change the marks from Square to Circle from the Marks dropdown in the Marks card. The output will be as shown in the following image:

How it works…

In...

Creating a word cloud


A word cloud is also called a Tag cloud. It is a visual representation for text data and is usually used to depict the frequently searched keywords/tags on websites. It could also be used to visualize free form text. Tags are usually single words, and the importance of each tag is shown with the font size or color. Word clouds are typically used for website analytics and text mining. Let's see how we can build a word cloud.

Getting ready

To create a word cloud, we will continue with the same example that we used in the Treemap and in the Packed Bubble chart. Let's convert the Packed Bubble chart that we created in the previous recipe into a word cloud.

How to do it…

  1. Let us duplicate the Packed Bubble chart sheet and rename the new sheet to Word cloud.

  2. Next, we will change the marks from Circle to Text from the marks dropdown in the marks card. The output will be as shown in the following image:

How it works…

Just like the Packed Bubble chart, the size of the word indicates...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Tableau Cookbook - Recipes for Data Visualization
Published in: Dec 2016Publisher: PacktISBN-13: 9781784395513
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Shweta Sankhe-Savale

Shweta Sankhe-Savale is the Co-founder and Head of Client Engagements at Syvylyze Analytics (pronounced as "civilize"), a boutique business analytics firm specializing in visual analytics. Shweta is a Tableau Desktop Qualified Associate and a Tableau Accredited Trainer. Being one of the leading experts on Tableau in India, Shweta has translated her experience and expertise into successfully rendering analytics and data visualization services for numerous clients across a wide range of industry verticals. She has taken up numerous training as well as consulting assignments for customers across various sectors like BFSI, FMCG, Retail, E-commerce, Consulting & Professional Services, Manufacturing, Healthcare & Pharma, ITeS etc. She even had the privilege of working with some of the renowned Government and UN agencies as well. Combining her ability to breakdown complex concepts, with her expertise on Tableau's visual analytics platforms, Shweta has successfully trained over a 1300+ participants from 85+ companies.
Read more about Shweta Sankhe-Savale