What it does
The app collects the most recent 200 tweets of a twitter user and analyzes the positivity of each one. It graphs the average positivity of a tweet per day.
How we built it
We used twitter API with the tweepy library to scan the most recent 200 tweets from the twitter ID input by the user. From there, it organizes each one by date and performs sentiment analysis on each one, averaging them out so each day has a single value. We input that data into matplotlib to build our graph.
Challenges we ran into
The most prevalent challenge throughout the event was the Twitter API. It was difficult to use and had several limitations, specifically with only being able to collect 200 tweets at a time per user. This limited how far back in time the graph could show, and made some Twitter IDs have less meaningful data over time. One example of this was CNNBreakingNews, who tweeted 200 times in approximately the past five days. While this is interesting this does not accurately represent the Twitter handle over an extended period of time.
Accomplishments that we're proud of
About 8 hours into the hackathon, we realized that our first project was unviable due to the limitations of our data. Morale was low, but we adapted very well and redesigned our project to work with the data we had been using and got back on track without having to scrap much work.
What we learned
Our group consisted of members who had various knowledge in programming, and each person learned something along the way. Three group members had no knowledge in using the Twitter API and Tweepy, while the fourth had a limited knowledge of both. Everyone had varying levels of knowledge in Python, and helped each other learn and grow within the language.
In the future it would be interesting to integrate the application to the Django website. This would allow the user to complete the entire process in one location, such as inputting a Twitter ID into an input textbox, and have it automatically output the timeline graph and a picture of the celebrity. Another future idea would be to randomly collect ten tweets a day over the course various time frames (i.e. month, year, beginning of the account) to accurately show a user’s twitter mood.