An R package that provides access to the code and data sets published by FiveThirtyEight https://github.com/fivethirtyeight/data. Note that while we received guidance from editors at 538, this package is not officially published by 538.
library(fivethirtyeight)
# Bechdel data set (note that data is lazy loaded so one can also just access `bechdel` without running `data(bechdel)`):
data(bechdel)
head(bechdel)
?bechdel
# If using RStudio:
View(bechdel)
# To see a list of all data sets:
data(package = "fivethirtyeight")
# To see a more detailed list of all data sets, see the package vignette:
vignette("fivethirtyeight", package = "fivethirtyeight")
For some data sets, there is an example analysis in a package vignette. For example, we did this using the R code for the article The Dollar-And-Cents Case Against Hollywood’s Exclusion of Women here:
For a complete list of vignettes run:
bechdel
vignette during his rstudio::conf talk in Orlando, Florida in January. The video of his talk is available here.In many instances, the data sets on the original 538 GitHub repository had the R code used in the analysis. We would love to have these, or any other interesting analyses, in the form of package vignettes. We ask you follow these guidelines as much as possible:
tidyverse
packages: ggplot2
, dplyr
, tidyr
, modelr
, etc.vignettes/bechdel.Rmd
If you want to contribute to the package: