A sentiment analysis of the most recent @realDonaldTrump tweets

There had been a repeated assessments of psychiatrists during the presidentship of Donald Trump (“The Dangerous Case of Donald Trump: 37 Psychiatrists and Mental Health Experts Assess a President – Updated and Expanded with New Essays“).

I am now analyzing here the 3.200 most recent tweets using a computational pipeline created already some years ago using the following packages

# -- based on https://www.r-bloggers.com/analyzing-the-us-election-using-twitter-and-meta-data-in-r and http://juliasilge.com/blog/Joy-to-the-World/
list.of.packages <- c("twitteR","ggplot2","httr","rjson","tm","gridExtra","lubridate","wordcloud","devtools","syuzhet","SnowballC","scales","reshape2","dplyr","stringr")
lapply(list.of.packages, require, character.only = TRUE)

The choice of words isn’t unexpected – just what is already known – with “great”, “president”, “will” and “trump” being the most frequently used words.

wordcloud

All tweets can be classified by sentiment scores of the words used. If we look at the total counts, three categories are being used excessively: “positive”, “negative” and “trust”.

sentiment scores

Trust seems to be used not so much in the context of personal relationship but in the context of economics  of “deal”. As it has been speculated that he suffers of cyclothymia ( 0.4% to 1% of the U.S. population has cyclothymia) we can look also the time course of sentiments.

time series on a daily basis
time series using 3 day intervals
time series weekly basis

Variation (dispersion) is high, in particular on a daily basis, while in the absence of any normal values it is difficult to make any definite conclusions. Positive and negative emotions are not always in parallel, there are “converging situations” nearly every month where negative emotions go up and positive emotions go down indicating a more profound mood swing.

The correlation plot shows the expected decline of negative scores with increasing positive scores. Many values are outside of the 95% confidence bounds, making  the sentiment score (and even the personality) largely unpredictable.

correlation plot

An extended analysis including more reference accounts would be necessary for further conclusion. Nevertheless, there is evidence of  mental instability as noticed already by various expert testimonials.

There is first the emergency situation his mental instability poses as a result of the power that he holds and the weapons he has at his disposal…There is first the emergency situation his mental instability poses as a result of the power that he holds and the weapons he has at his disposal. But there are also the effects on public health through his fomenting of violence. Hate crimes have seen unprecedented spikes, bullying is widespread, and white supremacist killings have doubled. There are also statistics on the rise of stress levels that are nationally worse than during World War II, the Vietnam War, the Cuban Missile Crisis, and September 11 terrorist attacks. He is also destabilizing the global scene by alienating allies, emboldening dictators, reigniting nuclear proliferation, and launching a trade war in ways that are predictable from his mental impairments. These are not just matters of policy but arise out of a troubled relationship with reality, a propensity to attack if questioned or even slightly criticized, and dangerous behavioral patterns that need to be spoken about.

There is not so much to add to man who believes in his “great and unmatched wisdom”. Frank Zappa once said “Politics is the entertainment branch of industry”.