Studious (and Otherwise) Berkeley Tweeters

By William|October 19, 2015|Uncategorized|1 comments

-This project was completed for Exercise 6: APIs-


Overview

For this project, I selected tweets around the UC Berkeley campus and then plotted them in CartoDB to visualize the spatial relationship between the different activities Berkeley Tweeters were engaged in. On a given Sunday afternoon during the semester, during midterms and football season, people tweeting about school were spread across the city of Berkeley–with only a few on campus. The people tweeting about beer, however, were centered in West Berkeley at the Missouri Lounge, a bar, which I presume to be associated with watching Football, and at The Rare Barrel Brewery, the tasting room of which is only open three days a week, including from 12-6 pm on Sundays.

Map

The map I created was relatively simple, with two layers of 25 coordinate locations each. I used the “Cluster” style map, which stacks the entirety of points within a certain radius into one bubble with a number. This worked well for this map, because besides the two locations with several posts at each, all other coordinates represented individual posts.

Data

To get the data I used for this, I queried the Twitter API to select 25 tweets from two groups that fit my criteria. For the first group of tweets, I set the parameter of including any word from the following list: midterm, midterms, study, exam, test, school, or class. The second, less studious, group was defined by one word: beer. I wanted tweets around campus, so I asked for tweets georeferenced to locations within 2 miles of campus, using [37.873, -122.260] as the reference point. Because of the simplicity of the data taken from the Twitter API, no cleaning was needed. This made it easy to create a .csv file of the coordinates and upload to CartoDB and map them.

The data I took from Twitter were simply the coordinates of each tweet for each category, but additional insight could be gleaned from the tweets themselves, which could be used to make an interactive map. After examining the mapped data myself, I determined that there was not much correlation between where people posting about schoolwork were, with the tweets spread over most of Berkeley (three were on campus). I also noticed two specific locations in West Berkeley with a high number of posts about beer, and after going back to the tweets which generated those coordinates and looking up the addresses associated with those coordinates, I determined the two establishments attracting beer-interested tweeters.

A problem I had was getting enough studious tweets, necessitating a long list of potential words in the query. Alternately, there was no problem getting enough tweets including the word “beer.” Another problem was that some of the words I used to choose school-focused tweets could be used in other contexts–such as exam and test referring to medical procedures. Additional parameters could also be used to refine the search and lead to greater insight.

An interesting note is that the data were recorded at 2:24 pm on a Sunday during the part of the semester with a high frequency of midterm exams, which is also during Football season, both of which I expect to influence the activities people tweet about. Because of the relationship between time and the locations and activities of people, I also expect that the technique above would yield very different results depending on the time of day, day of the week, and date within the school year–leading to multiple avenues of potential further inquiry.

Missouri Lounge: http://www.missouri-lounge.com/

The Rare Barrel: https://www.therarebarrel.com/

Once again, this project has (almost) nothing to do with Earth Science, but I find using data from the Twitter API interesting–as well as the results I got.

Happy mapping,

William Zell

One thought on “Studious (and Otherwise) Berkeley Tweeters

Leave a Reply

Your email address will not be published. Required fields are marked *