Define Irony - Shiny and Impractical Subversion Visualisation

Posted by Tom on 2010-03-26 00:59

I've always had an interest in new and curious methods of visualising data. As a fully paid-up member of the geek fraternity I am required to read xkcd or they'd take my membership card away, and the episodes that really tickle my fancy are the ones that show information in fascinating ways. Since I'm still dabbling with Python in my spare time and I know my way around OpenGL already, I thought I'd try my hand at some visualisation apps.

To begin with I need some data. Subversion logs provide a rich seam of information:

svn log --xml -v [directory] > log.xml

That gives us quite a few properties to present to the user. I decided to graph revision against each object in the repository (either a file or a directory), but instead of slapping it on some boring old orthogonal axes I decided to go radial and then make it garish. That's just the way I roll. So, each 'spoke' on the wheel represents a file or directory in the repository. The files are sorted alphabetically, starting at the top and continuing clockwise. The centre of the wheel is revision 0 and the outside is the last revision found in the log file. Each of the change to that file would be represented by a white blob. But enough description.

You can run the code using:

python svnwheel.py log.xml

And yea, this will result in eye-candy.


Compares Favourably revision 45


This very blogging system


Track and zoom

In terms of practicality it ranks somewhere between a chocolate fireguard and a solar powered torch, but I like it. While I'm sure it will only keep me distracted long enough for the next technological muse to get her claws in it makes for some fun new stuff to learn, I imagine I'll come back and add different visualisations at some point in the future. Something with animation, perhaps.

Anyway, if you want to have a look at the source yourself the project is on github:

http://github.com/colourblind/define_irony

Left-click and drag moves the viewport and right-click and drag will zoom in and out. To reset the view at any time just hit 'r'. Windowing and OpenGL is provided by pyglet and apart from that it's pretty straight-forward. This also represents my first foray into git. The over-powering smugness of the git community had me heading towards Mercurial, but I figured that there's so much good stuff on github these days that I'd need it installed anyway. Curse you, network effect!