Making Complex Connection Webs
December 13, 2007 11:51 PM   Subscribe

If I have the data "A is friends with B, B is dating C, C is cousin of A, D is old schoolmate of B" etc, how can I easily make a chart of everyone's connections to each other? This should preferably be software, as trying to map it out manually is way too timeconsuming and difficult.
posted by divabat to Technology (16 answers total) 13 users marked this as a favorite
Best answer: If you're going to do a lot of this, the data is already entered, and have some scripting chops, (or you have a text editor and some patience), Graphviz is the way to go.

If you just want to drag and click, and you're on a Mac, OmniGraffle might suit you.
posted by zamboni at 12:07 AM on December 14, 2007

Best answer: dot, which is part of the graphviz package, can automatically lay out diagrams. It has a textual input where you specify the nodes and connections between them, not that I've used it directly myself. A quick glance at their website indicates that maybe you want to use one of their other layout tools (eg neato), but whatever; I think graphviz would be a good solution.

For example, all the class relationship diagrams produced by doxygen are rendered by dot.
posted by polyglot at 12:10 AM on December 14, 2007

If you want to do it manually and omnigraffle appeals but you want it free, check out Inkscape.
posted by polyglot at 12:12 AM on December 14, 2007

Graphviz is good, some other programs you might want to check out are Social Networks Visualiser, Java Universal Network/Graph Framework & NetVis. What OS do you want to do this under? FYI, the generic term for this kind of application is Social Network Analysis (SNA) software.
posted by scalefree at 12:45 AM on December 14, 2007

One more I left out, VisOne.
posted by scalefree at 12:53 AM on December 14, 2007

Another approach similar to scalefree's is to first find a suitable SNA ontology (that's your vocabulary) using Swoogle or use the Foaf (friend of a friend) ontology. Foaf offers it's own editors, online or locally installed, named foaf-a-matic. You can also use the Protégé ontology editor. Protégé offers a lot of visualisation options (using graphviz btw). It is a tool for powerusers.
posted by jouke at 1:12 AM on December 14, 2007

Response by poster: Ha, I should have probably mentioned that I'm a complete noob. I'm using Windows Vista. I'm trying out Graphviz at the moment and it seems all right, but I may be doing something wrong because it crashes on me (the output file does show up though). Am downloading visone and Inkscape at the moment.

The language of nodes/graphs/etc confuses me. What do they mean? I like the text-file-input function of Graphviz, but the language of all of these things aren't too intuitive. Also, with Graphviz, how do you get a chart that has both directional and non-directional connections (for instance, a family tree)?
posted by divabat at 1:44 AM on December 14, 2007

Here an image of the example you provided as produced by GraphViz. The graphviz code was:
graph {
        node [shape=circle style=filled fillcolor=lightblue
        edge [len=2 fontname="Helvetica"]

        A -- B [label="friends"]
        B -- C [label="dating"]
        C -- A [label="cousin"]
        D -- B [label="old schoolmate"]
You can produce the PNG with:
 neato -Tsvg > divabat.svg
 inkscape --export-png=divabat.png divabat.svg
posted by grouse at 1:56 AM on December 14, 2007

Any version of Graphviz will produce PNG output directly, but it's not very pretty. It's fine for working on the graph, but for your final output, it's best to produce either SVG or PS and then convert it to PNG or PDF, if that's what you want, using an external program. So if you're using Windows you don't need to use the command-line although it might mean less work in the long run.

Wikipedia has decent explanations of the basic concepts of graph, edge, node. Don't get bogged down in the details as they don't matter for your application.

If you want directional connections, change graph to digraph and use -> instead of --.
posted by grouse at 2:01 AM on December 14, 2007

Best answer: Also, there are a number of ways to visualize the data. If there are really only four different kinds of relations, then you might be better off using line style (color, shape, etc.) instead of labelling everything.
posted by grouse at 2:03 AM on December 14, 2007

You could also just use powerpoint, visio or a similar general diagramming program. Using zoom functionality and 4 pt characters you can fit a lot on one diagram.
posted by jouke at 2:17 AM on December 14, 2007

Response by poster: GraphViz worked perfect! I found a tutorial that explained things simply and I made my first graph - a way to map the highly complex and insular world that consists of my friends (everyone knows each other in different ways).

It's more for fun so I'm not worried about looks, though dot did look a lot better than neato (which is not neat at all).

posted by divabat at 2:29 AM on December 14, 2007

dot and neato have different uses. If you have hierarchical, ordered, or rooted data, dot is better.
posted by grouse at 3:04 AM on December 14, 2007

UCINET is software designed to do SNA and has some pretty neat graphing and analytical capabilities.
posted by jtfowl0 at 3:29 AM on December 14, 2007

See also:
posted by cmiller at 4:27 AM on December 14, 2007

I did this once with prefuse (well, with the example application included with the toolkit). If I recall correctly, it could take an XML file as input. You could use physics in the layout engine, so then you could pull nodes out and watch them snap back. I'm sure most of the tools mentioned here do that too, but it was fun at any rate. :)

Also, more visualization software than you can shake a stick at.
posted by natabat at 8:27 AM on December 14, 2007

« Older Romantic (small) Hotel or B&B in Seattle   |   Eat 'em before they get mouldy! Newer »
This thread is closed to new comments.