-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
64 lines (40 loc) · 5.65 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html>
<head>
<title>Trump: Twitter & Golf</title>
<link rel="stylesheet" href="style.css" />
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</head>
<body>
<div class="container">
<h1>What if Trump had <br>played more golf?</h1>
<hr class="divider">
<a class="author" href="https://ovdixon.com" target="_blank">by Oliver V. Dixon</a><br>
<p>What happened when I was handed a dataset of over sixteen-thousand Donald Trump tweets? Well, firstly I swore… because, like many people, I have developed an acute case of TFS or Trump Fatigue Syndrome. This affliction is characterised by an induced state of watching the same shitty soap opera on repeat. Only to sober up and realise, this is not Home and Away, this is America. </p>
<p>So, to save myself the pain of analysing these Trump tweets in isolation, I had to branch out; if there is one thing that Trump loves more than himself, it's golf. In fact he loves it so much he made 298 visits to the golf course during his presidency, teed off more than 150 times and cost the taxpayer $146m! This is all according to Trump Golf Count, a website that meticulously logs and shares the former presidents “exercise regimen”. So, with two datasets at hand, I was ready to explore the twitter habits of a president who is “far more emotionally invested in golf than politics.” <sup>1</sup></p>
<p>Before launching into a graph, let’s first understand a little about the data. The trump twitter dataset includes the time stamp, raw text and a sentiment analysis of each tweet. The original archive of tweets can be accessed <a href="https://trumpgolfcount.com/displayfaq" target="_blank">here</a>. The sentiment is a calculation of how positive or negative the language in the tweet is. It was calculated using TextBlob, not a perfect algorithm by any means, but accurate enough to be interesting. Below are two example tweets on either end of the sentiment spectrum.</p>
<div class="image-row">
<div class="image-column">
<img src="img/negative.png" alt="Tweet" style="width:100%">
<figcaption>negative </figcaption>
</div>
<div class="image-column">
<img src="img/positive.png" alt="Tweet" style="width:100%">
<figcaption> positive </figcaption>
</div>
</div>
<p>The golf count dataset includes the date, hours at the club, and whether golf was played, for any time Trump visited a location whose primary offering is golf (i.e., a “golf club). You can read about about how this data was collected <a href="https://trumpgolfcount.com/displayfaq" target="_blank">here</a>.</p>
<p>Despite the obvious frustrations that golfers have with the game - God knows it can be infuriating from time to time - golf has many physical and emotional benefits that players can benefit from. But surely Trump, of all people, would have to be immune to these benefits, right? Well, the data tells a surprising and different story</p>
<div class="plotly" id="plot1" ></div>
<p>When Trump plays less golf, he sends off more angry tweets. Take October of 2020 for example, Trump played golf <i>only</i> 4 times, and sent out a record 151 negative tweets. Or, May of 2020, where Trump made it to the golf course only twice but managed to post a 128 negative tweets. It is comical to think that he fills the void of not being able to tee off, through online tirades. This is a trend that emerged during the second half of his presidency. Perhaps, a delayed realisation that running the world's largest economy by nominal GDP, requires taking a few days off the course. But who can blame him, golf clearly has powerful health benefits and Trump's twitter feed is simply testament to that.</p>
<p>The Golf Count dataset provides the specific hours Trump spent at a club. Correlating this with the timestamp of tweets, we can build a picture of how Trump tweets while actually on the golf course.</p>
<div class="plotly" id="plot2" ></div>
<p>The histogram above represents the distribution of tweets for each hour on days Trump played golf. Although it may seem obvious that Trump would tweet less while actually playing, it is interesting what happens before and after. He seems to psych himself up with a flurry of tweeting before teeing off at around 10am. A few tweets are still sent out while he is on the course. I would like to think the sentiment of which depends on his golfing performance; perhaps a swipe at the "fake news" media after slicing one into the trees. Trump’s enjoyment of the game extends beyond the last hole, with a higher percentage of positive than negative tweets in the hours after playing. </p>
<p>So, in returning to the title of this article, what if trump had played more golf? Throughout the course of his presidency, the press routinely shamed Trump’s golf habit - and righfully so. However, as the data would suggest, Trump uses twitter less when he plays golf and sends out less negative tweets. It may have been the very thing that kept him, relatively speaking, calm and sane. For the American people, well perhaps more of Trump playing golf would have meant less of him running the country. ⚐
<p>You can read about the behind-the-scenes creation of this article alongside some of my other work at <a href="https://ovdixon.com" target="_blank">ovdixon.com</a></p>
<hr class="divider">
<p class="footnote"><sup>1</sup> Eamon Lynch, E. L. (2021, 13 Jan), How the PGA Polished Off Donald Trump, Vanity Fair</p>
</div>
</body>
<script src="script.js"></script>
</html>