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.

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.

Does Your Dashboard Measure Up?

What does the ideal dashboard look like? Here's a deep dive into what works and what doesn't in dashboards.


Re: Mental Health
  • 12/12/2017 8:44:44 AM
NO RATINGS

I think there are probably enough other sources of data that could be matched up to the twitter data that some very realistic pictures could be created.  Flight data should be available, key meeting data is out there I'm sure, I think we have data on how often ex presidents went on vacation, played golf, ate a Big Mac, etc.  I don't see why Trump's movements would be any less visible than past presidents.  Matching tweets up to vacations, flights and meetings should give a feel for emotional state and contributing factors at the very least.  Assuming trends such as light hearted tweets coming during times at Mar-A-Lago or more somber tweets coming pre-flight it would be interesting application of the data. 

Re: Mental Health
  • 12/11/2017 6:46:26 PM
NO RATINGS

The more data you get, the better conclusions you could draw.

Re: Mental Health
  • 12/11/2017 10:20:28 AM
NO RATINGS

With so many variables that might account for the tweet behavior, and many of thiose variables may well never be known, I'd hesitate to place a bet on an explanation for what I see in the analysis. But, interesting enough to view for our natural curiosity and desire to explain.

Re: Mental Health
  • 12/11/2017 8:17:04 AM
NO RATINGS

Finding patterns could be fun, such as using specific phrases at specific times of day or the first tweet of the day and how it sets the tone for the rest of the day.  I wonder how many people are combing through this now to see if he has tweeted during a briefing or a meeting with a foreign leader.  Mental health aside, habits could be determined by using the volume of data that this contains. 

Twitter and my Mental Health
  • 12/11/2017 6:36:38 AM
NO RATINGS

Louis writes

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.

 

I mainly use Twitter as a means of disseminating links to news items or analyses that I deem important, and to my own online published material. I used to make the mistake of getting involved in Twitter "conversations", but with the absurdly small character limit I found that foolish and frustrating.

Twitter seems to be a useful platform for disseminating informational links. The big drawback for me is the sheer volume of postings I receive. About every 10 days or so I take a look at my Twitter account and usually find a few jewels of valuable articles, but there are mountains accumulating that I just haven't had the time to look at.

 

Re: Mental Health
  • 12/10/2017 6:20:03 PM
NO RATINGS

"You have to judge quality of the tweets as well as quantity"

 

Excellent point Tom, but can you imagine the debates that would go on in regards to the quality of a tweet ?    To you and I ( and most ) it would be pretty clear, but we have devolved into a society where "contradiction for contradiction sake"  is more the rule than the exception. 

This type of baseless argumentation just distorts the issue or question and is probably ultimately what those who practices this dubious skill actually want.  Unfortunately there are too many present day examples of this.   

 

But from an Analytical purist approach, I agree and see your point.

Re: Mental Health
  • 12/10/2017 11:26:23 AM
NO RATINGS

You have to judge quality of the tweets as well as quantity.

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

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
NO RATINGS

@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
NO RATINGS

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.

Page 1 / 2   >   >>
INFORMATION RESOURCES
ANALYTICS IN ACTION
CARTERTOONS
VIEW ALL +
QUICK POLL
VIEW ALL +