Introduction

The purpose of this project is to analyze public Bluesky posts about Xavier Becerra and Steve Hilton to investigate whether social media sentiment can help predict the outcome of the California governor’s race.

Data Collection and Cleaning

Bluesky posts were collected using RStudio. Posts unrelated to the candidates, including references to Hilton hotels and Paris Hilton, were filtered from the dataset.

Sentiment Analysis

The Bing sentiment lexicon and tidytext package were used to analyze positive and negative language in the collected posts.

Sentiment Analysis Results

The analysis compares sentiment expressed in public Bluesky posts about Xavier Becerra and Steve Hilton.

The following chart displays the number of positive and negative sentiment words associated with each candidate.

Human Validation Results

I manually evaluated 20 randomly selected Bluesky posts and compared my labels with the automated sentiment predictions.

The automated sentiment analysis matched 17 of the 20 human labels, producing an accuracy of 85%.

The sample contained 13 negative, 6 neutral, and 1 positive human labels.

Although the model demonstrated strong agreement with the human labels in this sample, sentiment does not always represent political support. Sarcasm, context, and candidate mentions may affect accuracy.