[go: up one dir, main page]

Skip to content

joeyhachem/Twitter-Sentiment-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Twitter Sentiment Analysis

Twitter Sentiment Analysis

Backend:

Python, Flask

Fetch tweets using twitter api: https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/api-reference/get-users-id-tweets

Using Azure's cognitive services to calculate sentiment scores https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/quickstarts/client-libraries-rest-api?pivots=programming-language-python&tabs=version-3-1#language-detection

Using Wordcloud to generate a wordcloud: https://amueller.github.io/word_cloud/index.html

How to run:

Get a twitter developer account (https://developer.twitter.com/en/apply-for-access) and an azure account (https://azure.microsoft.com/en-us/services/cognitive-services/) and add your own tokens in the config.yaml in twitter-SA-backend/services/web/project.

From twitter-SA-backend/services/web/, run docker build -t twitter-sa-backend . and then docker run -p 5000:5000 twitter-sa-backend. This should run the backend on localhost:5000.

Frontend:

Using React: https://reactjs.org/

Using CanvasJS for Donut chart: https://canvasjs.com/

Using Tailwind for styling: https://tailwindcss.com/

How to run:

From twitter-sentiment-analysis-frontend, run npm craco start. This will run the frontend on localhost:3000

Media

Example when running analysis on @certikorg: certikorg

Example of empty state: Empty State

Video of running an analysis on @certikorg (There are a lot of tweets so the service from Azure takes time, hence the slow load time shown here):

React.App.-.Brave.2021-05-27.02-30-17.mp4

Mobile views:

Mobile view pt 1

Mobile view pt 2

References: https://developer.twitter.com/en/docs/tutorials/how-to-analyze-the-sentiment-of-your-own-tweets