A treemap is a data visualization that displays hierarchical data, and tree-structured data using nested rectangles of different dimensions. To each branch of the tree corresponds a rectangle, tiled with smaller rectangles representing sub-branches.
In other words, if the main category is fresh food and it is represented by a large rectangle which is the branch, the sub-category is, for example, vegetables, and smaller rectangles represent it. In this case, the sub-category corresponds to the sub-branch.
Every branch has leaves. And a leaf node’s rectangle has an area proportional to a specified dimension of the data. In addition, leaf nodes are often colored to display a separate measurement of the data.
By default, the treemap is colored by dimension, and sorting is automatic according to size.
When to use a treemap
A treemap is a good data visualization option to overview a significant amount of hierarchical data. As it also makes excellent use of space, it allows for displaying a vast number of items simultaneously. You can also use it when you need to visualize a part-to-whole relationship amongst many categorical data, but the precise comparison between categories is not relevant.
Moreover, when there is a correlation between color and size dimensions, it is easier to see those patterns that would be difficult to spot in other ways, for example, when a specific color is particularly relevant.
When not to use
Treemap may not be the best choice when one has to mix absolute and relative values. Remember that treemaps can’t show negative values. When you have a massive amount of data, consider that sometimes the treemap may not display the dimension value within a rectangle with the right color and size.
How to create a treemap on BStreams
- Add a new project
- Drag the treemap and drop it on the canvas
- Select the sample dataset
- Choose n. dimension and one metric
- Click apply to show the result
Example
The following example of the Treemap is aimed to visualize the amount of time that European people spent during a day doing various activities(categories). For the purpose of introducing the Filter feature, the final visualization has been just filtered to represent the Scandinavian countries. Notice that if you wish to use the legend feature, and also Color by dimension at the same time it’s not possible, since the Color by dimension feature allows you to differentiate each value by a different color.
Want to learn more about scatterplots? Email us at support@bstreams.io
If you haven’t checked our blog yet, give it a look and let us know what you think about it.
Read more here