Inspiration

We wanted to create a tool to track a person's mental health, and we know that tweets offer some of the most unfiltered thoughts a person has. A lot of college students struggle with mental health, and Twitter is widely used among us. We thought that by creating a tool to analyze the sentiment of a user's tweets and providing a graph, the user can track his/her progress over time. It can be encouraging to visually see the progress one has made. For example, if you were making a lot of negative tweets last week, but made a lot of positive tweets today, then you can celebrate your progress and think about why your mental health has improved. One typical example for college students could be if you had an exam last week and studying stressed you out, causing you to tweet negatively. Now that the exam is over, your mental health has improved and you are tweeting more positively.

What it does

Our website takes in a twitter handle, looks at their tweets, performs sentiment analysis to determine if it is a positive or negative tweet, and then sorts the tweets by date and publishes them in an easy-to-read bar graph format.

How we built it

We used the MonkeyLearn API for sentiment analysis, and we used the Twitter api to receive a user's tweets in Python. We then created a Flask Endpoint to run this python code and send the output back to our react frontend.

Challenges we ran into

We ran into some challenges with setting up the backend. Initially, we tried using node.js and using child process to spawn the python script to retrieve and analyze tweets. But then we realized using a Flask backend, which is already Python, was easier.

Accomplishments that we're proud of

We're proud of the fact that we built a website that users can use to track their mental health. We're also proud of how polished our project looks and how bug-free it is.

What we learned

We learned how to set up a Flask Endpoint, how to use it with React, and how to retrieve and analyze tweets. We also learned how our friends have been doing this quarantine by using our tool on their twitter handles.

What's next for KabhiKhushiKabhieGham

Publish it to a real domain for everyone to use!

Share this project:

Updates