fifa_audience | R Documentation |
The raw data behind the story "How To Break FIFA" https://fivethirtyeight.com/features/how-to-break-fifa/.
fifa_audience
A data frame with 3652 rows representing guests and 6 variables:
FIFA member country
Confederation to which country belongs
Country's share of global population (percentage)
Country's share of global world cup TV Audience (percentage)
Country's GDP-weighted audience share (percentage)
See https://github.com/fivethirtyeight/data/tree/master/fifa
# To convert data frame to tidy data (long) format, run: library(dplyr) library(tidyr) library(stringr) fifa_audience_tidy <- fifa_audience %>% pivot_longer(-c(country, confederation), names_to = "type", values_to = "share") %>% mutate(type = str_sub(type, start=1, end=-7)) %>% arrange(country)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.