Ruby + Graph Visualization
August 4, 2008 9:21 AM Subscribe
Graph Visualization Filter: I need to generate a list of coordinates for the nodes in a large directed, weighted graph from Ruby, given a list of nodes, edges and weights.
posted by Alterscape to Computers & Internet (3 answers total)
I have a list of nodes, edges, and edge weights that describe a graph. I need to generate a list of coordinates for each node, as determined by some graph layout algorithm. I'm looking for something like GraphR or ruby-graphviz but that generate just the intermediate data (coordinates of the nodes) rather than an image. Also, graphviz doesn't handle weighted edges. I know about JUNG, and I know it is possible to make Java and Ruby play nicely together, but doing so exceeds my current level of programming knowledge. One option I've considered is to write the input data to a file from Ruby, run a command-line application to process the data with JUNG from the Ruby app, and then read the JUNG output from a file back into Ruby to generate the output. This involves a lot of disk I/O, though, and I worry that it would not scale well beyond a trivial demo.
Any suggestions for other packages or approaches? I'm a grad student, so commercial tools are probably out.