Definition
Tree map is a method of displaying hierarchical data using nested figures, usually rectangles. Size and color are used to illustrate different measures – bringing to light patterns that would be difficult to spot in other ways.
Example of a treemap.
Best practices for creating a treemap in Tableau.
Always label the fields and metrics clearly.
Use color and borders conservatively to avoid cluttering the view.
Treemap is a better alternative to pie chart especially when dealing with more than three-dimension members.
Step by step guide on how to create a treemap in Tableau.
Therefore, in this article, I’ll show you how to build a simple treemap in Tableau using the Superstores dataset.
Note: The goal is to visualize the amount of Sales and Profit generated by different product Sub-Categories within the Superstores portfolio.
Step 1: Prepare the structure
This can be done in the following way;
Drag measure field Sales to the Size tab.
Drag the measure field Profit to the color tab.
Select Square under marks cards.
Note; this gives us a single square below.
Step 2: Extend the Square to all other product Sub-Category to create a tree map
This can be done by dragging dimension Sub-Category to the details tab.
Note, we can label the tree map by dragging the fields Sub-Category, Sales and Profit to the label tab.
Step 3: Add another layer of analysis
(This could be in the case where users would like to view the analysis across other category's).
This can easily be done by dragging any dimension you would like to analyze to the rows shelf. And therefore, in this case, I would like to add dimension Region in my analysis.
To effect this;
Drag dimension Region to the rows shelf.
The resulting visualization (treemap), can provide the following insights.
The West and East regions are leading in Sales. (Interpreted by the size of treemaps for each region).
The Sub-Category Chairs and Phones generated most of Sales for West, East and Central regions. (interpreted by the size of the square for each Sub-Category in the treemap).
Only two Sub-Category in the West region were unprofitable, with Central region recording seven unprofitable Sub-Categories. (interpreted using color).
Note, these are some of insights which can be drawn from this visualization. More approaches like use of filters and parameters can be applied to deliver same information to users in different ways.
Option II - how to create a treemap.
Drag dimension Sub-Category to the Rows shelf.
Drag measure field Sales and Profit to the columns shelf.
Under the 'Show Me' tab select 'treemaps'.
I hope this visualization adds to your list of best techniques of presenting data.
To receive more of the Tableau tips and tricks, kindly join our mailing list by subscribing below.
Thank you for reading.