With being back at my desk comes the need to play around and bide my time. I've been extremely fascinated by the spatial structure of information lately - how can we map the ways we interact, communicate, live?
Twitter is one of the most popular ways people share their "status" with anyone who cares to know. The site provides a cool streaming API that allows developers to listen to and filter through all the data that goes through in real time. It turns out it's reasonably easy to access using Python, and the last couple of days I wrote a script that listens to geo-tagged tweets.
Any tweet with coordinates then gets put on a map, and any tweet with an origin as well as a mention of another place is represented as a line between the two points. Within a few minutes, you can see the connected countries - mostly Europe and North America, with a few bursts in Japan and Australia and the occasional life sign from South Africa and South America - light up. And, maybe unsurprisingly, most people seem to tweet about nearby places.
I'm really excited about learning to use APIs and the amazing Python Basemap. What other interesting things can be done with all this data?
(Also, my plotting is waaay slower than my streaming. I can't keep up with twitter! Anyone have a good idea why that might be?)
No comments:
Post a Comment