Inspiration
We noticed that there was a political underrepresentation of certain groups on Twitter, and we wanted to identify some of these areas more specifically.
What it does
Obtain tweets from political figures and the replies and the repliers locations in order to determine which areas had the most and least civic engagement.
How we built it
We made a list of each senator/governor/representative/attorney general from Texas and their Twitter @'s. We then wrote functions to grab the most recent tweets from each politician and the top replies. After that we looked at each user who replied and their location data from their profile to determine which city they were from.
Challenges we ran into
The rate-limiting from Tweepy and how we had to constantly wait for cooldowns in order to test our program. Tweepy only allows you to grab 300 tweets at a time and then requires a cooldown of 15 minutes.
Accomplishments that we're proud of
Learned a lot more about different modules and technology. We also figured more effective ways to work together and be more productive as a group.
What we learned
How to use github and its commands, more about APIs in general, and familiarized ourselves with Tweepy specifically. We also learned about hackathons in general and how they work, including factors such as the "time crunch"(as we are typing this out at 5 A.M. :) ). We also had a couple team members learn about and code in Python for the first time.
What's next for Twitter Civic Replies
My team wanted to explore pandas or geopandas in order to display our data graphically on a map layed on top of U.S. census population data. This would provide a more visual representation and make it easier to digest our program’s output. We could also combine this with the Texas Cities API that we found in order to check the validity of the location data from the user profiles.
Built With
- python
- tweepy
Log in or sign up for Devpost to join the conversation.