Skip to content Skip to sidebar Skip to footer

Multilevel Hierarchical Edge Bundling

I want to implement multilevel hierarchical edge bundling. By that I means I want to inculcate the behavior of radial tree like hierarchy and edge bundling like in Hierarchical Edg

Solution 1:

An approximate solution to your question is to save the following adapted version of your JSON example in a text file (e.g. "test.json"):

[
{"name": "A.A1", "imports": ["Emp.Emp1", "Emp.Emp2"]},   
{"name": "A.A2", "imports": ["Emp.Emp3", "Emp.Emp2"]}, 
{"name": "A.A3", "imports": ["Emp.Emp1", "Emp.Emp3"]},
{"name": "C.C1", "imports": ["Emp.Emp1", "Emp.Emp3"]},
{"name": "C.C2", "imports": ["Emp.Emp2", "Emp.Emp3"]},
{"name": "C.C3", "imports": ["Emp.Emp1", "Emp.Emp2"]},                             
{"name": "B.B1", "imports": ["Emp.Emp1", "Emp.Emp3"]},
{"name": "B.B2", "imports": ["Emp.Emp2", "Emp.Emp3"]},                                               
{"name": "B.B3", "imports": ["Emp.Emp1", "Emp.Emp2"]},                        
{"name": "Emp.Emp1", "imports": ["A.A1","A.A3","B.B1","B.B3","C.C1","C.C3"]},   
{"name": "Emp.Emp3", "imports": ["A.A3","A.A2","B.B2","B.B1","C.C2","C.C1"]},
{"name": "Emp.Emp2", "imports": ["A.A1","A.A2","B.B2","B.B3","C.C2","C.C3"]}
]

Then use R to generate an D3 edge bundle plot using the edgebundleR package:

install.packages("devtools")
devtools::install_github("garthtarr/edgebundleR")
setwd("path/to/dir/with/file")
edgebundle("test.json")

Here's a screenshot of the result:

enter image description here


Post a Comment for "Multilevel Hierarchical Edge Bundling"