Skip to content

🐤 A python web app that lets a user enter a topic and get the current polarity on that topic through sentiment analysis on recent tweets.

Notifications You must be signed in to change notification settings

alexfrankcodes/twitter-opinion-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitter Opinion Analyzer

A python web app that lets a user enter a topic and get the current polarity on that topic through sentiment analysis on recent tweets.

Live version can be accessed at https://twitter-opinion-analyzer.herokuapp.com/

Examples

Here are two examples of the app in action, using the words "Love" (which has a overwhelmingly positive polarity) and "Hate" (which has an overwhelmingly negative polarity).

Performing a search using the term "Love"

Performing a search using the term "Hate"

Setup

1. Clone repository

git clone https://github.com/alexfrankcodes/twitter-opinion-analyzer.git

2. Open project and change into local env

cd twitter-opinion-analyzer
source env/Scripts/activate

3. Install requirements using pip

pip install -r requirements.txt 

Note: executing flask run at this stage will open the app, but you will encounter an error if you try and submit a search term. In order to fully run the application, you must connect with the Twitter API and insert your own values for the API_KEY, API_SECRET, ACCESS_TOKEN, and TOKEN_SECRET variables in app.py.

Release History

  • 0.0.1
    • Work in progress

Next Steps

I'm currently considering alternate ways of calculating and displaying polarity. I'm mainly interested in trying to categorize how strong an opinion is and communicating that to the user, formatted in a way such as the following:

"The opinion on this topic is [ barely/slightly/moderately/strongly ] [ positive/negative ]."

Meta

Alexander Frank – @alexfrankcodesalexfrankcodes@gmail.com

https://github.com/alexfrankcodes

About

🐤 A python web app that lets a user enter a topic and get the current polarity on that topic through sentiment analysis on recent tweets.

Topics

Resources

Stars

Watchers

Forks