«Insert Name Here»

25 January 2011

A crazy idea about graph visualisation

Filed under: Graphs,Haskell,linux.conf.au — Ivan Miljenovic @ 1:23 PM

I’m currently at linux.conf.au, and this morning I went to a talk by Adam Harvey entitled Visualising Scientific Data with HTML5.

Now, one of the packages I maintain is graphviz which suffices at what it does: use Graphviz to visualise graphs using static images. Despite its various problems, I keep using Graphviz because – unlike most of the flashier graph visualisation programs that I’ve found – it doesn’t require a fancy GUI just to convert a pre-existing graph into an image (admittedly, others may have library versions, but most seem to be written in Java and Python, which do not seem as useful in terms of writing Haskell bindings). However, one thing that Graphviz cannot do is let you dynamically visualise graphs, which is especially useful for extremely large graphs (e.g. call graphs).

One of the visualisation toolkits that Adam talked about was the JavaScript InfoVis Toolkit, which seemed quite nice in how you can dynamically interact with the graphs. The graphs are represented using JSON, and the format looks relatively straightforward.

So here’s my possibly crazy idea: does it make sense to create a companion library for graphviz to convert its DotRepr values into JIT-compatible JSON, possibly with some extensions to assist with the visualisation? We already have various libraries for interacting with JavaScript and JSON on HackageDB, so it may be possible to abstract most of the pain of visualising and interacting with graphs on the web into our preferred language. I’m not quite sure how to deal with incompatible/differing attribute values for Dot vs JIT’s JSON, but is this type of avenue worth considering? Such a conversion library would save having to doubly-convert graphs (in case you want static image versions of the visualisations as well).

So, how crazy am I?

About these ads

8 Comments »

  1. You’re relatively crazy, but its still a good idea. ;)

    Comment by Edward Kmett — 25 January 2011 @ 1:56 PM | Reply

    • OK, so the next question is: should I have intermediary datatypes or go directly between the DotRepr types and JSON?

      Comment by Ivan Miljenovic — 26 January 2011 @ 8:53 AM | Reply

  2. After hearing about JIT infovis, I was wondering about a haskell tool/library to convert graphs to json too for infovis as an alternative to svg rendering.

    Comment by Jens — 26 January 2011 @ 10:43 PM | Reply

    • Well, I’ve mentally started working out how to do this. The biggest barrier at the moment is that I’m currently in the middle of porting graphviz from String to Text, and so I can’t really start playing with it until that’s done. But from some experimentation I’ve done it seems dot, neato, etc. ignore any extra Attributes you might want to add to the DotRepr values for JIT attributes that don’t have corresponding Dot ones!

      Comment by Ivan Miljenovic — 26 January 2011 @ 11:00 PM | Reply

  3. InfoVis is really awesome. I’ve been meaning to find some time/excuse to play with it. Some tool support from Haskell would be pretty nifty. I’d start by thinking about what you’d want to generate InfoVis input from Haskell in general, and then figure out how to tie the DotRepr stuff in as a client to that API. That way, whatever you produce will have more general value as well. If you’re going to be producing javascript and not just json, then I’d also consider taking a look at my pet project, JMacro :-)

    Comment by gb — 27 January 2011 @ 5:31 AM | Reply

    • Well, I’m only planning on supporting the graph outputs of JIT, not all of them (since that’s all I care about) ;-)

      I’m not sure how far to take it: should it ust be Dot JSON, or help generate the actual JavaScript for it as well? If the latter, it might even be feasible to use the webkit bindings to open a window to instantly play with a graph…

      Comment by Ivan Miljenovic — 27 January 2011 @ 6:39 AM | Reply

  4. Hi Ivan,

    are there any news about this “converter”?
    I would be highly interested, as I am currently using graphViz but am not totally satisfied with its output. :-/

    Best,
    Bernd

    Comment by Bernd — 18 January 2013 @ 3:40 AM | Reply

    • Never got around to it :/

      Comment by Ivan Miljenovic — 16 June 2013 @ 4:28 PM | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: