Hide menu

Treemap here applied to Statistical Data


Treemap logo

Treemap visualization is available in MDim eXplorer. You can import your own data and explore in this application:


Hierarchical data is often visualized as data dense Treemap layouts  which fill the screen efficiently without empty space between data items. Rectangles are created in a visual order that matches the input to a treemap algorithm where dense layouts recursively subdivide space at each level in a hierarchy and child nodes are placed inside their parents. Each data item is considered to be a node and can have labels and statistical attributes encoded as relative object size or colour. Treemaps provide spatial area for nodes under the same parent and visually emphasize the sizes of, in our application below, “world population statistics” (Total, ages 0-14, ages 15-64, etc.) from the World dataBank organized at two different hierarchical levels in the world statistical data hierarchy (Continent and Human Development Interface HDI).  In the data table below - "Continent" and "HDI" represents categorical data - two groupings of things that are alike, but not ranked, ordered or numbered. Both categorical variables can be applied in a world statistical data treemap as hierarchies "world-continent-country" or "world-HDI-country".


World Statistics HDI treemap with data


Figure: Each data item (row in Excel) is a country that is represented by a rectangle. The rectangles have sizes, with its area propotional to a quantity measure representing the selected variable. For example, in the example above, for each data item "Country", the size of the area corresponds to "Total Population" (the number of people living in the country). The measures sum up along the hierarchical structure of the data. The sum of all the elements in one branch (countries with the same HDI level) represent the sum to the value of the branch as a whole (total population in the branch). China is therefore here the biggest rectangle followed by India. The treemap is organized in a hierarchy World,  "Human Development Interface HDI" (Very High HDI, High HDI, Medium High HDI and Low HDI) and Country. The colour represents the variable  "Fertility Rates" (average number of births per woman in the country) and is classified in a given colour scale (see colour scale above) with associate class limits. We see a very strong correlation between "Low HDI" and high Fertility Rates. A demonstrator Story is available at: http://mitweb.itn.liu.se/GAV/mdim/#story=1 produced with MDim eXplorer


World Statistics hierarchical structure


The treemap method visualizes hierarchical data by using nested rectangles, each one covering an area proportional to the value used as variable so that larger values result in larger and more prominent rectangles. The rectangles are also known as cells and are further categorized as branch nodes or leaf nodes depending on whether they have children or not. Due to the concept of the treemap where the values of leaves are aggregated up through the chain of its ancestors, only indicators that are by nature aggregatable should be used. In this example, World - Continent - Country

In the example above we used the other categorical variable "HDI" instead of "Country". 

Labels (name of the country in the first data column) can be hard to get right and often clutter up the treemap without adding useful information. The user can interactively control the labeling in our demonstrator including showing nothing. Moving the mouse cursor over a small rectangle will show the value (here Total Population).  


In the example below, the treemap hierarchy (World-Continent-Country)  is based on the categorical indicator Continent (see table above). The framed rectangle "Africa" shows all African countries as seen in the associate small map. We also see that the fertility rates are very high in the African countries except for the island Mauritius (in blue colour) with a low value 1,5.


Treemap world

Figure: Each data item (row in Excel) is a country that is represented by a rectangle. The size of a rectangle (data item) here representing a "Country", corresponds to variable (indicator) "Total Population" and the colour represents "Fertility Rates" organized in a hierarchy representing the "Continent" (Asia, Europe, North America etc.). A demonstrator Story can be evaluated at: http://www.ncomva.se/apps/mdim/#story=5 produced with MDim eXplorer


Use the Treemap to animate changes over time

When you want to show variations in the data by changing time periods - Animation effects can dramatically help emphasize the differences over time. The rectangles that get bigger (change in Population) move to the upper left and those that shrink move down and to the right. The coloured variable "Fertility Rates"  helps the user to get an understanding of the reduction of "Fertility Rates" over the time period 1960-2010 (from dark red into blue).


World Treemap time slider

Figure: The treemap is dynamically changed when moving the time slider from 1960 to 2009


World Treemap over Time


World Treemap over Time I

Figure: Treemaps showing "Fertility Rates" in colour for countries over a time period 1960-2010. Data from the world dataBank. We see a dramatic change for countries in Asia


