Thursday, May 8, 2008

Viewing missing methods/software, part V: Processing

In my previous post, I was  bemoaning the slow speed of the visualization chart using Google Maps. Looking around in the Google Maps group, it seemed that there wasn't a good way to speed up the drawing of many markers, except for drawing them in another program first and storing them on image tiles. Since I was going to have to draw markers in a different program anyway, I decided to try using such a program by itself without involving Google Maps. First, I thought to create a static image using GD with PHP and then do an image map on top of that with javascript, but GD wasn't working on the NESCent server (this was fixed in just a couple of hours, as is common with NESCent's great tech support). While it was being fixed, I decided to learn Processing — I've been impressed by the quality of some of the diagrams it creates, and having a dynamic diagram might be more useful for users. It has good documentation and can parse XML, so within a few hours, I learned enough to be able to create the diagram below. 

Following advice from the TreeTapper design consultant (my wife), I made the nodes smaller and changed the color slightly, but otherwise it is the same as the Google diagram (though I don't have popups or mouseovers working yet), and is much faster to create. It does require users to have Java installed in their browsers, but might allow cool features later on.

1 comment:

Anonymous said...

Yeah, the speed of google maps was one of the things I was concerned about earlier.

I've found processing pretty easy to program, although it does eventually develop its own performance problems when you start dealing with really huge numbers of points. Since you're not trying to make the points dynamically aware of each other though, that probably shouldn't come into play.

Another option you might investigate (although I'm not sure how effective it would be) would be to use graphviz in the twopi mode to generate the background image, and then zoom/nav/tag that in google maps. In general it seems like this is a complex enough task that users should be willing to allow java to load.