Sentimental Politics

Sentimental Politics

The purpose of this project is to explore sentiment analysis using natural language processing in machine learning. To do this, we created multiple machine learning models with different classifiers using a previously analyzed twitter dataset from Sentiment140. We then gathered all tweets mentioning the top four Democratic candidates in the Presidential 2020 over a time span of a week, applied the most optimized machine learning model to them, and created visualizations of our results.


GitHub Repository
Technologies Used
Data Sources
Example Code
  • Languages
    • Python
    • Javascript
    • HTML
    • CSS
    Data Extraction and Munging
    • jupyter notebook
    • pandas
    • numpy
    • spacy
    • tweepy
    • scikit-learn
    • NLTK
    Database
    • sqlite3
    • SQLAlchemy
    Data Rendering and Visualization
    • Flask
    • Jinja
    • d3
    • JQuery
    • Plotly
    • JQCloud
    • Foundation
    • Mondernizr
  • Sentiment140 DataSet: Previously analyzed twitter corpus that we used to train and test machine learning models for twitter sentiment analysis.

    • Methodology: TwitterDistantSupervision09.pdf
    • Citation: Go, A., Bhayani, R. and Huang, L., 2009. Twitter sentiment classification using distant supervision. CS224N Project Report, Stanford, 1(2009), p.12.

  • Multinomial Naive Bayes Classifier
    Multinomial Naive Bayes Classifier Multinomial Naive Bayes Best Model

    Complement Navie Bayes Classifier
    Complement Naive Bayes Classifier Complement Naive Bayes Best Model