ArticleslgStudy

mathematics

Treemapping

Treemapping is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Treemapping rather than just read about it. In short: In information visualization and computing, treemapping is a method for displaying hierarchical data using nested figures, usually rectangles. Treemaps display hierarchical (tree-structured) data as a set of nested rectangles.

Treemapping — main illustration
Treemapping — illustration

Key takeaways

  • Treemapping belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Treemapping to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Treemapping from memory before moving on to harder problems.

Reference excerpt

In information visualization and computing, treemapping is a method for displaying hierarchical data using nested figures, usually rectangles. Treemaps display hierarchical (tree-structured) data as a set of nested rectangles. Each branch of the tree is given a rectangle, which is then tiled with smaller rectangles representing sub-branches. A leaf node's rectangle has an area proportional to a specified dimension of the data. Often the leaf nodes are colored to show a separate dimension of the data. When the color 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 whether a certain color is particularly prevalent. A second advantage of treemaps is that, by construction, they make efficient use of space. As a result, they can legibly display thousands of items on the screen simultaneously.

Tiling algorithms To create a treemap, one must define a tiling algorithm, that is, a way to divide a region into sub-regions of specified areas. Ideally, a treemap algorithm would create regions that satisfy the following criteria:

A small aspect ratio—ideally close to one. Regions with a small aspect ratio (i.e., fat objects) are easier to perceive. Preserve some sense of the ordering in the input data (ordered). Change to reflect changes in the underlying data (high stability). These properties have an inverse relationship. As the aspect ratio is optimized, the order of placement becomes less predictable. As the order becomes more stable, the aspect ratio is degraded.

Rectangular treemaps To date, fifteen primary rectangular treemap algorithms have been developed:

Convex treemaps Rectangular treemaps have the disadvantage that their aspect ratio might be arbitrarily high in the worst case. As a simple example, if the tree root has only two children, one with weight 1 / n {\displaystyle 1/n} and one with weight 1 − 1 / n {\displaystyle 1-1/n} , then the aspect ratio of the smaller child will be n {\displaystyle n} , which can be arbitrarily high. To cope with this problem, several algorithms have been proposed that use regions that are general convex polygons, not necessarily rectangular. Convex treemaps were developed in several steps, each step improved the upper bound on the aspect ratio. The bounds are given as a function of n {\displaystyle n} - the total number of nodes in the tree, and d {\displaystyle d} - the total depth of the tree.

Onak and Sidiropoulos proved an upper bound of O ( ( d log ⁡ n ) 17 ) {\displaystyle O((d\log {n})^{17})} . De-Berg and Onak and Sidiropoulos improve the upper bound to O ( d + log ⁡ n ) {\displaystyle O(d+\log {n})} , and prove a lower bound of O ( d ) {\displaystyle O(d)} . De-Berg and Speckmann and van-der-Weele improve the upper bound to O ( d ) {\displaystyle O(d)} , matching the theoretical lower bound. (For the special case where the depth is 1, they present an algorithm that uses only four classes of 45-degree-polygons (rectangles, right-angled triangles, right-angled trapezoids and 45-degree pentagons), and guarantees an aspect ratio of at most 34/7.) The latter two algorithms operate in two steps (greatly simplified for clarity):

The original tree is converted to a binary tree: each node with more than two children is replaced by a sub-tree in which each node has exactly two children. Each region representing a node (starting from the root) is divided to two, using a line that keeps the angles between edges as large as possible. It is possible to prove that, if all edges of a convex polygon are separated by an angle of at least ϕ {\displaystyle \phi } , then its aspect ratio is O ( 1 / ϕ ) {\displaystyle O(1/\phi )} . It is possible to ensure that, in a tree of depth d {\displaystyle d} , the angle is divided by a factor of at most d {\displaystyle d} , hence the aspect ratio guarantee.

Orthoconvex treemaps In convex treemaps, the aspect ratio cannot be constant - it grows with the depth of the tree. To attain a constant aspect-ratio, Orthoconvex treemaps can be used. There, all regions are orthoconvex rectilinear polygons with aspect ratio at most 64; and the leaves are either rectangles with aspect ratio at most 8, or L-shapes or S-shapes with aspect ratio at most 32. For the special case where the depth is 1, they present an algorithm that uses only rectangles and L-shapes, and the aspect ratio is at most 2 + 2 / 3 ≈ 3.15 {\displaystyle 2+2/{\sqrt {3}}\approx 3.15} ; the internal nodes use only rectangles with aspect ratio at most 1 + 3 ≈ 2.73 {\displaystyle 1+{\sqrt {3}}\approx 2.73} .

Other treemaps Voronoi Treemaps based on Voronoi diagram calculations. The algorithm is iterative and does not give any upper bound on the aspect ratio. Jigsaw Treemaps based on the geometry of space-filling curves. They assume that the weights are integers and that their sum is a square number. The regions of the map are rectilinear polygons and highly non-ortho-convex. Their aspect ratio is guaranteed to be at most 4. GosperMaps based on the geometry of Gosper curves. It is ordered and stable, but has a very high aspect ratio.

History

… excerpt ends here. Continue reading the full article.

Illustrations

Treemapping: Treemap of Singapore's exports by product category, 2012. The Product Exports Treemaps are one of the most recent applications of these kind of visualizations, developed by the Harvard-MIT Observatory of Economic Complexity.
Treemap of Singapore's exports by product category, 2012. The Product Exports Treemaps are one of the most recent applications of these kind of visualizations, developed by the Harvard-MIT Observatory of Economic Complexity.
Treemapping: Hard disk space usage visualized in TreeSize, software first released in 1996
Hard disk space usage visualized in TreeSize, software first released in 1996

Worked examples

Example 1 — a first encounter with Treemapping

Start with the simplest possible case. Write down what Treemapping claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Treemapping before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Treemapping ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Treemapping

In research
Treemapping appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Treemapping in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Treemapping is common in secondary-school and first-year university syllabi. It links to neighbouring topics Infographics, Rectangular subdivisions, Statistical charts and diagrams, so understanding it makes those chapters shorter.
In everyday life
Look for Treemapping outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Treemapping in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Treemapping means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Treemapping out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Treemapping in simple terms?

In information visualization and computing, treemapping is a method for displaying hierarchical data using nested figures, usually rectangles. Treemaps display hierarchical (tree-structured) data as a set of nested rectangles.

Why does Treemapping matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Treemapping?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Treemapping.

Tags

  • Infographics
  • Rectangular subdivisions
  • Statistical charts and diagrams
  • Trees (data structures)
  • User interface techniques
  • Visualization (graphics)

Keep exploring