Skip to content

A Flask App for sentiment analysis and other statistical analysis for Twitter. Search for a word and analyze it using Python. Visualize it.

Notifications You must be signed in to change notification settings

skmrSharma/Word-Analysis-Using-Twitter

 
 

Repository files navigation

Word-Analysis-Using-Twitter

This is a project where you type a word and you get analysis on that word in Twitter The Analysis contains

  • Pie chart on the sentiments on tweets

  • Word Cloud on most used words in tweets

  • Top 3 frequently used #hashtags

  • Tweets with filter based on sentiments

  • Pie chart on from which devices tweets was tweeted

Requirements

Python >= 3.7.4 is required. May or may not work on older versions.

The following packages are needed:

  • flask
  • tweepy
  • numpy
  • pandas
  • stylecloud
  • textblob
  • unidecode

Note: This app uses Google Charts API to create pie charts. If the pie charts are not displayed, try running the app in Incognito mode of your browser. The reason is some browsers may block the API since it uses cross-site cookies. Cookies created in Incognito mode are deleted upon closing the window, so it might work there.

You also need to register as a developer at https://developer.twitter.com/en/apply-for-access and download the auth.k file which contains the authorization key for accessing the Twitter API. Keep the auth.k file in the same directory as app.py.

How-to-run

  • Clone this repo or download and extract the zip.
  • Run from main directory: python -m flask run
  • Open the link obtained in browser
  • Enjoy !!!

About

A Flask App for sentiment analysis and other statistical analysis for Twitter. Search for a word and analyze it using Python. Visualize it.

Topics

Resources

Stars

Watchers

Forks

Languages

  • Python 45.7%
  • CSS 27.2%
  • JavaScript 15.4%
  • HTML 11.7%