ShyamW / Political_Tweet_Analysis

Mines and Analyzes tweets from political candidates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Political Tweet Analysis

This Python project fetches and streams political tweets and analyzes each tweet through graphs and wordclouds.

Analyzed rhetoric elements include:

  • diction (word choice and frequency)
  • syllables (in future)
  • tweet time (in future)
  • tweet frequency

This Project fetches tweets from several famous political candidates including:

  • Donald Trump (@realDonaldTrump)
  • Hillary Clinton (@HillaryClinton)
  • Jeb Bush (@JebBush)
  • John Kasich (@JohnKassich)
  • Ted Cruz (@tedcruz)
  • Carly Fiorina (@CarlyFiorina)
  • Bernie Sanders (@BernieSanders)
  • Marco Rubio (@marorubio)
  • President Obama (@POTUS and @BarrackObama)

Basic Requirements:

  1. Python 2.X (Required)

    • Python 2.7 recommended

        sudo apt-get install python
      
  2. ConfigParser (Required)

    • Used to Read API Key information

        pip install ConfigParser
      
  3. datetime (Required)

    • Used to Get Python Standardized time (included in python 2.7)

        pip install datetime
      

Requirements to Fetch and Stream Tweets

  1. tweepy
    • Used to stream and fetch tweets. Unnecessary for Analyzing tweets.

        pip install tweepy
      

Requirements to Analyze Tweets

  1. matplotlib

    • Used to create graphs

        pip install matplotlib
      
  2. TkInter (Optional)

    • Used in graph creation

        sudo apt-get install python python-tk
      
  3. wordcloud

    • Used in wordcloud creation

        sudo apt-get install wordcloud
      
  4. Image

    • library required for wordcloud

        sudo apt-get install Image
      

About

Mines and Analyzes tweets from political candidates


Languages

Language:Python 100.0%