Sunday, June 17, 2012

Mapping the relationship between YouTube videos


I've been playing John Robertson's YouTube choose your own adventure game The Dark Room and I've been having a great time. However, I need a little help navigating the room (you see, it's dark in there) and so I wrote a program to do a little cartography and create a map of the game.


The map shows the videos that comprise The Dark Room (abbreviated here for space and to limit the spoilers) with the size of each node proportional to the number of views the video has and the colour signifying the number of outbound links from the video. The map was generated by ytvidmap.py from my ytmap repository and is created by processing the YouTube annotations. Sadly, the annotations aren't available from the YouTube GData API so I process the annotations with regular expressions. The map provides a huge boon in navigating The Dark Room but does not make escaping trivial (it's like John anticipated this kind of analysis).

After creating ytvidmap.py I realised that this approach could also be used to help me discover YouTube content by seeing who my favourite film makers and musicians linked to and in turn who they linked to. So I created ytusermap.py and started by plotting the people in Lindsey Stirling's YouTube video social network and ended up with a giant mess of relationships that quickly got out of control. After adjusting my scripts to build in some limits I ended up with this diagram of her closest neighbors.


While not the most useful analysis tool I've ever built I've been having fun with it and you should too!

Check out ytmap on github! 

If you like spoilers here is a complete (as far as I know) version of The Dark Room map (use your browser's zoom function to navigate it better). 

Finally, here is a large version of Lindsey Stirling's network and a large version of GeekandSundry's network (Felica Day and Will Wheaton's YouTube channel).

Edit: Viewing the images directly makes them clickable, so that they can take you directly to the YouTube user or video directly.

No comments:

Post a Comment