Let's Analyze Trump's Tweets

Since Trump became the US president, many people have noticed that he posts a lot of tweets. While some people choose to analyze and critique the content of those tweets, I was more curious about something a little less controversial -- the timing and quantity. Follow along as I dig into some twitter data, and find the best way to visually analyze it!

But first, speaking of "tweets," here's a picture of my friend Danielle's favorite tweeter. Thanks for letting me use your picture, Danielle!

As I was looking into this topic, I came across a related graph on reddit. This pointed me to the data I would need, and served as a good starting point.

In my version (below, and click through here to see the full-sized interactive version), I decided to make a few changes.

  • Rather than using a 3-color gradient, I used a single color with transparency. That way, when multiple tweets lined up in nearly the same spot in the graph, the colors would combine and make a darker shade.
  • I added a note indicating when the data snapshot was taken (Nov 30, 2017).
  • I added time labels along the right-hand-side axis tick marks.
  • I include a blank space for December in the axis, making it more evident that this data does not include December tweets.
  • I left off the 'Time' label on the Y-axis (I think people will know that these are 'time' values).
  • I added 'Noon' and 'Midnight' labels on the time axis, to help prevent confusion between 12pm and 12am.
  • I use reference lines between the months, instead of in the middle of the months.

While importing the data, I noticed that there were actually tweets available for quite a few years, and thought it might be interesting to also plot the previous years' data. The original author also went down this path, posting the following graph in a follow-up comment on the reddit thread. But his new graph had several problems. Why didn't the "High Tweet Density" colors in this graph match up with the colors used in the previous graph? (Has the definition of "High" changed?) And the tick marks & labels along the bottom axis are poorly chosen (looks like he let it auto-scale, and didn't include the year in the labels, which makes them very confusing).

In my version (below, and click through here to see the full interactive version), I label the bottom axis by year, and add reference lines between each year. I also go back to 2009, rather than just 2013 (if you're going to show a historical graph, why not go back as far as you have data, eh?)

Looks like Trump's tweeting habits have varied over the years - can you correlate any events, or maybe his "job changes" with the density of his tweets? Or perhaps he changed the type of phone he was using in early 2013? I wonder if he was using an automated system to tweet during the night, in the 2013/2014/2015 time period? Perhaps he had employees tweeting for him?

It was a big surprise to me that it appears Trump has actually been tweeting less since he became president! What interesting things do you see in these graphs?

[This blog originally appeared on SAS Learning Post, and you can read the original there.]

Robert Allison, The Graph Guy!, SAS

Robert Allison has worked at SAS for more than 20 years and is perhaps the foremost expert in creating custom graphs using SAS/GRAPH. His educational background is in computer science, and he holds a BS, MS, and PhD from North Carolina State University. He is the author of several conference papers, has won a few graphic competitions, and has written a book calledSAS/GRAPH: Beyond the Basics.

Let's Analyze Trump's Tweets

How often does US President Donald Trump tweet? Here's a data visualization.

What's the Most Likely Location for Amazon's HQ2?

Where should Amazon locate its second headquarters? CNBC put together a report card rating several locations. Here's an improved data visualization of that scoring.

Re: Mental Health
  • 12/9/2017 3:26:19 PM

Thanks for the information PC.   As you can probably tell I don't think much of tweets or tweeting.  I recall overhearing that the character limit had been increased but wasn't certain of the actual number.  

I can understand then intent of tweeting and don't begruge those who do, but certain institutions and individuals should have more important matters to concern themselves with.  

If there is something general in nature that concerns the country I would be more in favor it's occasional use but how it is being used today is purely annoying and the sad part about it is that  those of us who would have never known about a tweet are informed of them by content craving media outlets.

Well regardless, I agree 36k over a lifetime of use is quite a bit.   Some of us have alot of time on our hands.

Re: Mental Health
  • 12/9/2017 11:02:45 AM

@Louis - the classic twitter limit is 140 characters, although they recently increased this to 280.

Whatever else one thinks, the man is certainly prolific - over 36,000 tweets.

Re: Mental Health
  • 12/7/2017 3:15:10 PM

Yes. We probably can do it now come to think of it and it would not surprise me at all if there is something "well thought out" to it as opposed to pure insanity.

Re: Mental Health
  • 12/7/2017 3:00:37 PM

I would think we could find a pattern to the tweets. If so, it is probably rational and not a mental health issue.

Re: Mental Health
  • 12/7/2017 2:47:22 PM

@tomsg   Very well could  be.  I suppose twenty years from now we will be able to understand the mental health aspects from tweets, unfortunately IMO for now we are prisoners to the 180 characters that many think can convey a coherent message.

Re: Tweeter-in-Chief
  • 12/7/2017 2:42:07 PM

Thanks Lyndon_Henry for finding some sort of rational explanation of his tweets, I was really having a difficult time finding anything meaningful from the data at all.

Mental Health
  • 12/7/2017 2:20:02 PM

I wonder if you can assess mental health from tweets? Many of the tweets are not rational, but that could be a plan.

Re: Tweeter-in-Chief
  • 12/7/2017 10:51:50 AM

@Lyndon, I agree.

Re: Tweeter-in-Chief
  • 12/6/2017 4:43:21 PM

<Maybe this suggests that the demands of the office are a lot heavier than whatever he was involved with in the past?> @Lyndon_Henry that makes sense, especially in light of the fact that he still has a hand in his business operations.

  • 12/6/2017 4:30:42 PM

So far I can discern virtually nothing of great significance regarding Trump's Twitter activity. From early 2016, when the campaign was starting to really heat up, Trump seems to have slacked off the heavy Twittering in the 2-5 AM period ... maybe acceding to demands from his campaign handlers (or his own fatigue) to get more sleep? Since assuming the duties of office in 2017, his heaviest activity seems to be concentrated in the 6-9 AM period, while substantially "lightening up" the rest of the day. Maybe this suggests that the demands of the office are a lot heavier than whatever he was involved with in the past?

<<   <   Page 2 / 3   >   >>