Showing posts with label tree maps. Show all posts
Showing posts with label tree maps. Show all posts

04 August 2024

📊Graphical Representation: Graphics We Live By (Part X: Pie and Donut Charts in Power BI and Excel)

Graphical Representation Series
Graphical Representation Series

Pie charts are loved and hated by many altogether, and there are many entitled reasons to use them and avoid them, though the most important criteria to evaluate them is whether they do the intended job in an acceptable manner, especially when compared to other representational means. The most important aspect they depict is the part to whole ratio, which even if can be depicted by other graphical tools, few tools are efficient in representing it. 

The pie chart works well as a visualization tool when it has only 3-5 values that are easily recognizable in the visualization, however as soon the size or the number of pieces vary considerably, the more difficult it is to visualize and interpret them, in case their representation has more negative than positive effects. There are many topics that form something like a long tail - the portion of the distribution having many occurrences far from the head or beginning. Displaying the items from the long tail together with the other components together can totally obscure the distribution of the items from the long tail as they become unrecognizable in the diagram. 

One approach to handle this is to group all the items from the long tail together under a piece (e.g. Other) and use a second form of representation to display them separately. For example,  Microsoft Excel offers a way to zoom in the section of a pie chart with small percentages by displaying them in a second pie chart (pie of pie) or bar chart (bar of pie), something like a "zoom in" perspective (see image below). Unfortunately, the feature seems to limit itself only to small percentages, and thus can't be used currently to offer a broader perspective. Ideally, it would be useful to zoom in on any piece of the pie, especially when the items are categorized as a hierarchy with two or even more levels. 


Unfortunately, even modern visualization tools offer limited features in displaying this kind of perspective into a flexible unitary visualization, and thus users are forced to use their creativity in providing proper solutions. In the below example the "Renewables" piece of pie is further broken down into several components of a full pie, an ensemble supposed to function as a single form of representation. With a bit of effort, the reader probably will understand the meaning behind the two pie charts, however the encoding of colors and other elements used are suboptimal in the decoding process. 

Pie Charts - Original Solution

In the above example, the arrow may suggest that in between the two donut charts exists a relationship, reflected also in the description provided, however the readers may still have difficulties in correctly interpreting the diagrams, especially when there's some kind of overlapping or other type of implied or unimplied resemblance. If the colors overlap or have other similarities, are they intentional? If the circles have the same size, does this observed resemblance have a meaning? The reader shouldn't bother himself with this type of questions, but see the resemblance and the meaning of the various elements with a minimum of effort while decoding a chart's elements. Of course, when the meaning is not clear, some guidance should be ideally provided!

Unfortunately, Power BI doesn't seem to have a similar visual like the one from Excel yet, however with a bit of effort one can obtain similar results, even if there are other minor or important limitations. For example, the lines between the two pie charts can't be drawn, so one is forced to use other encodings to show that there's a connection between the Renewable slice and the small pie chart. Moreover, the ensemble thus created isn't treated unitary and handled accordingly. Frankly, the maturity of a graphical representation environment can and should be judged also from this perspective!

The below representation built in Power BI uses a few tricks to display two pie charts together. The smaller pie chart representing the breakdown and pieces' colors are variations of parent's color, attempting to show that there's a relationship between the slice from the first chart and the pie chart with the details. Unfortunately, it wasn't possible to use similar lines like in Excel to show the relation between the two sections. 

Pie of Pie in Power BI

Instead of a pie chart, one can use a donut, like in the original representation. Even if the donut uses a smaller area for representation, in theory the pie chart offers a better basis for comparisons, at least in theory. Stacked column charts can be used as well (see C), however one loses the certainty that the pieces must add up to 100%. Further limitations can appear when one wants to achieve more with the visualizations.

Custom charts can be used as well. The pie chart coming from xViz (see D) allows to increase the size of a pie piece by using another radius, technique which could be used to highlight the piece represented in the second chart. Frankly, sunburst diagrams (see E) are better at representing the parent to child proportions, where the same color encoding has been used. Unfortunately, the more information is shown, the more loaded the visualization seems to be.

