Augmenting organizational decision-making via non-space-filling and space-filling visualization techniques

Dipta Roy
DataDrivenInvestor
Published in
10 min readNov 25, 2023

--

Introduction:

In the contemporary landscape heavily reliant on data, an efficient business intelligence (BI) strategy can enhance decision-making within an enterprise by transforming unorganized data into easily understandable visual matrices. Hence, adopting a data-driven approach streamlines the real-time decision-making process. It ensures that the key performance indicators (KPIs), which serve as the visual indicators of business values in terms of actionable insights, are effectively conveyed throughout the organization [1]. In exploring both the advantages and limitations of visual data management in enhancing business decision-making, the research delves into two specific algorithms within a scalable machine learning (ML) framework. The study covers the “treegraph” as a non-space-filling method for representing hierarchical data, while also utilizing “treemaps,” a space-filling visualization technique, to portray relationships among decision-making components. Consequently, gaining a solid grasp of the tree-based algorithms offers an effective means to employ and implement other hierarchical data visualization techniques like Sunburst charts, Heatmaps, Sankey diagrams, Parallel coordinates plots, etc. [2] for amplifying organizational decision-making.

1. Tableau-based non-space filling algorithm for visual management of hierarchical data

Relational information often used to illustrate hierarchy can be grouped into space-filling and non-space-filling methods. The space-filling approach optimizes space usage through juxtaposition, mathematically known as tessellations, while the non-space-filling technique uses edges to represent relationships. In context to the above, treegraph diagrams are a common choice among non-space-filling methods for visualizing hierarchical relationships. The layout algorithm for representing hierarchical data in treegraphs is influenced by two crucial aspects: determining node positions and rendering individual nodes with connecting branches. Among various existing algorithms, Walker’s algorithm [3] is commonly used for hierarchical treegraph layouts. Walker’s algorithm arranges tree diagrams with a focus on aesthetics. It horizontally aligns nodes, maintains order, ensures symmetry, centers parents over children, and keeps subtrees consistent. The root node is positioned at the top, and x and y coordinate values determine node positions. X-coordinates are computed recursively, and the algorithm enforces minimum spacing among subtrees. It aims to position right subtrees close to left siblings while avoiding overlap, and modifiers determine the movement of subtrees. The node’s level determines the y-coordinate. The algorithm’s complexity is O(n²) for arbitrary n-ary trees, and the pseudo-code can be represented as:

Algorithm 1: Walker’s Algorithm
Require: Root has position (x co-ordinate, y co-ordinate)
Ensure: Root’s children have position (x co-ordinate, y co-ordinate)

1: function WalkerAlgorithm(root):
2: # Initialize variables for tree drawing
3: initializeTree(root)
4: # First pass: Post-order traversal
5: postOrderTraversal(root)
6: # Second pass: Pre-order traversal
7: preOrderTraversal(root)

8: function initializeTree(node):
9: # Initialize tree-specific properties
10: node.y = 0
11: node.prelim = 0
12: node.modifier = 0

13: function postOrderTraversal(node):
14: # Base case: If the node is a leaf, return
15: if node is a leaf:
16: return
17: # Traverse left subtree
18: postOrderTraversal(node.left)
19: # Traverse right subtree
20: postOrderTraversal(node.right)
21: # Calculate preliminary x-coordinate and modifier
22: calculatePrelim(node)

23: function calculatePrelim(node):
24: # Calculate preliminary x-coordinate based on children's positions
25: if node is not a leaf:
26: node.prelim = node.left.prelim + separationDistance(node.left, node.right)
27: # Calculate modifier for the node
28: node.modifier = node.prelim - midpoint(node.left.prelim, node.right.prelim)

29: function preOrderTraversal(node):
30: # Update final x-coordinate for the node
31: node.x = node.prelim + node.modifier
32: # Traverse left subtree
33: if node has a left child:
34: preOrderTraversal(node.left)
35: # Traverse right subtree
36: if node has a right child:
37: preOrderTraversal(node.right)

38: function separationDistance(leftNode, rightNode):
39: # Calculate the minimum separation distance between sibling nodes
40: return a predefined constant value

41: function midpoint(value1, value2):
42: # Calculate the midpoint between two values
43: return (value1 + value2) / 2

44: # Entry point: Call WalkerAlgorithm with the root of the tree
45: WalkerAlgorithm(root)

It is important to note that the practical implementation of Walker’s algorithm requires modifications and graphical rendering to illustrate treegraphs. Thus, directly implementing Walker’s algorithm in visual intelligence software like Tableau [4] is impossible. However, workarounds exist for implementing treegraphs and numerous online resources are available for plotting hierarchical graphs using Tableau. The steps for creating a treegraph resembling the Walker algorithm are discussed hereafter, aiming to guide the readers in implementing hierarchical diagrams using Tableau software.

