Nicholas Kunze
“What The World Thinks Of Trump” by FiveThirtyEight uses Pew Research Center data to attempt to glean insight into global opinion about the United States and our Presidents since 2000, specifically Donald Trump who had just been in office for 9 months when this was originally published. 1,000 residents of a number of countries were asked about their opinion on a number of Trumps’ policies, their opinion of the US (done yearly), and their confidence that the US President will “do the right thing regarding world affairs.”
First things first, let’s import our data. There’s different ways to handle this. For this assignment, I’ve pulled in our data from files hosted on a public git repository. We have a number of delimited text files, csvs, each with countries’ populations’ opinions on the US and the President of the US over multiple years as well as specific policies during Trump’s presidency.
wclimate <- read.csv("https://raw.githubusercontent.com/fivethirtyeight/data/master/trump-world-trust/TRUMPWORLD-issue-1.csv")
borderwall <- read.csv("https://raw.githubusercontent.com/fivethirtyeight/data/master/trump-world-trust/TRUMPWORLD-issue-2.csv")
wirannuke <- read.csv("https://raw.githubusercontent.com/fivethirtyeight/data/master/trump-world-trust/TRUMPWORLD-issue-3.csv")
wtradeagr <- read.csv("https://raw.githubusercontent.com/fivethirtyeight/data/master/trump-world-trust/TRUMPWORLD-issue-4.csv")
muslimimgtn <- read.csv("https://raw.githubusercontent.com/fivethirtyeight/data/master/trump-world-trust/TRUMPWORLD-issue-5.csv")
us <- read.csv("https://raw.githubusercontent.com/fivethirtyeight/data/master/trump-world-trust/TRUMPWORLD-us.csv")
pres <- read.csv("https://raw.githubusercontent.com/fivethirtyeight/data/master/trump-world-trust/TRUMPWORLD-pres.csv")
is.data.frame(borderwall)## [1] TRUE
## country net_approval Approve Disapprove DK.Refused
## 1 Canada -71 13 84 3
## 2 France -79 10 89 1
## 3 Germany -81 8 89 3
## 4 Greece -60 18 78 5
## 5 Hungary -14 35 49 16
## 6 Italy -56 17 73 10
## year avg Canada France Germany Greece Hungary Italy Netherlands Poland
## 1 2000 67.50000 NA 62 78 NA NA 76 NA 86
## 2 2002 61.50000 72 62 60 NA NA 70 NA 79
## 3 2003 44.69231 63 42 45 NA NA 60 NA NA
## 4 2004 35.66667 NA 37 38 NA NA NA NA NA
## 5 2005 43.58333 59 43 42 NA NA NA 45 62
## 6 2006 35.33333 NA 39 37 NA NA NA NA NA
## Spain Sweden UK Russia Australia India Indonesia Japan Philippines
## 1 50 NA 83 37 NA NA NA 77 NA
## 2 NA NA 75 61 NA NA NA 72 90
## 3 38 NA 70 37 59 NA NA NA NA
## 4 NA NA 58 46 NA NA NA NA NA
## 5 41 NA 55 52 NA NA 38 NA NA
## 6 23 NA 56 43 NA NA 30 63 NA
## South.Korea Vietnam Israel Jordan Lebanon Tunisia Turkey Ghana Kenya Nigeria
## 1 58 NA NA NA NA NA 52 NA 94 NA
## 2 52 NA NA 25 36 NA 30 83 80 NA
## 3 46 NA 78 1 27 NA 15 NA NA NA
## 4 NA NA NA 5 NA NA 30 NA NA NA
## 5 NA NA NA 21 42 NA 23 NA NA NA
## 6 NA NA NA 15 NA NA 12 NA NA NA
## Senegal South.Africa Tanzania Argentina Brazil Chile Colombia Mexico Peru
## 1 NA NA NA 50 NA NA NA 68 74
## 2 NA 65 53 34 NA NA NA 64 67
## 3 NA NA NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA NA NA
## Venezuela
## 1 NA
## 2 NA
## 3 NA
## 4 NA
## 5 NA
## 6 NA
Alright so we’ve got our data. However, some headers are ambiguous or just not pretty. Let’s rename avg to something more appropriate and prettify what we can. I handle all of the issues in a loop to improve readability and make changes in the future easier.
names(us)[names(us) == 'avg'] <- 'Global_Average'
names(us)[names(us) == 'year'] <- 'Year'
names(us)## [1] "Year" "Global_Average" "Canada" "France"
## [5] "Germany" "Greece" "Hungary" "Italy"
## [9] "Netherlands" "Poland" "Spain" "Sweden"
## [13] "UK" "Russia" "Australia" "India"
## [17] "Indonesia" "Japan" "Philippines" "South.Korea"
## [21] "Vietnam" "Israel" "Jordan" "Lebanon"
## [25] "Tunisia" "Turkey" "Ghana" "Kenya"
## [29] "Nigeria" "Senegal" "South.Africa" "Tanzania"
## [33] "Argentina" "Brazil" "Chile" "Colombia"
## [37] "Mexico" "Peru" "Venezuela"
names(pres)[names(pres) == 'avg'] <- 'Global_Average'
names(pres)[names(pres) == 'year'] <- 'Year'
names(pres)## [1] "Year" "Global_Average" "Canada" "France"
## [5] "Germany" "Greece" "Hungary" "Italy"
## [9] "Netherlands" "Poland" "Spain" "Sweden"
## [13] "UK" "Russia" "Australia" "India"
## [17] "Indonesia" "Japan" "Philippines" "South.Korea"
## [21] "Vietnam" "Israel" "Jordan" "Lebanon"
## [25] "Tunisia" "Turkey" "Ghana" "Kenya"
## [29] "Nigeria" "Senegal" "South.Africa" "Tanzania"
## [33] "Argentina" "Brazil" "Chile" "Colombia"
## [37] "Mexico" "Peru" "Venezuela"
for(df in c("borderwall", "muslimimgtn", "wclimate", "wirannuke", "wtradeagr"))
data.table::setnames(get(df), c("Country", "Net_Approval", "Approves", "Disapproves", "DontKnow_NoResponse"))
names(borderwall)## [1] "Country" "Net_Approval" "Approves"
## [4] "Disapproves" "DontKnow_NoResponse"
I wonder how these countries felt about the border wall… (approval ranges from -100 to 100)
## [1] -50.54054
## [1] -59
Oof, that’s not great. Well, let’s see if this is just nations disliking the US in general… (approval ranges from 0 to 100)
No, there doesn’t appear to be a single trend in this chart. Maybe these are tied to international confidence in the President.
The President’s global trust does appear to be a similar shape as the US global approval. However, Presidential trust appears to be more volatile and open to change than US approval.
Let’s get opinion data about the US for the last years of Obama and Trump’s first year.
## [1] 2000 2017
us2013plus <- subset(us, Year > 2013)
ggplot(data = us2013plus, aes(x = Year, y = Global_Average)) + geom_line()And now trust in the President…
## [1] 2001 2017
pres2013plus <- subset(pres, Year > 2013)
ggplot(data = pres2013plus, aes(x = Year, y = Global_Average)) + geom_line()It does appear that since Trump has taken office, trust in both the United States and its President have dropped by a large amount. In fact, this might be the lowest trust in the President seen in this entire data set…
## [1] 2006
## Year Global_Average Canada France Germany Greece Hungary Italy Netherlands
## 4 2006 17.77778 NA 15 25 NA NA NA NA
## 6 2008 21.88235 NA 13 14 NA NA NA NA
## 3 2005 26.33333 40 25 30 NA NA NA 39
## 15 2017 26.78378 22 14 11 19 29 25 17
## 5 2007 27.56522 28 14 19 NA NA 30 NA
## 1 2001 33.50000 NA 20 51 NA NA 33 NA
## 2 2003 34.15385 59 20 33 NA NA 43 NA
## 10 2012 53.33333 NA 86 87 30 NA 73 NA
## 12 2014 55.06250 NA 83 71 27 NA 75 NA
## 9 2011 57.93333 NA 84 88 NA NA NA NA
## 11 2013 58.10000 81 83 88 35 NA 76 NA
## 8 2010 62.82353 NA 87 90 NA NA NA NA
## 13 2015 63.16129 76 83 73 NA NA 77 NA
## 7 2009 67.17647 88 91 93 NA NA NA NA
## 14 2016 73.88235 83 84 86 41 58 68 92
## Poland Spain Sweden UK Russia Australia India Indonesia Japan Philippines
## 4 NA 7 NA 30 21 NA NA 20 32 NA
## 6 41 8 NA 16 22 23 NA 23 25 NA
## 3 47 18 NA 38 28 NA NA 19 NA NA
## 15 23 7 10 22 53 29 40 23 24 69
## 5 29 7 21 24 18 NA NA 14 35 NA
## 1 NA NA NA 30 NA NA NA NA NA NA
## 2 NA 26 NA 51 8 59 NA NA NA NA
## 10 50 61 NA 80 36 NA NA NA 74 NA
## 12 55 58 NA 74 15 NA 48 60 60 89
## 9 52 67 NA 75 41 NA NA 62 81 NA
## 11 49 54 NA 72 29 77 53 53 70 84
## 8 60 69 NA 84 41 NA NA 67 76 NA
## 13 64 58 NA 76 11 81 74 64 66 94
## 7 62 72 NA 86 37 NA NA 71 85 NA
## 14 58 75 93 79 NA 84 58 NA 78 NA
## South.Korea Vietnam Israel Jordan Lebanon Tunisia Turkey Ghana Kenya Nigeria
## 4 NA NA NA 7 NA NA 3 NA NA NA
## 6 30 NA NA 7 33 NA 2 NA NA NA
## 3 NA NA NA 1 23 NA 8 NA NA NA
## 15 17 58 56 9 15 18 11 49 51 58
## 5 22 NA 57 8 34 NA 2 69 72 NA
## 1 NA NA NA NA NA NA NA NA NA NA
## 2 36 NA 83 1 17 NA 8 NA NA NA
## 10 NA NA NA 22 39 28 24 NA NA NA
## 12 84 67 71 17 35 27 24 60 78 53
## 9 NA NA 49 28 43 NA 12 NA 86 NA
## 11 77 NA 61 24 37 24 29 55 81 53
## 8 75 NA NA 26 43 NA 23 NA 95 84
## 13 88 71 49 14 36 NA 45 82 80 73
## 7 81 NA 56 31 46 NA 33 NA 94 NA
## 14 NA NA NA NA NA NA NA NA 83 63
## Senegal South.Africa Tanzania Argentina Brazil Chile Colombia Mexico Peru
## 4 NA NA NA NA NA NA NA NA NA
## 6 NA 32 60 7 NA NA NA 16 NA
## 3 NA NA NA NA NA NA NA NA NA
## 15 26 39 51 13 14 12 15 5 17
## 5 NA NA 40 5 NA 29 NA 28 29
## 1 NA NA NA NA NA NA NA NA NA
## 2 NA NA NA NA NA NA NA NA NA
## 10 NA NA NA NA 68 NA NA 42 NA
## 12 73 72 74 31 52 54 56 40 46
## 9 NA NA NA NA 63 NA NA 38 NA
## 11 78 74 NA 44 69 56 NA 49 NA
## 8 NA NA NA 49 56 NA NA 43 NA
## 13 77 77 78 40 63 60 NA 49 53
## 7 NA NA NA 61 NA NA NA 55 NA
## 14 NA 73 NA NA NA NA NA NA NA
## Venezuela
## 4 NA
## 6 NA
## 3 NA
## 15 20
## 5 NA
## 1 NA
## 2 NA
## 10 NA
## 12 33
## 9 NA
## 11 28
## 8 NA
## 13 26
## 7 NA
## 14 NA
Nope! Getting close, though. Maybe his policies he’s pushing for will get the US some good will. We already saw that the border wall was unpopular internationally, but that may be an outlier.
issues <- data.frame(
Issue = c("Border Wall", "Block Muslim Immigration", "Climate Accord Withdrawal", "Iran Deal Withdrawal", "Trade Withdrawal"),
Mean_Approval = c(mean(borderwall$Net_Approval), mean(muslimimgtn$Net_Approval), mean(wclimate$Net_Approval), mean(wirannuke$Net_Approval), mean(wtradeagr$Net_Approval))
)
ggplot(data = issues, aes(x = Issue, y = Mean_Approval)) + geom_bar(stat='identity')All policies appear to be disliked by the international community as a whole. The outlier here is actually the US withdrawal from the nuclear agreement with Iran, with an average global net approval of -15.7.
Based on this data, it appears that the world appears to have disliked the former President Donald Trump, and his proposed policies, quite heavily during his first year in office. This is especially true when compared to Obama’s terms, where approval for the US and trust in our President appears to mostly improve. At this time, it appears that the US was likely to gon a trend to be as unpopular as it was during Bush’s presidencies, where we saw the lowest approval ratings in our analysis above.