Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Tableau 10 Business Intelligence Cookbook

You're reading from   Tableau 10 Business Intelligence Cookbook Create powerful, effective visualizations with Tableau 10

Arrow left icon
Product type Paperback
Published in Nov 2016
Publisher Packt
ISBN-13 9781786465634
Length 476 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Donabel Santos Donabel Santos
Author Profile Icon Donabel Santos
Donabel Santos
Paul Banoub Paul Banoub
Author Profile Icon Paul Banoub
Paul Banoub
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Basic Charts 2. Advanced Charts FREE CHAPTER 3. Interactivity 4. Dashboards and Story Points 5. Maps and Geospatial Visualization 6. Analytics 7. Data Preparation A. Calculated Fields Primer B. Resources Index

Creating a tree map

Tree maps represent part-to-whole and hierarchical relationships using a series of rectangles. The sizes and colors of rectangles will vary based on the values they represent. Typically, the larger rectangles, or rectangles with most concentrated colors, depict the highest values.

In this recipe, we will represent the 2015 world population as a tree map.

Creating a tree map

Getting ready

To follow this recipe, open B05527_01 – STARTER.twbx. Use the worksheet called Tree Map, and connect to the Data (Modified Gapminder Population) data source.

Getting ready

How to do it...

The following are the steps to create the population tree map:

  1. From Dimensions, drag Year to the Filter shelf. This will open a new window for the filtering options.
  2. Under the General tab, while Select from list radio button option is selected, type 2015 in the search text box to find this value from the list of years, and check it.
    How to do it...
  3. From Measures, drag Population to Size in the Marks card.
  4. From Dimensions, drag Region to Color in the Marks card.
  5. From Dimensions, drag Country to Text in the Marks card.
  6. From Measures, drag Population to Text in the Marks card.
  7. Click on the drop-down arrow beside the color legend card and choose Edit colors….
  8. Choose the Color Blind 10 palette and click on Assign Palette. Click on OK when done.
  9. Click on Label in the Marks card, and select the ellipsis button under Label Appearance to modify the style of the text.
  10. Adjust the label so Country is shown with a larger font, and population appears underneath it with a smaller font.

How it works...

A tree map allows us to present a part-to-whole relationship, just like a pie chart, but by subdividing a rectangle into smaller areas rather than subdividing a circle into different angled slices.

In Tableau, when you place a measure onto Size and a dimension onto either Color, Label, or Detail—or any combination thereof—the rectangle is broken down into smaller rectangles.

How it works...

In this scenario, Tableau actually automatically assigns the Square mark. Although under Marks you will see Automatic, the icon refers to a Square. If you leave this as Automatic, or change the Mark explicitly to Square, you will get the same tree map.

There's more...

Pie charts get a bad reputation because angles and slices are not easy to compare. Bubble charts are also hard to compare, because it is also hard to compare diameters and circumferences. Guess what, tree maps also fall into this same category. It is also not easy nor natural for us humans to discern and compare one area to another. Can we tell how much bigger or smaller one rectangle is compared to another? However, as with the other charts, with the right intent, audience, and story, this could be an effective chart—either by itself, or as a complementary chart to another.

See also

  • Please refer to the Creating a Pie Chart recipe in this chapter
lock icon The rest of the chapter is locked
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.
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 $19.99/month. Cancel anytime
Banner background image