Skip to content

KTB2110/TwitterSentimentAnalysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Bill Gates Twitter Sentiment Analysis

This project analyzes the sentiment of tweets by the one and only Bill Gates. If you're not familiar with him, he's kind of a big deal in the tech world (and the world in general).

Getting Started

To run this code, you'll need to have some keys to authenticate with Twitter. Don't worry, it's not like they're asking for your firstborn child or anything. Once you have those, just run the code and let the magic happen.

Cleaning the Text

We don't want to analyze any weird characters or mentions of Bill Gates' arch-nemesis (whoever that may be), so we clean the text using regular expressions. We also remove hashtags because let's be honest, nobody likes those.

Getting the Subjectivity and Polarity

We use the TextBlob library to get the subjectivity and polarity of each tweet. In other words, we're finding out how opinionated and how positive/negative each tweet is. Maybe one day we'll be able to use this to predict the stock market or something.

Plotting the Wordcloud

This is where things get fancy. We take all the cleaned text and generate a beautiful wordcloud. It's like a work of art, except instead of paint we're using words, and instead of a museum it's just your computer screen.

Analyzing the Sentiment

Finally, we use our advanced machine learning algorithms (aka a simple if/else statement) to determine whether each tweet is positive, negative, or neutral. It's like having your own personal robot butler to tell you how you should feel about each tweet.

Conclusion

So there you have it. Now you too can know how Bill Gates feels about the world (or at least how we feel he feels). Just don't blame us if you get sucked into a Twitter vortex and lose track of time. Happy analyzing!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published