Many people were talking about the 2021 governor’s race in New Jersey online, especially after the first official debate. In this post, I present an analysis of online chatter about the campaign created using the content of tweets posted by Governor Phil Murphy and his Republican challenger, Assemblyman Jack Ciattarelli, along with tweets posted about both of them in the last 30 days by Twitter users.

Part 1: Twitter Use by Candidates

Word Choice Highlights Differing Priorities

I first queried the Twitter API to retrieve all posts made to both Governor Phil Murphy and Assemblyman Jack Ciattarelli’s campaign twitter accounts in the last 30 days in order to analyze differences in content between the two candidates.

Note: Governor Murphy’s account contained tweets that were posted in Spanish during this time period. In order to ensure a consistent analysis, all of Governor Murphy’s Spanish-language tweets were excluded from this analysis and only tweets written in English were retained. This analysis is limited only to the campaign/personal twitter accounts of the candidates (@Jack4NJ and @PhilMurphyNJ) and no posts from official governmental accounts were used.

The word cloud analysis illustrates some key differences in campaign rhetoric coming out of both camps. First, it’s apparent that Ciattarelli uses his opponent’s name in tweets far more often than Murphy, likely due to Ciattarelli’s position as a challenger seeking to oust an incumbent. Murphy also invoked the name of his opponent in tweets, but he did so to a far lesser extent than Ciattarelli.

This visualization also reveals what each side is not talking about. This contrast is clear on the topic of taxes. The word “taxes” appears as one of the largest terms in Ciattarelli’s side of the word cloud, but does not appear at all on Murphy’s side. The same can be said of the terms “gun safety,” and “reproductive” (likely referring to legislation codifying abortion rights) which was one of the topics frequently mentioned by Murphy but not at all by Ciattarelli. Clearly, both candidates have different priorities in the issues they’re emphasizing.

It was not surprising to see that “fairer”, “stronger” and “forward” were also among the words most frequently used by Murphy. This was unsurprising as these are the motto of his reelection campaign and Murphy has consistently used these words to characterize his policy agenda.

Twitter Sentiment Shows Ciattarelli Was More Negative Than Murphy

Another interesting difference between Murphy and Ciattarelli was whether the overall content of the tweets that they posted on a given day expressed a positive or negative sentiment. I conducted sentiment analysis on both candidates’ tweets during the past month and visualized them as a line chart.

As I hypothesized, Governor Murphy’s overall sentiment has been more positive than Jack Ciattarelli’s throughout the campaign thus far. This is what one would expect to see from an incumbent politician. Murphy is an incumbent defending his record, whereas Ciattarelli is a challenger attempting to paint his opponent in a negative light, so it wasn’t surprising to see that relative to Murphy, Ciattarelli’s sentiment was overwhelmingly more negative.

In the days leading up to the debate, Murphy’s overall sentiment sharply declined, likely coinciding with the launch of the governor’s negative ad campaign targeting Ciattarelli. Going into the debate, Murphy was still more positive than Ciattarelli, but his overall sentiment sharply declined relative to its high point in previous weeks.

After the debate, both candidates became more positive in their sentiment, with Ciattarelli having a larger increase compared to Murphy.

Part 2: Conversations About the Candidates

In this section, I analyzed tweets that were posted about the candidates, rather than only those posted by the candidates themselves. To do this I queried Twitter’s 30-day API endpoint and requested the maximum amount of tweets available with 1 call to the API, which netted 3000 tweets about Phil Murphy and just over 2300 for Ciattarelli.

Differences in Hashtag Use

Hashtags are an interesting item to study when looking at topics discussed on social media data, so I created two network diagrams covering tweets about both candidates. The network diagrams show the relationship between hashtags that were used together in Twitter posts.

Tuesday night’s debate was clearly a driver of chatter related to the race. The hashtag “#njgovdebate” was the most popular among tweets referencing either candidate in the last 30 days.

Following the debate, Team Murphy doubled down on negative campaign rhetoric against Jack Ciattarelli by linking his statements made during the debate with the hashtag “#jackwilltakeusback,” which was used most frequently with tweets that also referenced the debate hashtag. Several pro-Ciattarelli and NJGOP hashtags, such as “#letsfixnj” and “#jack4nj” were also used frequently within posts about the debate.

Two other clusters of hashtags were apparent from this network analysis as well. A range of issue-oriented hashtags, such as “#medicaid,” “#healthcare,” “#votingrights” and “#jobs” appeared in a cluster used in conjunction with the hashtags “#njpolitics,” “#nj” and “#newjersey,” suggesting particular concern with these issues among Twitter users.

Who Is Driving the Conversation?

Lastly, we’ll take a look at which Twitter users have been driving the conversation about the two candidates by analyzing how frequently they appeared in @ mentions within this snapshot of Twitter data.

The network visualization shows that the Twitter accounts of the candidates themselves were the most frequently mentioned. Within this snapshot in time, Phil Murphy’s campaign account (@philmurphynj) was the most frequently mentioned, followed by Jack Ciattarelli’s (@jack4nj). The third most mentioned account was Murphy’s official account (@govmurphy).

It was interesting to see that a number of influential political consultants, journalists and academic institutions were also frequently mentioned along with the candidates in tweets regarding the election.

Methodology

All analysis was performed using R 4.1.1 and the quanteda package. Sentiment analysis was performed using sentimentr.