Reader small image

You're reading from  Tableau 10 Business Intelligence Cookbook

Product typeBook
Published inNov 2016
PublisherPackt
ISBN-139781786465634
Edition1st Edition
Tools
Right arrow
Authors (2):
Donabel Santos
Donabel Santos
author image
Donabel Santos

Donabel Santos is a self-confessed data geek. She loves working with data, writing queries, and developing reports on her SQL Server databases, and exploring and visualizing data with Tableau. She is the principal and senior business intelligence architect at QueryWorks Solutions, a Tableau Learning and Alliance partner in Vancouver, BC, Canada, providing consulting and training services. She has spent years in consulting and has developed a variety of solutions for clients in different verticals—finance, manufacturing, healthcare, legal, higher education, and local government. Donabel is a multi-year Microsoft Data Platform MVP (previously known as SQL Server MVP) and has extensive experience in the SQL server in different areas, such as development, administration, data warehouse, reporting (SSRS), tuning, troubleshooting, XML, CLR, and integration with ERPs and CRMs using PowerShell, C#, SSIS, and Power BI. One of Donabel's passions is teaching and sharing her love for data. She is a Tableau Certified Professional and a Tableau accredited trainer, delivering Tableau public and on-site client training. She is also the lead instructor for a number of courses at British Columbia Institute of Technology (BCIT), including Applied Database Administration and Design (ADAD) and Applied Data Analytics (ADA) programs. She teaches SQL server administration, development, integration (SSIS), data warehouse foundations, and visual analytics with Tableau. Donabel has also authored three other books with Packt Publishing: SQL Server 2012 with PowerShell V3 Cookbook, PowerShell for SQL Server Essentials, and SQL Server 2014 with PowerShell V5 Cookbook. She also contributed a chapter to Manning Publications' PowerShell Deep Dives.
Read more about Donabel Santos

Paul Banoub
Paul Banoub
author image
Paul Banoub

Contacted on: 18/12/2015 for Mastering Tableau 10 [video]
Read more about Paul Banoub

View More author details
Right arrow

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.

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.

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.

  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.

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

Previous PageNext Chapter
You have been reading a chapter from
Tableau 10 Business Intelligence Cookbook
Published in: Nov 2016Publisher: PacktISBN-13: 9781786465634
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

Authors (2)

author image
Donabel Santos

Donabel Santos is a self-confessed data geek. She loves working with data, writing queries, and developing reports on her SQL Server databases, and exploring and visualizing data with Tableau. She is the principal and senior business intelligence architect at QueryWorks Solutions, a Tableau Learning and Alliance partner in Vancouver, BC, Canada, providing consulting and training services. She has spent years in consulting and has developed a variety of solutions for clients in different verticals—finance, manufacturing, healthcare, legal, higher education, and local government. Donabel is a multi-year Microsoft Data Platform MVP (previously known as SQL Server MVP) and has extensive experience in the SQL server in different areas, such as development, administration, data warehouse, reporting (SSRS), tuning, troubleshooting, XML, CLR, and integration with ERPs and CRMs using PowerShell, C#, SSIS, and Power BI. One of Donabel's passions is teaching and sharing her love for data. She is a Tableau Certified Professional and a Tableau accredited trainer, delivering Tableau public and on-site client training. She is also the lead instructor for a number of courses at British Columbia Institute of Technology (BCIT), including Applied Database Administration and Design (ADAD) and Applied Data Analytics (ADA) programs. She teaches SQL server administration, development, integration (SSIS), data warehouse foundations, and visual analytics with Tableau. Donabel has also authored three other books with Packt Publishing: SQL Server 2012 with PowerShell V3 Cookbook, PowerShell for SQL Server Essentials, and SQL Server 2014 with PowerShell V5 Cookbook. She also contributed a chapter to Manning Publications' PowerShell Deep Dives.
Read more about Donabel Santos

author image
Paul Banoub

Contacted on: 18/12/2015 for Mastering Tableau 10 [video]
Read more about Paul Banoub