In the days before the Iowa Caucus Twitter data reveals that presidential candidates are talking about the economy, foreign policy, and themselves.
It's still "the economy, stupid." And, it's other domestic issues in the US. And it's foreign policy. And it's the campaign itself. In politics, feelings matter. Like no other election in history, in this election cycle, the establishment is out and stoking voter passion using social media is in.
Campaigns spend their time talking about a diverse flock of issues. This week we tried to figure out what each candidate talks about on Twitter in the final days before the Iowa Caucus and New Hampshire Primary. We logged and measured tweet text content, and the most frequently-used keywords associated with the Twitter accounts of each candidate, then separated candidate keywords into topical clusters: economy, domestic, foreign, campaign, and other.
We also examined the magnitude of each of the top 10 keywords, to get a sense of how frequently each word was used in individual Tweets.
Takeaways from Twitter content analysis:
- We looked at the top ten words uttered (a single Tweet can contain multiple keywords 'utterances') by the candidates and broke down those utterances by category. Here is what we found. The topics all candidates discussed most frequently on Twitter were the campaigns themselves, foreign policy, domestic policy, the economy, and other keywords unrelated to politics or the campaign.
- @TedCruz is the only candidate that almost exclusively discussed his campaign, as opposed to any of the other category areas.
- For most of the leading Republican candidates, the campaign itself is the plurality category. Meaning, these candidates Tweeted about their own campaigns more than any other single topic.
- In the keyword cluster of recent utterances, @TedCruz's campaign was mentioned in 85% of Twitter keywords, followed by @RealDonaldTrump at 81%, @MarcoRubio at 74%, @John Kasich at 71%, and @JebBush 53%.
- In contrast, @HillaryClinton Tweeted about her campaign 44% of time time, followed by @BernieSanders at 27%, and @MartinOMalley at 23%.
- Democratic candidates also Tweeted about domestic policy and the economy more than Republican candidates.
- Republican candidates Tweeted about foreign policy more than any Democratic candidates, but also Tweeted about their own campaigns more than any of the Democratic candidates.
- Perhaps in reaction to attacks questioning his experience, @RealBenCarson Tweeted about foreign policy more than any other candidate.
Our charts were produced with assistance from political scientist William P. Stodden, using Microsoft Excel.
Sentiment analysis extra credit
The Natural Language Toolkit (NLTK) Python script running on Text Hacking is a free and well-regarded natural language processing tool that can help lend further insight on the positive or negative sentiment associated with candidate keyword clusters. The tool generates a simple positive or negative rating based on the keywords provided. Candidate Twitter keywords produce interesting results. While we cannot vouch for the tool's credulity, the code is open source and can is available on on GitHub.
This post is not an analysis of electorate data, and this is not a poll or prediction. We are curious about the relationship between social media and the presidential campaign.
Over the course of the campaign we will continue to perform simple data analysis. In the future we hope to correlate sentiment with follower actions like retweets and likes. We hope to uncover additional and unique insights.
If you're a data scientist, social media professional, or inquisitive TechRepublic reader we'd love your ideas on how to inspect campaign social media data. Please leave a comment below, or ping us on Twitter @TechRepublic.
- 2016 US presidential candidates: Follow the strategists running their digital campaigns
- Election Tech 2016: How social media and big data changed everything, a Q&A with Joe Trippi
- Election Tech 2016: Social media data tells a different story on the first US presidential debate of 2016
- How 'artificial swarm intelligence' uses people to make better predictions than experts
- Sentiment analysis: Understanding customers who don't mean what they say