Workaround: Tableau-Treegraph Algorithm

# Data preparation (offline)
1: Identify all the nodes of the treegraph
2: Identify the “Root” nodes and the “Child” nodes
3: For the root node identify the x-position and the y-position
4: For the root node identify the child nodes
5: For each child node identify the x-position and the y-position
6: Identify the separation distance in terms of x-position for the child nodes
7: Attribute a relationship between the root node and the first child node. Keep the relationship attribute the same
8: Assign a null ID value to the relationship parameter to the root node
9: Assign an ID value to the relationship parameter to the child node
10: For the next level of hierarchy, identify the child node, which will be the root node of the hierarchy
11: Iterate steps 1-9 for root/child node

# Treegarph plotting (offline)
12: Assign a parameter “Circle” for the graphical rendering of the node.
13: Assign it with the same values as y-coordinates
14: Prepare the final data table with columns as Node, ID, Relationship, LineX, LineY, Circle
15: Export the data into Tableau
16: Change the LineX, LineY, and Circle to Convert to Dimension
17: Drag LineX pill to columns
18: Drag LineY and Circle pill to rows
19: Change the type to Continuous for each pill
20: Click on the LineY pill to make it dual-axis and synchronize the axis
21: Drag the Node column to Label
22: In the Circle marks card drag the Relationship column and change the type to Line
23: Adjust the Shapes and sizes of the Nodes

For illustration, the dataset on the ‘State-wise Potential of Various Renewable Energy Technologies’ [5] is considered. The raw dataset is cluttered and does not offer actionable insights, except for some numbers. To enhance decision-making, the treegraph algorithm is implemented to provide insights into the potential of renewable energy generation across Indian states. In the hierarchical representation, India serves as the root node, states as first-level child nodes, and renewable energy technologies like Bio-Energy, Hydro Energy, and Wind Energy as second-level child nodes. The second-level child nodes are further drilled down to provide clearer insights. For instance, within Wind Energy, Wind Power is represented as a third-level child node. Similarly, in Hydro Energy, Small Hydro Power is represented as a third-level child node. For second-level root node Bio-Energy, Biomass Power, Bagasse Cogeneration, and Waste to Energy are represented as third-level child nodes. The comprehensive breakdown offers a clear understanding of renewable energy resources and their key components across Indian states. The hierarchical distribution of various renewable energy resources in the form of a treegraph makes it easy for individuals even without technical expertise to augment well-informed decision-making. Figure 1 represents the hierarchical data visualization created using Tableau. The raw data file, the refined dataset for Tableau ingestion, and the sample workbook are shared for future reference [6].

Figure 1: Hierarchical treegraph for state-wise renewable energy technologies
Image Source: Author

Once the hierarchical structure is established the next critical step is to understand how the child nodes contribute to the parent nodes and how the part-to-whole relationship within the data can be quantified. It is where space-filling visualization techniques like Treemap play a pivotal role, which is discussed further in the upcoming section.

2. Coupling non-space-filling with space-filling techniques for enhanced decision-making

Treemaps [7] are popular for quantifying hierarchical data and representing part-to-whole relationships using nested rectangles where size represents data significance. The construction involves subdividing the initial rectangle recursively, with alternating horizontal and vertical splits at various levels that represent the leaf/child node sizes. Colors and annotations are used in tandem to add context to the data, especially for emphasizing size. The three crucial factors, in a treemap layout are rectangle placement order, aspect ratio, and view stability. Thus, algorithmically for a treemap layout, the main challenge is to recursively tessellate the rectangles to approach an aspect ratio close to 1. The task falls into NP-hard problems due to numerous possible tessellations. It leads to an approximation of results in laying out the rectangles as a perfect solution does not exist. “Squarify” [8] is a widely used algorithm for organizing child rectangles, arranging them in rows, and deciding whether to improve the current row’s layout. While it assumes optimizing aspect ratios in columns for the best layout, it is a greedy algorithm and as mentioned previously, it may not always achieve the best layout results. Orientation is another important parameter given due consideration in a treemap layout algorithm as it helps distinguish rectangles as horizontal or vertical, which aids in labeling the rectangles. Many modern treemap algorithms adopt an orientation-agnostic aspect ratio (OAAR) definition for organizing subdivisions. Squarify is the default tiling algorithm in D3 and is used in software like Excel, Tableau, and Google Charts [8]. The pseudo-code for the Squarify algorithm, considering these aspects, can be represented as:

Algorithm 2: Squarify
Require: Root has position, height, and width
Ensure: Root’s children have position, height, and width

