Nicolas Kruchten's entry for hackMTL on Saturday, November 28
Motivations and more graphical output over at: http://nicolas.kruchten.com/content/2010/11/hackmtl/
This Python script uses the DokDok API to build an in-memory graph of the social network represented by the email threads in your inbox. It crawls the social graph by alternating between querying threads-by-emailAddress and emailAddresses-by-thread. It doesn't do a naive depth-first search but rather keeps a 'hit-list' of frequently-seen addresses and crawls those first, in the hopes of crawling the bulk of the highly-connected network first. This algorithm is what took the longest to implement during hackMTL.
It comes with an on-board HTTP server, which can be used to serve a JSON file to the enclosed HTML file for visualization via a Force-Directed layout provided by the Protovis library. This server can also serve SVG-formatted graphs created by Graphviz.
As it goes, it generates an on-disk cache, in a format suitable for a more powerful graph analysis tool, such as Gephi.
Depends on a number of modules: cherrypy, oauth2, simplejson, pygraphviz/graphviz, as well as the Protovis javascript library.