Accidentally in Code

Visualizing Your Twitter Network

Posted on: October 8, 2009

Visualizing your Twitter Network

This is what I’ve been working on lately – it graphs who you’re having a conversation with on Twitter (and who they’re having a conversation with). I’ve got some more stuff to add to it, but I’m pretty happy with how little time this has taken (coding time, perhaps 10 hours?).

There were 3 phases to this mini-project.

Phase 1: API calls to Twitter to get the data. This tutorial and code sample was helpful, as was the Twitter API documentation.

Phase 2: Converting to GraphML. Pretty easy once I’d read the GraphML Primer and with the use of the W3 Schools XML validation.

Phase 3: Visualize. Something that Prefuse makes incredibly easy, this graph is a modification of their example.


  • It’s a directed graph, and I want to color-code the edges so that conversations going out are a different color from those going in (and different again from reciprocal relationships).
  • I need to balance the conversations, at the moment it takes your last 200 tweets and last 200 mentions which obviously potentially skews the graph in both directions depending on the user.
  • I want to be able to define the depth. I think a depth of 3 is practical, but as it grows exponentially probably not more than that.
  • Then I’ll be working to turn it into a web applet so you can see your graph, too.

1 Response to "Visualizing Your Twitter Network"

[…] About Visualizing Your Twitter Network […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Top Posts


Tweet Tweet

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

%d bloggers like this: