Game of Thrones Sentiment Analysis

Laptop screen displaying a 'Game of Thrones Analysis' data chart with sentiment analysis bar graph and filters for seasons, episodes, sentiment lexicon, and word connotation.

Background and Class Context

A class project for STAT 133, Concepts in Computing with Data. The class premise was centered around understanding computational data analysis with a focus on key principles: understanding data formats and manipulation techniques (wrangling, reshaping, tidying), producing insightful visualizations, applying fundamental programming concepts for data analysis, and leveraging computational tools to streamline workflows, execute the data analysis cycle, and enhance reporting through dynamic documents and web apps emotions play a role in the world of digital design

I developed a Shiny app at UC Berkeley to analyze text sentiment in the television series Game of Thrones. Sentiment analysis examines the emotional tone of a text by assessing individual words and their associated sentiments—such as positivity, negativity, surprise, or disgust—using text mining techniques. The app allows users to explore sentiment trends interactively, offering filters for seasons one through eight, individual episodes, specific words, and three sentiment lexicons: AFINN, Bing, and NRC. This tool provides a dynamic and data-driven way to analyze the emotional landscape of the show's dialogue.

App Layout and Features

Table with sections labeled 'Table output', 'Plot output', and 'Text output'; the 'Table output' section includes four columns with headers: 'Season of show', 'Episode of show', 'Type of sentiment lexicon', and 'Word selection'; the 'Plot output' section contains a description about sentiment or bigram analysis; the 'Text output' section mentions numeric or text output to assist in graph interpretation.

Types of Analysis

Bing lexicon - categorizes words in a binary fashion into positive and negative categories

Afinn lexicon - assigns words with a score that runs between -5 and 5, with negative scores indicating negative sentiment and positive scores indicating positive sentiment

Nrc lexicon - categorizes words in a binary fashion (“yes”/“no”) into categories of positive, negative, anger, anticipation, disgust, fear, joy, sadness, surprise, and trust

Bigram analysis - what kind of words tend to be associated with other words

Final Product