Pie of Pie Alternatives in Power BI I

A treemap can prove to be a better representation alternative because it encodes proportions in a unitary way, much like pie charts do, though it takes more space if one wants to make the labels visible. Radial charts (see G) and Aster plots (see I) can be occasionally better choices, especially because they use less space as they display only the main categories. A second diagram chart can be used to display the subcategories, much like in A and B. Sankey charts (see H) can be used as well, even if they don't allow representing any quantitative values unless one encodes them directly in the labels. 

Pie of Pie Alternatives in Power BI II

When one dives into the world of diagrams and goes behind the still limited representational choices provided by the standard tools, one can be surprised by the additional representational choices. However, their appropriateness should be considered against readers' skillset to read and interpret them! Frankly, the alternatives considered above could be a better choice when they will reach a representational maturity. 

Many thanks to Christopher Chin, who in his weekly post on data visualization blunders, suggested the examples used as basis for this post (see [1])!

Previous Post <<||>> Next Post

References:
[1] LinkedIn (2024) Christopher Chin's post (link)

12 December 2006

✏️Manuel Lima - Collected Quotes

"A variation of the radial tree, the hyperbolic tree is a more recent, computeraided visualization generated with advanced algorithms. While radial trees tend to graphically treat all nodes and their respective linkages in a similar way by using linear geometry, hyperbolic trees use a 'focus and context' technique that emphasizes a given set of nodes by centering and enlarging them while giving less prominence to other dependencies, making them progressively smaller and closer to the periphery." (Manuel Lima, "The Book of Trees: Visualizing Branches of Knowledge", 2014)

"Even though hyperbolic trees employ the same ranking principle as radial trees, based on a series of concentric circles, they do not operate in conventional Euclidean space, but instead within a spherical negative curvature based on hyperbolic geometry. Due to their magnifying feature, hyperbolic trees are useful for displaying and manipulating large hierarchies on a limited screen size. As visualizations ideally suited for direct manipulation, hyperbolic trees are rarely depicted in print and are found almost exclusively within the confines of their natural digital domain." (Manuel Lima, "The Book of Trees: Visualizing Branches of Knowledge", 2014)

"Circles are among the most ubiquitous symbols around the globe, used in countless variations since the birth of humankind. Associated with notions of unity, wholeness, and infinity, the circle has been an important visual metaphor in a wide array of systems of thought, from cartography and astronomy to physics and geometry. " (Manuel Lima, "The Book of Trees: Visualizing Branches of Knowledge", 2014)

"Even though its recursive composition is similar to rectangular treemaps, the Voronoi treemap allows an improved sub division of a given area that avoids similar shapes and aspect ratios, by making the location and contour of individual cells highly adaptive and configurable. Due to their flexible organizational principle, Voronoi treemaps are known for their organic layouts, featuring a rich, diverse assortment of shapes and con figurations that can resemble stained glass or enthralling natural patterns. The model has wide applicability and it has proved popular in the visualization of file systems and genome data." (Manuel Lima, "The Book of Trees: Visualizing Branches of Knowledge", 2014)

"Even though the circular treemap’s hierarchical structure is quite explicit and its patterns may be appealing, the wasted space between its cells make it a fairly ineffective visualization technique, particularly for incorporating a large number of levels or ranks. Because of this, the model has remained somewhat experimental and hasn’t quite gained the same traction as its other treemap counterparts." (Manuel Lima, "The Book of Trees: Visualizing Branches of Knowledge", 2014)

"Horizontal trees probably emerged as an alternative to vertical trees to address spatial constraints and layout requirements, but they also provide unique advantages. The nesting arrangement of horizontal trees resembles the grammatical construct of a sentence, echoing a natural reading pattern that any one can relate to. This alternative scheme was often deployed on facing pages of a manuscript, with the root of the tree at the very center, creating a type of mirroring effect that is still found in many digital and interactive executions." (Manuel Lima, "The Book of Trees: Visualizing Branches of Knowledge", 2014)

"Horizontal trees have proved highly efficient for archetypal models such as classification trees, flow charts, mind maps, dendrograms, and, notably, in the display of files on several software applications and operating systems. If you are a computer user, there is a strong chance you have interacted with some version of a horizontal tree - perhaps on a daily basis." (Manuel Lima, "The Book of Trees: Visualizing Branches of Knowledge", 2014)

"Multidirectional trees display a flexible ordering, with hierarchical branching not rigidly structured along a vertical or horizontal axis, but instead follow ing a free-flowing configuration. From an initial root or source within the plotted area, multidirectional trees expand toward the edges of the space, moving in distinct paths and periodically bifurcating. This leads to an organic, unconfined appearance - not to be confused with unordered or disorganized." (Manuel Lima, "The Book of Trees: Visualizing Branches of Knowledge", 2014)

"Of all visualization models, vertical trees are the ones that retain the strongest resemblance to figurative trees, due to their vertical layout and forking arrangement from a central trunk. In most cases they are inverted trees, with the root at the top, emphasizing the notion of descent and representing a more natural writing pattern from top to bottom." (Manuel Lima, "The Book of Trees: Visualizing Branches of Knowledge", 2014)

"Sunbursts, also known as radial treemaps, tree rings, fan charts, or nested pie charts, are a space-filling visualization technique that uses a radial layout, as opposed to the more widespread rectangular type. Similar to radial trees, sunbursts normally start with a central root, or top level of hierarchy, with the remaining ranks expanding outward from the middle. However, instead of a node-link construct sunbursts employ a sequence of segmented rings and juxtaposed cells" (Manuel Lima, "The Book of Trees: Visualizing Branches of Knowledge", 2014)

"The most popular radial construct places the tree root, source, or origin at the very center of the diagram, with splitting ranks moving toward the circle’s periphery, aligned to a series of concentric rings. A succession of guiding rings, occasionally invisible, enhances the perception of hierarchy while providing a symmetrical sense of balance. One of the main advantages of the radial tree is its composed, optimal use of space; in opposition to vertical and horizontal trees, it can fit easily within the confines of a square. Radial trees are used extensively today, and are particularly popular for portraying genealogical and phylogenetic relationships." (Manuel Lima, "The Book of Trees: Visualizing Branches of Knowledge", 2014)

"The rectangular treemap, sometimes called the mosaic graph, is a space-filling visualization model used for displaying hierarchical data by means of nested rectangles. Each major branch of the tree is depicted as a rectangle, which is then sequentially tiled with smaller rectangles representing its subbranches. The area of each individual cell generally corresponds to a given quantity or data attri bute, for example size, length, price, time, or temperature. Color can indicate an additional quality, such as type, class, gender, or category." (Manuel Lima, "The Book of Trees: Visualizing Branches of Knowledge", 2014)

"With the adoption of a more schematic and abstract construct, deprived of realistic arboreal features, a tree diagram could sometimes be rotated along its axis and depicted horizontally, with its ranks arranged most frequently from left to right. Horizontal trees probably emerged as an alternative to vertical trees to address spatial constraints and layout requirements, but they also provide unique advantages. The nesting arrangement of horizontal trees resembles the grammatical construct of a sentence, echoing a natural reading pattern that anyone can relate to. This alternative scheme was often deployed on facing pages of a manuscript, with the root of the tree at the very center, creating a type of mirroring effect that is still found in many digital and interactive executions. Horizontal trees have proved highly efficient for archetypal models such as classification trees, flow charts, mind maps, dendrograms, and, notably, in the display of files on several software applications and operating systems." (Manuel Lima, "The Book of Trees: Visualizing Branches of Knowledge", 2014)

Related Posts Plugin for WordPress, Blogger...

About Me

My photo
Koeln, NRW, Germany
IT Professional with more than 25 years experience in IT in the area of full life-cycle of Web/Desktop/Database Applications Development, Software Engineering, Consultancy, Data Management, Data Quality, Data Migrations, Reporting, ERP implementations & support, Team/Project/IT Management, etc.