I gained inspiration for this project after talking to a representative at FINRA, where he explained the basics of machine learning and gave examples of beginner projects. I became interested in sentiment analysis and the calculation of polarity through machine learning. Because I had signed up as a twitter developer before this hackathon, I figured that combining the two things into twitter sentiment analysis would be fun and relevant to a compass challenge.

What it does

My program opens up a GUI containing an input field, an analyze button, and an output field. The user enters a search query into the input field, clicks analyze, and views the resulting tweet that pops up onto the output field. The output contains the polarity of the tweet, and whether it is positive, neutral, or negative. My program meets the goal of a compass challenge in the sense that it helps solve problems in society. This is accomplished by the user entering a query about anything that could be prevalent in society, and analyze the polarity of said query. From there, they could see what is doing well or what could be fixed in their community by the polarity of the tweets.

How I built it

There are numerous python modules that were used in my program. Tkinter was used to create the GUI, Tweepy was used to gain access to tweets, and textblob was used to analyze sentiment of the obtained tweets.

Challenges I ran into

I had a hard time figuring out the GUI format as this was my first time using the Tkinter module. The spacing and layout of all of the frames were very finicky, similar to HTML.

Accomplishments that I'm proud of

I am happy that I was able to successfully combine a twitter api with a machine learning module into an easy to use program that is relevant to the compass challenge.

What I learned

The main thing that I learned from this project was figuring out how to utilize multiple python modules in order to create a cohesive and user-friendly program.

What's next for Twoot

The next step that I would like to take concerning Twoot would be to incorporate my own trained ai, as the sentiment analysis already uses the textblob ai. I would use machine learning to create an artificial intelligence capable of taking in real world events as training data and seeing how that affects the polarity of tweets originating from the general locations of said events.

Built With

Share this project: