The Meaning of Speech

Sentiment Analysis of Trump's Tweets

Created by Sneha Somaya

Whitehouse and Twitter

"The Meaning of Speech" Curriculum Package teaches students how to perform sentiment analysis on textual data while considering the political meaning of that data as speech. 

This project was realized with the funding support from the Mozilla Responsible Computer Science Challenge grant.

All data is made from real-world phenomena, be it the movement of the planets, animal behavior, or human bodies and activities. Working with data always has a bearing back on how human beings know and act in the world. The dataset that you're about to work with in this homework consists of a compilation of President Trump's Tweets. It's important to acknowledge that these Tweets are more than just data -- they're the means by which the President expresses his opinions, performs public and foreign policy, and shapes the lives of people in the US and all over the world.
Intro to homework

Trump, Twitter, and Text

Jupyter Notebook(link is external) 

Discussion Worksheet: Connecting Data and Society, Sentiment Analysis on Trump's Tweets(link is external)

Grading rubrics and solutions available for instructors upon request ( sends e-mail)).

Learning outcomes

By working through this notebook, students will be able to:

  • Understand how technical data science tools can be applied to real world problems, how they can be used to investigate and expand one’s understanding in this case, of politics and public communication.
  • Know what sentiment analysis is, how to do sentiment analysis, and understand its use in a social media context.
  • Recognize that the sentiment of a word is context-dependent and consider how this affects the sentiment score that a word is given.
  • Understand the significance of different aggregation and abstraction processes used in creating a sentiment score and their relationship to the meaning and tone of text.