Tree Map
Learn what a tree map is and how this space-filling visualization displays hierarchical data using nested rectangles.
Tree Map: Space-Filling Visualization Showing Hierarchical Proportions
What Is a Tree Map?
A Tree Map (treemap) is a type of data visualization that displays hierarchical data using nested rectangles. The entire chart is a large rectangle representing the whole dataset, and it is subdivided into smaller rectangles for each sub-category (or “branch”) of the hierarchy. The size of each rectangle is typically proportional to a quantitative value (such as revenue, file size, population, etc.) for that category. In essence, a treemap lets you visualize parts-of-a-whole while also showing the structure of the hierarchy.
How Treemaps Work:
Imagine you have data about a company’s revenue broken down by division, and within each division by product. A treemap would allocate an area for each division proportional to its revenue, and inside each division’s rectangle, it would draw smaller rectangles for each product proportional to that product’s revenue. The result is a mosaic-like chart: larger rectangles mean bigger values. Often color is used in treemaps to add a second dimension – for example, color might indicate growth (green for growing categories, red for declining), or maybe category type. When color and size are combined effectively, patterns jump out (you might quickly spot if an entire region is one color, indicating a trend, or if one category dominates the area).
Key Features and Advantages:
Hierarchical Representation: Treemaps excel at showing hierarchical (tree-structured) data. They are essentially a visual breakdown of a tree structure into rectangles. Each level of the hierarchy is represented by a nesting level. This makes it easy to see, for example, how sub-categories contribute to a parent category’s total.
Proportional Area: The area of each rectangle corresponds to the value of that data point relative to the whole. This gives an immediate visual sense of which items are the largest or most important. For instance, in a treemap of market share by company, the largest rectangle would represent the company with the highest market share.
Space-Efficient Overview: Treemaps are a space-filling visualization. They make very efficient use of space to display many items simultaneously. Even if you have dozens or hundreds of categories and sub-categories, a treemap can show all of them in one view. This allows you to legibly display thousands of items on the screen at once, something other chart types struggle with.
Pattern Discovery: Because all the data is in one view, you can spot patterns like clustering of colors or outliers easily.
Common Use Cases:
Treemaps are popular for any situation where we have hierarchical data with quantitative values. Some classic examples include:
File/System Visualization: Treemaps were originally popularized for visualizing disk space usage.
Financial Portfolio or Stock Market Maps: A treemap of the stock market where each rectangle is a publicly traded company, sized by market capitalization and colored by stock performance (green/red).
Budget or Spending Breakdown: Showing how much each department contributes to the total.
Survey or Population Data: Showing population segments.
Business Metrics: An e-commerce site might use a treemap to show product categories by sales.
Interpreting a Treemap:
When looking at a treemap, bigger rectangles = bigger values. The nesting (visual containment) indicates hierarchy. It often helps that treemaps have labels on the larger sections and sometimes tooltips or interactive zoom for detailed views. One challenge is that if there are many very small segments, their labels might not fit or be legible. Interactive treemaps often allow zooming into a section or hovering to get more info on tiny pieces. Limitations: Treemaps are not ideal for exact comparisons. They are best for a high-level overview and relative comparison. If the data isn’t naturally hierarchical, a treemap might not be the best choice. In summary, a tree map is a powerful visualization for hierarchical data, compressing an entire tree of information into a single view where the size of each part is immediately evident. It leverages area and sometimes color to convey multiple dimensions of information. Treemaps answer questions like “which categories are largest/smallest?” and “how is the whole divided among parts?” very well. Just by glancing at a treemap, you can grasp the big picture of hierarchical proportions in your data.