Summary Features for Treemap Visualization:
  • Treemap displays hierarchical (tree-structured) data as a set of nested rectangles
  • Space-filling method to display trees by hierarchically partitioning the view space
  • Nodes are vertically and horizontally partitioned by their child nodes (even levels partition vertically, odd levels partition horizontally)
  • Colour and size are used for variables attributes
  • Well suited for overview visualizations
  • Method that utilizes the screen space area very well 

Besides the usual types of interaction like brushing, filtering and selecting, a variation of zooming known as drilling is implemented. This allows for a closer look into a branch of interest for further analysis. Drilling down can be done in a multitude of ways; the simplest is by double-clicking on any leaf or doing the same on the header of a branch, and it can also be done using the bread crumb navigation bar. 

Treemap visualization based on European statistical regional NUTS2 data

Treemap Demonstrator

This European treemap visualization  shows hierarchies in which the rectangular screen space is divided into about 1000 European NUTS2 regions. Each region belongs to a country in the hierarchy. This colourful presentations accommodates thousands of statistical data items in a meaningfully organized display allowing patterns and exceptions to be spotted immediately. The size of the rectangle refers to "Total Population" while the colour attribute represents elderly population in Europe "age group 65+ in %".  

When the colour and size dimensions are correlated in some way with the tree structure, one can often easily see patterns that would be difficult to spot in other ways, such as if a certain colour is particularly relevant. We see that Germany has a high rate of eldery people while, for example, Poland has a younger representation 

Dashboard Demonstrator: http://mitweb.itn.liu.se/GAV/dashboard/#story=data/nuts-regions-ageing-population-in-europe-2010.xml&layout=[map,treemap]

Another advantage of the treemap below is that, by construction, it makes efficient use of space and can display thousands of items on the screen simultaneously.


Europe NUTS2 Statistics in TreemapFigure: Treemap visualization showing "Elderly population in Europe for NUTS2 regions". Coloured rectangles represent the ratio of elderly people ("age group 65 and above") population. The size of each rectangle in the Treemap represents the "Total Population".

We know that the EU population is getting progressively older as a result of a significant and continuous increase in life expectancy at birth, combined with low fertility rates and the entry into retirement of the post-World War II baby-boom generation. The linked and coordinated treemap and choropleth map below presents information for the 270 NUTS2 regions in the EU with the highest and lowest shares of elderly persons (aged 65 and above) and their respective populations in 2012.

Coordinated Map and Treemap visualization based on European statistical regional NUTS2 data

It is safe to say that a geographical choropleth map representation is more intuitive for most people to interpret than the treemap is. The geographical patterns that are lost in the treemap also show up, with Germany having very large increases in the number of senior citizens mainly in the south-eastern regions. However, this perceived clarity does come at a cost. The maps only visualize one indicator of interest (elderly population) and all information about absolute population size is lost. Linking and coordinating (when you click in a rectangle the corresponding region is highlighted in the map and revers). Sweden is represented by a huge geographical map with large dominating red regions while in the corresponding rectangle these regions are with low population are small. Stockholm, however, is represented by a larger area in the treemap.

Europe NUTS2 Regions Map and Treemap IIFigure: Linked treemap and choropleth map showing the ratio of elderly ("age group 65 and above") population  in the European 270 NUTS2 regions. The colour of each region represents the percentage of the total population that falls within the 65+ age group. The size of each rectangle in the treemap represents the "Total Population".The additional information provided by the treemap that the choropleth map lacks is all based on the introduction of a second indicator; in this case the size of each region’s population. For instance, it becomes apparent that despite that Sweden is the third largest of the included countries measured in physical area, it only has a population of nine million – Compare, for example, with region Dusseldorf (five million) or Paris ile de France (twelve million).



Swedish Sales Management Data visualized in an interactive Treemap Vislet with Storytelling

The EXCEL data was imported into MDim eXplorer. TreemapThe interactive image (Vislet in flash) analyses sales management data in an example produced with MDIM eXplorer. 

Sales treemap with EXCEL

Figure: MDim eXplorer imports hierarchical sales management EXCEL data. A treemap coordinated with a bar chart is used to explore the data. See interactive picture (Vislet in Flash) or use the blog link: Use the snapshots in the storytelling panel below to navigate the picture. 











Page manager: mikael.jern@liu.se
Last updated: 2016-10-29