We were curious about what Twitter thought about certain topics, and if it could be accurately modeled through using the Twitter API. As we built it, we realized the potential for this to be able to study human emotion.

What it does

This project uses the Twitter Search API to retrieve tweets on topics that the user requests. Then the tweets are run through IBM Watson's sentiment analysis to be categorized under one of several emotions: joy, sadness, anger, disgust, and fear. Then a live pie chart is used to visualize the percentages of each category relative to each other.

How we built it

We built the web app on node.js, and the express framework for manage routes. All of the API implementations were also done through node.

Challenges we ran into

Debugging the asynchronous process through nested for-loops was terrible coding practice that we learned not to do. Also the Twitter API had a rate limit that we had to bypass through using multiple people's Twitter accounts.

Accomplishments that we're proud of

We're proud to have a functional web application that updates the pie chart and quickly as it can, thus making it truly live. We are also proud of the potential that this project has based on solution design and its future plans. We believe that this project has the capability to predict emotional responses to certain situations as well as analyze previous emotions that have been read.

What we learned

We learned a lot of the best practices of asynchronous programming. Furthermore, we discovered how difficult it was to use the Twitter API.

What's next for Twitter Sentiment Analysis Tool

We want to look at emotions that the public feels over time about various topics. Using that data, the computer would be able to predict the trend of emotions that the public will feel in the near future. We hope that this will help artificial intelligence understand and account for human emotion.

Share this project: