Data Science

Understanding Treemap, Heatmap and Other Map Charts

Treemap

Treemaps display hierarchical data by using nested rectangles, that is, smaller rectangles within a larger rectangle.

The Treemap Chart is intended for the visualization of hierarchical data in the form of nested rectangles. Each level of such a tree structure is depicted as a colored rectangle, often called a branch, which contains other rectangles (leaves). The space inside each of the rectangles composing treemaps is highlighted based on the quantitative value of the corresponding data point.

The main advantages of treemap charts conclude in allowing us to do the following:

  • identify the relationship between two elements of a hierarchical data structure;
  • optimize the use of space;
  • accurately display multiple elements simultaneously;
  • show ratios of each part to the whole;
  • visualize attributes by size and color coding.

In this image you have several product groups, such as Food, Vegetables, Dairy and Meet. Each product group consists of a large rectangle. You can regard the product groups as branches of the tree. Within the product groups, you will have product types or products themselves. In this case we have products such as Apples, Bananas, etc.

Today treemaps are a standard tool for visualizing financial data. The screen is divided into rectangular tiles that represent publicly traded companies. The area of a rectangle corresponds to the market capitalization of the company, and the color tells you how the stock price has changed since the previous market close.

When to use it

Use a treemap when space is constrained and you have a large amount of hierarchical data that you need to get an overview of. Treemaps should primarily be used with values that can be aggregated.

Advantages

Treemaps are economical in that they can be used within a limited space and yet display a large number of items simultaneously.

When there is a correlation between color and size in the tree structure, you are able to see patterns that would be difficult to spot in other ways, for example, when a certain color is particularly relevant.

Disadvantages

Treemaps are not good when there is a big difference in the magnitude of the measure values. Nor is a treemap the right choice when mixing absolute and relative values.

Negative values cannot be displayed in treemaps.

Heatmap

The Heat Map is a two-dimensional representation of data, in which values are encoded in colors and thus provide viewers with convenient, visualized information. Essentially, this type of chart is a data table with rows and lines denoted by different sets of categories. Each table cell can contain a numerical or logical value that determines the cell color based on a given color palette.

Due to all these peculiarities, heat maps are a convenient data visualization tool for comparing categories, using color to emphasize relationships between data values that would be much harder to understand in a simple table with numbers.

Choropleth Maps

Choropleth Maps display divided geographical areas or regions that are coloured, shaded or patterned in relation to a data variable. This provides a way to visualise values over a geographical area, which can show variation across the displayed location. When mapping quantitative data, a specific color progression should be used to depict the data properly.

Bubble Map

Bubble Maps (or proportional symbol maps) are a class of maps that use the visual variable of size to represent differences in the magnitude of a discrete, abruptly changing phenomenon, e.g. counts of people. Bubble Maps are very similar to Bubble Chart, but instead of a coordinate grid a geographic map is used.

Finance Train Subscription

Unlock full access to Finance Train and see the entire library of member-only content and resources.