Creating hierarchical graphs with networkx

1.2k views Asked by At

I'm exploring some options to do some graph analysis, and one crucial component is that the graph data I have is very hierarchical. I have many "leaf" nodes that are all interconnected, and then I have clusters of those nodes which themselves are interconnected (edges between the clusters themselves). There are several layers of this hierarchy

A tool called Gephi seems to support these types of graphs, and can be represented in its .gexf format. The python networkx library seems to support gexf output, but doesn't seem to have a notion of hierarchy, unless I'm missing something.

I've been tempted to create several networkx graphs (one for each layer of hierarchy), and add references to nodes in other graphs as part of the node data. It would then be possible to modify the GEXF writer to output such hierarchical graphs.

Am I missing anything? Are there better ways to represent such graphs?

Thanks.

0

There are 0 answers