Beat The Tweet

Python, Visualization, Twitter, Pygame

March 15, 2018

In this project, I...

  • Connect to the Twitter Streaming API with a keyword filter using Python
  • Parse incoming tweets according to dimensions such as sentiment, volume, length, etc.
  • Deploy the tweets as obstacles in an Asteroids-type game built with Pygame.

Beat The Tweet is a data visualization game coded entirely in Python, using the Pygame package for visual rendering. The player chooses a keyword filter for Twitter, and when the game begins controls a ship shaped like an eyeball, steering it to avoid incoming tweets delivered in real-time.

This was my first experiment with connecting to the Twitter Streaming API to build a visualization, and it eventually became the Twitterfell D3 visualization, which is much more suited for a web experience. You are welcome to clone the repo and install and play the game yourself if you have a Twitter API Key, but if that's too much fuss I've recorded a demonstration video below.