This page explains how to realise a really basic circle packing with several level of hierarchy. This kind of chart represents a hierarchy: The biggest circle (origin of the hierarchy) contains several big circles (nodes of level 1), that contains smaller circle (level 2) and so on.. The last level is called leaf.

 

The input data is a list of edges between nodes. It should look more or less like the table below. Moreover, we usually accompany this table with another one that gives features for each node.

 

We are going to use the awesome ggraph library by Thomas Lin Pedersen to make this circle packing. Here is the code.

 

 

Note that the ggraph library allows to easily go from one type of representation to another. Indeed several types of representation are suitable for hierarchical data: dendrogram (can be circular), treemap, sunburst diagram or network!

 

 

 

 

Related


 

 

Make a search


 

 


1
Leave a Reply

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
awkates Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
awkates
Guest
awkates

When I do this, it gives the following error message: “Multiple components in graph. Choosing the first”

Then it draws a single circle.

Any ideas?