The raw data behind the story "What the World Thinks of Trump" https://fivethirtyeight.com/features/what-the-world-thinks-of-trump/: Trump World Polls Dataset.
trumpworld_polls
A data frame with 32 rows representing years and 40 variables:
Year the poll was conducted
The average percentage people who answered the poll question positively (support the president or have a favorable view of the U.S.)
The percentage of people from Canada who answered the poll question positively
The percentage of people from France who answered the poll question positively
The percentage of people from Germany who answered the poll question positively
The percentage of people from Greece who answered the poll question positively
The percentage of people from Hungary who answered the poll question positively
The percentage of people from Italy who answered the poll question positively
The percentage of people from Netherlands who answered the poll question positively
The percentage of people from Poland who answered the poll question positively
The percentage of people from Spain who answered the poll question positively
The percentage of people from Sweden who answered the poll question positively
The percentage of people from the U.K. who answered the poll question positively
The percentage of people from Russia who answered the poll question positively
The percentage of people from Australia who answered the poll question positively
The percentage of people from India who answered the poll question positively
The percentage of people from Indonesia who answered the poll question positively
The percentage of people from Japan who answered the poll question positively
The percentage of people from the Philippines who answered the poll question positively
The percentage of people from South Korea who answered the poll question positively
The percentage of people from Vietnam who answered the poll question positively
The percentage of people from Israel who answered the poll question positively
The percentage of people from Jordan who answered the poll question positively
The percentage of people from Lebanon who answered the poll question positively
The percentage of people from Tunisia who answered the poll question positively
The percentage of people from Turkey who answered the poll question positively
The percentage of people from Ghana who answered the poll question positively
The percentage of people from Kenya who answered the poll question positively
The percentage of people from Nigeria who answered the poll question positively
The percentage of people from Senegal who answered the poll question positively
The percentage of people from South Africa who answered the poll question positively
The percentage of people from Tanzania who answered the poll question positively
The percentage of people from Argentina who answered the poll question positively
The percentage of people from Brazil who answered the poll question positively
The percentage of people from Chile who answered the poll question positively
The percentage of people from Colombia who answered the poll question positively
The percentage of people from Mexico who answered the poll question positively
The percentage of people from Peru who answered the poll question positively
The percentage of people from Venezuela who answered the poll question positively
The item being polled. Specifically, whether respondents: 1) Have a favorable view of the U.S. or 2) Trust the U.S. President when it comes to foreign affairs
# NOT RUN {
# To convert data frame to tidy data (long) format, run:
library(dplyr)
library(tidyr)
trumpworld_polls_tidy <- trumpworld_polls %>%
gather(country, percent_positive, -c("year", "avg", "question"))
# }
Run the code above in your browser using DataLab