In this post, I explore which presidential candidates are discussed most frequently in the American news media.
Note: This post has become somewhat outdated since it’s original publication because the dataset (linked via FiveThirtyEight’s GitHub) has changed variable names and some of the data has changed.
You can find a less technical version of this post without code on my blog.
In this post, I explore which presidential candidates are discussed most frequently in the American news media. I do so using the GDELT Television API, which pulls data from the TV News Archive. For sake of convenience, I use an existing dataset found on FiveThirtyEight’s GitHub.
Load Libraries and Data
The dataset contains information on 22 presidential candidates, recording weekly the number of clips which mention a presidential candidate (matched_clips) and dividing them by the total number of clips that week (total_clips) to reveal the percent (pct_of_all_candidate_clips) of clips which mention that candidate.
Of interest to us is the name of each candidate and the percent (pct_of_all_candidate_clips) of media mentions they receive on a weekly basis.
We can begin with a simple analysis of which candidates are discussed most frequently by the media by averaging their weekly proportion of mentions in the media.
Somewhat unsurprisingly. Joe Biden and Bernie Sanders lead the pack in media attention. Joe Biden tends to receive significantly more media attention than the average candidate (a weekly average of 0.9% of overall media content compared to 0.14% for the average candidate).
How has that coverage changed over time?
Evidently, much of Joe Biden’s popularity in the media can be explained by a few large spikes in weekly media mentions. We can explore the distribution of weekly media mentions using a visualization known as a density ridge plot.
This plot illustrates that most candidates enjoy the same levels of media coverage from one week to another. Joe Biden, however, often has weeks in which he receives much more attention than usual, as evidenced by his small peaks throughout the plot. Bernie Sanders, Kamala Harris, and Beto O’Rourke also experienced a few jumps in attention, likely when they announced their candidacy for the presidency.
This raises an interesting question: when did candidates experience the most drastic changes in media attention? For example, were there any weeks in which a candidate who normally enjoys nearly no media attention began to get a lot of it?
We can answer this question by calculating the difference between one week’s coverage and the prior week’s coverage (using the lag function).
Unsurprisingly, the bars tend to mirror one another. If a candidate enjoys a steep increase in media attention one week, they are likely to see a correlated drop in the following week (if that week were really a spike in attention). The plot suggests that Joe Biden’s announcement (on April 25th) led to the most dramatic change in media attention in the 2020 cycle so far. Bernie Sanders also witnessed a spike in attention in the week following his announcement on February 19th. The same is true for the other candidates included in this plot.
Finally, I am interested in who is “winning” the race for media attention. Although a previous plot has shown media attention over time, this data can be somewhat hard to digest and interpret as so many candidates crowd the lower bound of the data (as they receive little media attention compared to Joe Biden).
By constructing a bump chart, I am able to depict the rank of each candidate in terms of their media attention in a given week. This type of visualization assigns each candidate a categorical rank and makes their progress throughout the campaign easier to visualize.
As an added benefit, this plot was difficult to construct and so it was rewarding to finally finish.
Let’s focus on the meteoric rise of Pete Buttigieg:
1) Bernie Sanders and Joe Biden consistently receive the most attention from the media.
2) The most stark increase in media mentions can be seen in the rise of Pete Buttigieg, who began not even in the top 10 but now receives the third most media mentions of any candidate.
3) Cory Booker and John Hickenlooper have all but disappeared from the media, while most other candidates remain in a place similar to where they began.
Future work could capitalize upon this analysis by looking at the content of media coverage of candidates. In similar work, I have performed preliminary sentiment analysis on the Tweets of presidential candidates. Other researchers have shown that media coverage of female presidential candidates tends to be more negative than coverage of male candidates. Continuing this work with a larger dataset could reveal interesting insights about the relationship between media, politics, and sexism.