Visualizing hierarchical data

In the field of data analysis, we often encounter data that is structured in a hierarchy or tree-like manner. Hierarchical data organizes information in a nested fashion, the elements or items are organized into levels, and each item can have one or more subordinate items or children. In hierarchical data, there is a clear parent-child relationship between items, with some items acting as parents (higher-level nodes) and others as children (lower-level nodes).

Chart showing hierarchy
Hierarchical Data


From organizational charts to biological taxonomies, hierarchical data structures provide a clear hierarchy of relationships, facilitating understanding and analysis across various domains.

A common analogy for hierarchical data is that of a tree, with the root node at the top representing the highest-level category or element, and subsequent nodes branching out to represent subcategories or sub-elements. This hierarchical structure is prevalent in various domains and applications, including:

  1. Organizational Structure: In a company, hierarchical data can represent the organizational structure, with the CEO or president at the top, followed by managers, teams, and individual employees at lower levels.
  2. File Systems: In a computer’s file system, hierarchical data organizes files and folders into directories. Each directory can contain subdirectories and files, creating a nested structure.
  3. Product Categories: E-commerce websites use hierarchical data to categorize products. For example, electronics might be a top-level category, with subcategories like laptops, smartphones, and accessories.
  4. Biological Taxonomy: Biological classification systems organize species into hierarchical categories, such as kingdoms, phyla, classes, orders, families, genera, and species.
  5. Project Management: Project structures can be hierarchical, with projects containing tasks, and tasks containing subtasks. This hierarchy helps in managing and tracking project progress.
  6. Data Taxonomies: In data management, hierarchical data taxonomies help organize and classify data elements, attributes, or variables in a structured manner.

When working with hierarchical data, it’s essential to choose appropriate data structures and visualization techniques to effectively convey the information and insights contained within the hierarchy.

We bring to you two ways in which hierarchical data can be visualized.

  1. Treemap
  2. Sunburst


Treemap showing hierarchical data

The Treemap represents hierarchical data using nested rectangles where each rectangle corresponds to a hierarchical level, with the area of the rectangle proportional to a specified metric such as size or value. The hierarchy is depicted through the nesting of rectangles, where parent rectangles are divided into smaller child rectangles.

steps to make treemap

Imagine exploring the organizational structure of a company using a Treemap chart. The top-level rectangle represents the entire organization, with each subsequent level representing departments, teams, and individual employees. The size of each rectangle can represent metrics such as revenue, budget allocation, or workforce size, providing a comprehensive view of the organization’s hierarchy and performance.

Treemaps are excellent for:

  • Seeing the Big Picture: Get a quick grasp of the overall data distribution across categories.
  • Identifying Dominant Players: Easily spot the largest categories at a glance.
  • Limited Space: Treemaps are compact, making them ideal for dashboards with limited real estate.

Sunburst Chart

sunburst chart showing hierarchical data

Sunburst charts showcase hierarchical data using concentric circles. The root element sits in the center, with subsequent levels radiating outwards like petals. The area of each segment corresponds to its value.

steps to make a sunburst chart

Sunburst charts also have drawbacks:

  • Complexity: With many layers, sunburst charts can become visually overwhelming.
  • Limited Data Points: Sunburst charts work best for a moderate number of categories at each level.

Harnessing the Power of Visualization

Both Treemap and Sunburst charts offer unique advantages for visualizing hierarchical data. Treemap charts excel at displaying hierarchical structures with varying levels of granularity, providing an intuitive representation of relative sizes and proportions. On the other hand, Sunburst charts excel at depicting hierarchical relationships in a compact and visually appealing format, allowing users to explore data interactively in a radial layout.


Choosing the Right Chart

Treemaps are fantastic for space-saving overviews, while sunburst charts excel at showcasing relationships. Consider your data complexity, the story you want to tell, and your audience’s needs before making your choice.

By mastering these two charts, you can transform complex hierarchical data into clear, insightful visualizations.


Leave a Reply

Your email address will not be published. Required fields are marked *