# This dataset contains the graph that describes the class
# hierarchy for the Flare visualization library
head(flare$vertices)
## name size shortName
## 1 flare.analytics.cluster.AgglomerativeCluster 3938 AgglomerativeCluster
## 2 flare.analytics.cluster.CommunityStructure 3812 CommunityStructure
## 3 flare.analytics.cluster.HierarchicalCluster 6714 HierarchicalCluster
## 4 flare.analytics.cluster.MergeEdge 743 MergeEdge
## 5 flare.analytics.graph.BetweennessCentrality 3534 BetweennessCentrality
## 6 flare.analytics.graph.LinkDistance 5731 LinkDistance
head(flare$edges)
## from to
## 1 flare.analytics.cluster flare.analytics.cluster.AgglomerativeCluster
## 2 flare.analytics.cluster flare.analytics.cluster.CommunityStructure
## 3 flare.analytics.cluster flare.analytics.cluster.HierarchicalCluster
## 4 flare.analytics.cluster flare.analytics.cluster.MergeEdge
## 5 flare.analytics.graph flare.analytics.graph.BetweennessCentrality
## 6 flare.analytics.graph flare.analytics.graph.LinkDistance
# flare class hierarchy
graph = tbl_graph(edges = flare$edges, nodes = flare$vertices)
# dendrogram
ggraph(graph, layout = "dendrogram") +
geom_edge_diagonal()
# circular dendrogram
# notice the "dynamic" variable leaf
ggraph(graph, layout = "dendrogram", circular = TRUE) +
geom_edge_diagonal() +
geom_node_point(aes(filter = leaf)) +
coord_fixed()
# rectangular tree map
# notice the "dynamic" variable depth
ggraph(graph, layout = "treemap", weight = size) +
geom_node_tile(aes(fill = depth), size = 0.25)
# circular tree map
ggraph(graph, layout = "circlepack", weight = size) +
geom_node_circle(aes(fill = depth), size = 0.25, n = 50) +
coord_fixed()
# icicle
ggraph(graph, layout = "partition") +
geom_node_tile(aes(y = -y, fill = depth))
# sunburst (circular icicle)
ggraph(graph, layout = "partition", circular = TRUE) +
geom_node_arc_bar(aes(fill = depth)) +
coord_fixed()