Inspiration
Given that users spend a large amount of time on Twitter, we wanted to figure out how to make Twitter users more mindful of their own wellbeing and help them improve their mental health through exposure on this diverse platform.
What it does
Shadow Bot is a Twitter bot we designed to help users understand the implications of the information they see on their feed: the “shadow” of their Twitter presence. Shadow conducts its analysis on any user following it. It analyzes tweets posted by this user and a comprehensive, random sample of tweets from the friends of this user to generate a rating of the user’s mood. Finally, it sends the user useful resources to help improve their mood - i.e. related playlists, and personalized, positive retweets - once a week.
How I built it
We made use of Python and the Twitter API to build it. We also made use of TextBlob and Natural Language Programming Toolkit to aid in sentiment analysis and clean the data. We used some built in Python libraries and JSON parsing tools to handle API data.
Challenges I ran into
The API only took in data written by the user instead of what was on their feed. This made it difficult to do a sentiment analysis as we could not get a holistic picture of what was on their feed. However, we equated content on a user’s feed to a random selection of content outputted by their followers. We aggregated that data instead, weighted it at a higher level than data collected from the user’s tweets itself, and bridged the gap between the data we were hoping to analyze and the data available to us.
Accomplishments that I'm proud of
We created a working bot that takes data from users that follow Shadow bot to be and is able to predict the user’s mood but also suggest fun playlists based on the user’s sentiments. Another great feature of this bot is that it prioritizes the positively connotated significant words from the Twitter API to recommend additional tweets instead of just the most significant words overall; we want to promote the most positive sentiments of a user’s existing interests on Twitter!
What I learned
We learned about the different things we can do with the Twitter API and how we can use natural language programming to uncover sentiments.
What's next for Shadow Bot
We hope to improve shadow bot by using Machine Learning in order to identify better recommendations for our users. Eventually, we want to allow our users to interact with the bot itself to request specific analyses or types of content.
Log in or sign up for Devpost to join the conversation.