Twitter Visualization

Visualizing Your Twitter Network

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.