Earlier this month visual effects artist Todd Vaziri put forth the idea that Republican presidential candidate Donald Trump likely shares his Twitter account with campaign ghostwriters. The assumption was based on the curious differences in tone and message of @realDonaldTrump on the social media platform. According to Vaziri, Trump most likely used his Samsung Galaxy Android smartphone to tap out the most inflammatory microblog messages whereas the more toned-down tweets came from his staff using their iPhones. Now a quantitative analysis has proved him correct.
Data scientist David Robinson saw Vaziri’s speculation, which was neither new nor terribly shocking, as the perfect opportunity to test new tools he had developed to analyze the emotions behind social media posts. After mining nearly 1,400 messages from @realDonaldTrump, Robinson confirmed that the account’s Android and iPhone tweets were from different people who posted at different times of the day and used hashtags, links and retweets in distinct ways. He also found that Trump’s Android tweets were for the most part angrier and more negative than his staff’s iPhone messages, which generally featured benign announcements and images. “My goal was to determine the difference between the iPhone and Android tweets—and to see whether the suspicion of Todd Vaziri and others could be backed up quantitatively,” says Robinson, who last year earned a PhD in quantitative and computational biology from Princeton University and now works for Stack Overflow, a question and answer site for computer programmers.
Robinson’s tools are a form of sentiment analysis, a way to associate emotions such as happiness, sadness or anger with a sample of natural language. “The approach I used is one of the simplest: to count words assumed to be associated with each emotion,” says Robinson, who used the NRC Word–Emotion Association Lexicon to match words with emotions. That reference guide associates words like “crazy,” “angry” and “fight” with anger whereas words like “winning” and “love” indicate joy. Robinson used an open-source text analysis tool he developed with fellow data scientist Julia Silge to automate the counting and attribution of words in Trump’s tweets.
Every non-hyperbolic tweet is from iPhone (his staff).— Todd Vaziri (@tvaziri) August 6, 2016
Every hyperbolic tweet is from Android (from him). pic.twitter.com/GWr6D8h5ed
Robinson found that Trump himself uses nearly double the number of words related to disgust, sadness, fear, anger and other negative sentiments than tweets posted to his feed via iPhone. In addition, the iPhone tweets were 38 times more likely to contain either a picture or a link, which Robinson attributes to the campaign’s interest in calling attention to significant events and projecting some semblance of diplomacy, such as wishing the U.S. Olympic team good luck. Another tell was Trump’s disregard for Twitter’s retweet capability—instead tending to copy and paste tweets he wanted to pass around and placing those messages in quotation marks, according to Robinson. “It’s worth noting that many of the most striking differences between iPhone and Android weren't about sentiment but about the use of hashtags, photos, links and retweets,” he says. “Combining those results with the sentiment analysis helps give a more robust picture of the iPhone/Android difference.”
The ability to distinguish whether a tweet came from Twitter’s iPhone or Android phone app itself is no great mystery. Every app that runs on Twitter must be registered with the developer’s platform and identify itself to the social media site. A number of Twitter apps such as TweetDeck and Echofon, which help people organize the daily deluge of tweets, likewise identify the platform used to post a particular message.
Robinson’s analysis will be of broader interest beyond political campaigns, says Brad Hayes, a postdoctoral associate in Massachusetts Institute of Technology’s Interactive Robotics Group. Hayes is perhaps best known as the creator of DeepDrumpf, the infamous Twitterbot that produces fake Donald Trump tweets by emulating the Republican presidential candidate’s word choices and speech patterns. The automation of social media posting is common among celebrities and public figures who find it difficult to keep up with the demands of filling their news feeds. “It’s natural that analyses such as Robinson's will be of increasing interest to ascertain when an online presence is likely being piloted by its actual owner,” Hayes explains.
Sentiment analysis is also popular among marketers, who use the technology to estimate the public’s sentiment toward a particular brand. If McDonald’s wants to know how customers feel about their product compared with Burger King or Wendy's, they might download thousands of tweets and examine the emotions expressed in the content, according to Robinson. “This could help their marketing strategy, for example, [by] measuring their customer's biggest complaints and [identifying] their most threatening competitor,” he says.
Social media scrutiny is also being used to try to predict economic trends and stock market performance, although the results have been inconclusive. “Sentiment analysis is a very specific tool that's useful in certain situations, but it isn't magic,” Robinson notes.