1: function SQUARIFY (root, ratio =1)
2: if root has no children then return root
3: remainingWidth <- width of the root
4: remainingHeight <- height of the root
5: while any children left do
6: queue <- new list of nodes
7: repeat
8: take a node and add it to the queue
9: worstOARR <- calculate worst OAAR in queue in relation to ratio
10: until meanOAAR >= ratio or no children left
11: rollback last node added to queue
12: if remainingHeight > remainingWidth then
13: Dice column
14: remove row height from remainingHeight
15: else
16: Slice column
17: remove column width from remainingWidth
18: return root

Let us now try to understand how the space-filling visualization techniques, especially the treemap method can augment decision-making by establishing the part-to-whole relation of the data under investigation. Figure 2 displays the treemap visualization using the Squarified algorithm.

Figure 2: Treemap using Squarified algorithm illustrating part-to-whole relationship for state-wise renewable energy production.
Image Source: Author

The business intelligence provided by the Tableau software post-data transformation helps us understand that each state has five sub-categories of energy production, with the area indicating their contribution to total production, depicting the part-to-whole relationships. A closer look at the treegraphs reveals that states are represented as the parent nodes for the first-level hierarchy and the energy production categories represent the second-level hierarchy. At the same time, the quantification is rendered at the third level, which represents the area of the rectangles in the treegraphs and illustrates the total energy production (in MW). The Squarified algorithm, which is built into the Tableau software, positions squares or rectangles for each state based on the total energy production for the sub-categories, representing the lowest level nodes as shown by treegraph hierarchy earlier and adjusts aspect ratios to fill space, highlighting relationships, whereas colors differentiate first-level root nodes. In terms of efficient decision-making, the treemap powered by the Squarified algorithm facilitates visual understanding and helps both technical and non-technical audiences quickly grasp the energy production trends among states. It highlights leaders like Gujarat in renewable energy, driven by Wind Power, and identifies underperformers like Bihar. It effectively illustrates part-to-whole relationships, aiding resource allocation and investment optimization to name a few as a downstream application of data-driven decision-making, augmented by business intelligence tools. Thus, it can be easily inferred that coupling the treegraph and treemap approach for synthesizing hierarchical data supported by business intelligence software like Tableau has the potential for performance benchmarking, scenario analysis, and informed decision-making, benefiting policymakers and energy companies. Moreover, in terms of user experience its accessibility and color coding make it valuable for enhancing renewable energy production strategies and optimizing across regions.

Conclusion:

Effective decision-making in the data-driven landscape relies on clear data representation and hierarchical data visualization techniques like the “treegraph” and “treemap” algorithms can facilitate this process. The “treegraph” algorithm, exemplified by Walker’s approach, prioritizes aesthetics and structured layouts, making complex data visually appealing and informative. The “treemap” algorithm leverages nested rectangles to represent hierarchical structures, facilitating a quick understanding of part-to-whole relationships that empowers decision-makers to grasp insights and trends swiftly. In summary, data-driven approaches, through hierarchical visualization, utilizing a combination of both non-space-filling and space-filling methods can streamline decision-making and ensure effective KPI communication, enhancing efficiency and competitiveness in the data-driven world.

References:

1. Marques, Rodrigo; Moura, Ana; and Teixeira, Leonor, “Decision Support System based on a BI tool: an application in the context of I4.0”, CAPSI 2020 Proceedings 5, 2020, https://aisel.aisnet.org/capsi2020/5

2. Václav Stehlík, Mouzhi Ge, “TOPSIS-based Recommender System for Big Data Visualizations”, Journal of Applied Interdisciplinary Research, 1, 50–74, 2023, https://doi.org/10.25929/jair.v1i1.114

3. Walker, John Q, “A node‐positioning algorithm for general trees”, 1990, https://dl.icdst.org/pdfs/files/c461513ed71d4ced5b1244cc235f58d4.pdf

4. Tableau- Business Intelligence and Analytics Software, https://www.tableau.com/

5. State-wise potential (in MW) of various Renewable Energy Technologies, https://data.gov.in/catalog/state-wise-potential-various-renewable-energy-technologies

6. Tableau working files & and resources

7. Bruls, M., Huizing, K., van Wijk, J.J., “Squarified Treemaps”, Data Visualization, Eurographics, Springer, 2000, https://doi.org/10.1007/978-3-7091-6783-0_4

8. Roa Rodríguez, R., “Tiling heuristics and evaluation metrics for treemaps with a target node aspect ratio”, 2017, https://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-211512

Subscribe to DDIntel Here.

Have a unique story to share? Submit to DDIntel here.

Join our creator ecosystem here.

DDIntel captures the more notable pieces from our main site and our popular DDI Medium publication. Check us out for more insightful work from our community.

DDI Official Telegram Channel: https://t.me/+tafUp6ecEys4YjQ1

Follow us on LinkedIn, Twitter, YouTube, and Facebook.

--

--

Dipta holds a M.E. in Instrumentation & Control. He has varied experience in organizations like ABB, IISc, Flutura, Utopus Insights, Soroco. He loves to write.