I thought it would be cool to use Jeff Gentry’s twitteR package during the NFL AFC Championship Game to scrape geo and keyword specific tweets.
I scraped tweets every 10 minutes starting on January 17th until January 21st. I scraped for the keyword “Broncos” in the Denver, CO area and in a 150-mile radius around the city. I did the same thing for “Patriots” but limited to tweets within a 150-mile radius of Boston, MA. This was a poor mistake on my part though – I completely missed all tweets that just said “Pats”, which is definitely a more common way of referencing the team in New England. A few other things to consider are the populations in both cities, which are fortunately very similar (~600k each). However, since I covered a 150-mile radius around each city, this covers a lot of western Massachusetts and even into Albany as well as the Atlantic ocean. Overall, I ended up with about 80,000 tweets but I did get rate-limited a few times so there are some gaps. If you’re interested in seeing the code – I’ve created a gist.
On the Denver side, a good portion of the Rocky Mountains was included, so hopefully it washes out on both sides. Of course I did a disservice to my fellow Pats fans by leaving out the “Pats” keyword, but I’ll know for the next time.
A few take-aways from the Tableau dashboard below:
Chin up Patriots fans – they had an amazing season despite over 20% of their salary cap being on the IR for the season. The fact that they still made it to the AFC Championship with all of those starters injured is nothing short of amazing. And here’s a gif for you to watch in case you get sad about all those times Brady was left hanging: