Pretty shinies!

I started using Twitter last week. I resisted for ages, thinking it was just some Internet Fad (TM). That theory hasn't changed, but having used it, I have at least come to realise that it's not completely devoid of utility. I can see what my friends are up to in such a delightfully passive way. Rather than have to visit their Facebook page and endure reams of zombie apps or 'Which CareBear are you most like' quizzes, I can just sit back and have notifications peek out at me from time to time, the minuatae of my friend's lives unfolding before me 140 characters at a time, like cheap, nasty comic serials, syndicated 3 panels at a time, bite sized morsels served constantly in an unending entree, each a small and relatively undramatic step towards an obvious and inevitable conclusion, that of our own slow, lonely, and pathetic demise.

But seriously, I love Twitter.

So anyway I start use it, and I start following people, and people start following me. Mainly friends - people I know and work with. And then out of the blue, random people, people on the other side of the world whom I have never met and seemingly have nothing in common with, are suddenly followers. I have mentioned it to a few people, and I have heard similar stories from other people. Sometimes it seems to be a marketing effort, other times it is someone connected or interested in an unusual or unobvious way. It made me think about the connections, and about how this whole thing hangs together.

I did a couple of quick searches to see if I could find anything that would give me a picture of how it all looked. There were a couple of things here and there, and they ranged from Lame to Utter Pants. I decided to write my own. On the weekend, I strung together some python that used the Twitter api to spider the twitter network, pulling down the details of users and their friends, and their friends' friends. I blatted the results to my own local database using django, and made sure I kept under the Twitter api ratelimiting radar of 100 requests an hour by sleeping for 5 minutes at certain points in the (highly recursive) spidering algorithm. I managed to pull down just under 100,000 user details.

I wrote some quick OpenGL in pyglet, and used a particle engine called Lepton to help model the results.

Arbitrary picture of a segment of the twitter network

 

The resulting image is a very partial view of a small segment of the Twitter network. Each star represents a twitter user. The colour has no meaning, but the relative size of each star is indicative of how many followers the person had. Each star is positioned close it's followers, although in a random direction. An unintentional quirk of the random direction calculation (keeping random values between 0 and 1 instead of normalising over -0.5 to 0.5) meant that in general. the system tended to spiral around itself, like a semi-guided Brownian motion. This turned out to be good from an interface point of view, as you can generally rotate and 'fly' the camera in for a good close look at any cluster of interest.

Now, the tool is in it's infancy, and it doesn't yet do anything but draw this kind of diagram. There is no useful information here, as the clustering algorithm is arbitrary and as explained above, biased. So this doesn't really tell me anything about the structure of the network. I had planned for connecting links to be drawn between nodes when the mouse hovers over them, and for user names to be displayed - the information has been captured, but is missing from the graph. As is the ability to search for a user and locate them in a graph, and show the relationships between any two chosen users. The questions I had when I started out to build this tool have not been answered, and I am not sure when I will find time to implement the features that would help me answer them, what with the Gamejam imminent. So for now all it does is draw a starfield, and the only association that has with Twitter is that I can say that each star represents a Twitter user. Everything that is actually useful is not yet done, yet it still brought me great satisfaction to do it.

I guess that would be worth tweeting about. Follow me on Twitter! Or, as beetlefeet suggested, follow me on the Evil Twitter Darknet!

This rules!

This rules!