Reputation: 4349
I have tabular data with the following fields constituting a record:
I would like to convert this data to graphviz DOT format either programmatically or as part of a script. In particular, I would like to cluster nodes according to their GroupID.
This seems like it would be a common task--are there existing tools / code (preferably Python or R) examples that do this?
Upvotes: 1
Views: 4765
Reputation: 934
It sounds like the NetworkX library for Python might do what you want. What you need to do is read in an edge list (see networkx.readwrite.edgelist), process it to create the groups or anything else you need, and write out the Graphvis dot file (see networkx.drawing.nx_pydot.write_dot).
NetworkX can do other graph visualizations on its own without Graphvis (gallery, docs), and can export many other formats including GraphML. There are tons of open source tools to visualize graphs that can import GraphML, like NodeXL, a great introductory tool that integrates network analysis into Excel 2007/2010 (Disclaimer: I'm an advisor for it). Other awesome tools include Gephi and Cytoscape, while Pajek and UCINet are some proprietary alternatives.
Upvotes: 2