Drupal and Graphviz – Working notes

The other day, I got a phone call from a person interested in creating some social network graphs similar to those that I did with MyBlogLog. Those graphs were created with Graphviz, a very graph visualization package.

For the images I created, I did them all from command line prompts. I gathered the data and then ran a program that created images from the data. I then uploaded the images to Flickr.

However, there are supposed to be packages to create the graphs on the fly. One is Webdot, which is based on TCL and a simplified version that is supposed to work in perl. Unfortunately, the webdot code comes in an RPM installer, which I haven’t figured out how to use on my Ubuntu machine and the perl looks like it probably needs a little bit of hacking to set up.

So, I was pleased to find that there is a Graphviz filter for Drupal. Currently, it is set for Drupal 5, but by adding a couple lines to the info files, you can get it to work in Drupal 6, or so it seems.

I installed the Graphviz filter on one of my machines. By poking around a little, I found that I needed to install the Graphviz PEAR package as well. The way the Drupal Filter is set up, it seems like the best approach is to install the Image directory as a subdirectory of the Drupal filter’s directory. With all this in place, I the filter started working, with one minor exception. It gave me the error message:
“There was an error rendering the Graphviz file using format svg.”

Well, it turns out that the host I was working on doesn’t have Graphviz setup. So, the filter and the PEAR package appear to work, but the call to Graphviz itself didn’t generate any images. Oh well. Next step, install Drupal 6 on a machine I have that does have Graphviz running and/or get Graphviz installed on the machine where I’ve setup Drupal 6, the filter and the PEAR package.

Meanwhile, I’m still spending time upgrading various sites to Drupal 6.2. Beyond that, it is a beautiful spring day. Kim’s brother and his family are in town visiting, so I’ll probably leave the rest of this for a bit later.

(Categories: )