Visualizing Team Membership

bnrubin | IRC,Launchpad,Python,Ubuntu,linux | Monday, December 28th, 2009

A few days ago Jussi asked me to take a look at the new LP teams that he had created to manage our IRC operators and core channels.  I’m not sure if it was due to the lack of caffeine, but I was having a hard time figuring out what the hierarchy of teams was from looking at their launchpad pages. Since I’m now more familiar using launchpadlib, I thought I’d put a small script together to graph out the team relationships.  In order to do the actual drawing, I used pydot, which is a python interface for Graphviz.

I showed some test output images to the folks in #ubuntu-offtopic and a few of them thought it was neat and asked me for the code so that they could make their own graphs.  I took that as a sign that I should clean up the code to make it more efficient.  I also went ahead and used optparse to make the application more user-friendly.

To start, lets take a look at what the output for the teams that Jussi created:

Well that’s rather self-explanatory. Much more so than looking at a bunch of lists on LP.

How if we looked at someone that has administrative access for some Launchpad teams.  Perhaps Jono:

Green filled team nodes indicate that the root user has administrative access to them.  I chose to focus on what teams a person had control over, rather than which relationships granted that level of access.  This was mostly due to not being happy with the options that Graphviz had for shading and coloring edges.

I suppose that graph was somewhat complex… although its nothing compared to sabdfl‘s:

Anyway, the python script itself is available here. And the help page is as follows:

Usage: lpdot.py [-c COLOR] [-a COLOR] [-o PATH] [-d PATH] username

Options:
  -h, --help  show this help message and exit
  -c COLOR    set default node color to COLOR (defaults to white)
  -a COLOR    set administrative node color to COLOR (defaults to greenyellow)
  -o PATH     write png file to PATH (defaults to pwd)
  -d PATH     write dot file to PATH

  A list of valid colors can be found here:

http://www.graphviz.org/doc/info/colors.html

3 Comments »

  1. Hi there,

    I am trying to run your script under Hardy. I added a PPA that gave me launchpadlib and its dependencies. I get the following error:

    $ python lpdot.py huayra
    Connecting to Launchpad…
    Traceback (most recent call last):
    File “lpdot.py”, line 124, in
    sys.exit(main())
    File “lpdot.py”, line 101, in main
    lp = Launchpad.login_with(‘lp_dot’,service,cachedir)
    AttributeError: type object ‘Launchpad’ has no attribute ‘login_with’

    Could you help me out? Or should I just try it in a newer Ubuntu version?

    Thanks in advance, R.

    Comment by Rubén Romero — December 28, 2009 @ 7:00 pm

  2. [...] For those interested in the new layout of the IRC teams, this is a visualization created by Benjamin Rubin. [...]

    Pingback by Terence Simpsons Blog » Blog Archive » What the IRCC is up to — January 13, 2010 @ 3:08 am

  3. [...] http://nullcortex.com/2009/12/visualizing-team-membership/ [...]

    Pingback by Links aleatorios, semana ?-23/Julio « Soy porque nosotros somos — July 23, 2010 @ 1:38 am

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress | Theme by Roy Tanck