diff --git a/DESCRIPTION b/DESCRIPTION index 02256e0..2d73fb7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: fivethirtyeight Title: Data and Code Behind the Stories and Interactives at FiveThirtyEight -Description: Data and code behind the stories and interactives at FiveThirtyEight - \url{https://github.com/fivethirtyeight/data}. +Description: Data and code behind the stories and interactives at 'FiveThirtyEight' + . Version: 0.1.0 Authors@R: c( person("Albert Y.", "Kim", email = "albert.ys.kim@gmail.com", role = "cre"), diff --git a/LICENSE b/LICENSE index 528bfb7..59d47ed 100644 --- a/LICENSE +++ b/LICENSE @@ -1,20 +1,2 @@ YEAR: 2014 -COPYRIGHT HOLDER: ESPN Internet Ventures - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file +COPYRIGHT HOLDER: ESPN Internet Ventures \ No newline at end of file diff --git a/R/data_chester.R b/R/data_chester.R index 0c360cb..5de305b 100644 --- a/R/data_chester.R +++ b/R/data_chester.R @@ -329,7 +329,7 @@ #' \item{division}{NFL division} #' \item{avg_tix_price}{Average ticket price} #' } -#' @source StubHub \url{http://www.stubhub.com/} +#' @source StubHub stubhub.com "nfltix_div_avgprice" @@ -345,7 +345,7 @@ #' \item{team}{Name of NFL team} #' \item{avg_tix_price}{Average ticket price} #' } -#' @source StubHub \url{http://www.stubhub.com/} +#' @source StubHub stubhub.com "nfltix_usa_avg" diff --git a/cran-comments.md b/cran-comments.md index c36e482..f33717c 100755 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,5 +1,16 @@ ## Summary +## Resubmission + +This is a resubmission. In this version I have: + +* I've fixed the LICENSE file to fit the template at +* Fixed the http://www.stubhub.com/ url +* Fixed url's for CRAN packages to be in canonical form +* Re-ran roxygen on bechdel.Rmd vignette +* Fixed description section of DESCRIPTION file + + ## Test environments * local OS X install, R 3.3.2 diff --git a/man/nfltix_div_avgprice.Rd b/man/nfltix_div_avgprice.Rd index 3d2119d..b694dcf 100644 --- a/man/nfltix_div_avgprice.Rd +++ b/man/nfltix_div_avgprice.Rd @@ -11,7 +11,7 @@ \item{avg_tix_price}{Average ticket price} }} \source{ -StubHub \url{http://www.stubhub.com/} +StubHub stubhub.com } \usage{ nfltix_div_avgprice diff --git a/man/nfltix_usa_avg.Rd b/man/nfltix_usa_avg.Rd index 730d5b6..ee4f395 100644 --- a/man/nfltix_usa_avg.Rd +++ b/man/nfltix_usa_avg.Rd @@ -10,7 +10,7 @@ \item{avg_tix_price}{Average ticket price} }} \source{ -StubHub \url{http://www.stubhub.com/} +StubHub stubhub.com } \usage{ nfltix_usa_avg diff --git a/vignettes/bechdel.html b/vignettes/bechdel.html index 8dfd87b..9a80f33 100644 --- a/vignettes/bechdel.html +++ b/vignettes/bechdel.html @@ -12,7 +12,7 @@ - + Bechdel analysis using the tidyverse @@ -70,7 +70,7 @@

Bechdel analysis using the tidyverse

Albert Y. Kim, Chester Ismay, and Jennifer Chunn

-

2017-01-07

+

2017-01-08

diff --git a/vignettes/fivethirtyeight.Rmd b/vignettes/fivethirtyeight.Rmd index 61f0f17..fe00e39 100644 --- a/vignettes/fivethirtyeight.Rmd +++ b/vignettes/fivethirtyeight.Rmd @@ -18,11 +18,11 @@ library(knitr) ## Motivation -We are all involved in statistics and data science education, in particular at the +We are involved in statistics and data science education, in particular at the introductory undergraduate level. As such, we are always looking for data sets that balance being -1. **Rich enough** to answer meaningful questions with, **real enough** to ensure that there is context, and **realistic enough** to convey to students that data as it exists "in the wild" needs processing. +1. **Rich enough** to answer meaningful questions with, **real enough** to ensure that there is context, and **realistic enough** to convey to students that data as it exists "in the wild" often needs processing. 1. Easily and quickly accessible to novices, so that we [minimize the prerequisites to research](https://arxiv.org/abs/1507.05346). It has been our experience that many data sets that exist in R packages, such as the @@ -31,15 +31,15 @@ It has been our experience that many data sets that exist in R packages, such as packages, are of great pedagogical value as they: * Satisfy the above two goals. -* Are in standardized format as they fit into the [tidy tools](https://cran.r-project.org/web/packages/tidyverse/vignettes/manifesto.html) ecosystem. +* Are in standardized format as they fit into the [tidy tools](https://CRAN.R-project.org/package=tidyverse/vignettes/manifesto.html) ecosystem. * Are really fun to play with! It is along these lines that we present `fivethirtyeight`: an R package of data and code behind the stories and interactives at [FiveThirtyEight.com](http://fivethirtyeight.com/), a data-driven journalism website founded by Nate Silver and owned by ESPN. FiveThirtyEight has been very forward thinking in making the data used in many of their articles open and accessible on [GitHub](https://github.com/fivethirtyeight/data), a web-based repository for collaboration on code and data. With consultation from [Andrew Flowers](http://fivethirtyeight.com/contributors/andrew-flowers/) and [Andrei Scheinkman](http://fivethirtyeight.com/contributors/andrei-scheinkman/) of FiveThirtyEight, we go one step further by: -1. Doing just enough pre-processing so that statistics and data science novices can sink their teeth into the data. -2. Packaging it all in an easy to load format: package installation instead of working with CSV's. +1. Doing just enough pre-processing so that statistics and data science novices can sink their teeth into the data right away. +2. Packaging it all in an easy to load format: package installation instead of working with CSV files. 3. Providing easily accessible documentation: The help file for each data set includes a thorough description of the observational unit and all variables, a link to the original article, and (if listed) the data sources. @@ -63,9 +63,10 @@ guidelines: + Factors vs characters: + Ordinal categorical variables are `factor` with the intuitive ordering of `levels`. We did this to ensure barplots and boxplots would display in an intuitive order. + Regular categorical variables are left as `character` vectors. - + Convert date variables that are beyond just `year` to [POSIX date](http://www.epochconverter.com/) objects using the [lubridate](https://cran.r-project.org/web/packages/lubridate/vignettes/lubridate.html) package. That way users can easily create time series plots. Example: + + Convert date variables that are beyond just `year` to [POSIX date](http://www.epochconverter.com/) objects using the [lubridate](https://CRAN.R-project.org/package=lubridate/vignettes/lubridate.html) package. That way users can easily create time series plots. Example: + If only a `year` variable exits, then we leave it as is. + If there are `year` and `month` variables, we convert them POSIX date objects as `year-month-01`. + + If there are `year`, `month`, and `day` variables, we convert them POSIX date objects as `year-month-day`. **Note**: The code used to pre-process the data can be found on the [GitHub repository](https://github.com/rudeboybert/fivethirtyeight/tree/master/data-raw) for the package in the `process_data_sets.R` files. These can serve as data manipulation/wrangling examples and exercises for more advanced students. diff --git a/vignettes/fivethirtyeight.html b/vignettes/fivethirtyeight.html index ef09b86..b272969 100644 --- a/vignettes/fivethirtyeight.html +++ b/vignettes/fivethirtyeight.html @@ -12,7 +12,7 @@ - + fivethirtyeight Package @@ -32,28 +32,28 @@

fivethirtyeight Package

Albert Y. Kim, Chester Ismay, and Jennifer Chunn

-

2017-01-07

+

2017-01-08

Motivation

-

We are all involved in statistics and data science education, in particular at the introductory undergraduate level. As such, we are always looking for data sets that balance being

+

We are involved in statistics and data science education, in particular at the introductory undergraduate level. As such, we are always looking for data sets that balance being

    -
  1. Rich enough to answer meaningful questions with, real enough to ensure that there is context, and realistic enough to convey to students that data as it exists “in the wild” needs processing.
  2. +
  3. Rich enough to answer meaningful questions with, real enough to ensure that there is context, and realistic enough to convey to students that data as it exists “in the wild” often needs processing.
  4. Easily and quickly accessible to novices, so that we minimize the prerequisites to research.

It has been our experience that many data sets that exist in R packages, such as the nycflights13, babynames, and gapminder packages, are of great pedagogical value as they:

  • Satisfy the above two goals.
  • -
  • Are in standardized format as they fit into the tidy tools ecosystem.
  • +
  • Are in standardized format as they fit into the tidy tools ecosystem.
  • Are really fun to play with!

It is along these lines that we present fivethirtyeight: an R package of data and code behind the stories and interactives at FiveThirtyEight.com, a data-driven journalism website founded by Nate Silver and owned by ESPN. FiveThirtyEight has been very forward thinking in making the data used in many of their articles open and accessible on GitHub, a web-based repository for collaboration on code and data.

With consultation from Andrew Flowers and Andrei Scheinkman of FiveThirtyEight, we go one step further by:

    -
  1. Doing just enough pre-processing so that statistics and data science novices can sink their teeth into the data.
  2. -
  3. Packaging it all in an easy to load format: package installation instead of working with CSV’s.
  4. +
  5. Doing just enough pre-processing so that statistics and data science novices can sink their teeth into the data right away.
  6. +
  7. Packaging it all in an easy to load format: package installation instead of working with CSV files.
  8. Providing easily accessible documentation: The help file for each data set includes a thorough description of the observational unit and all variables, a link to the original article, and (if listed) the data sources.
@@ -74,10 +74,11 @@

Guidelines

  • Ordinal categorical variables are factor with the intuitive ordering of levels. We did this to ensure barplots and boxplots would display in an intuitive order.
  • Regular categorical variables are left as character vectors.
  • -
  • Convert date variables that are beyond just year to POSIX date objects using the lubridate package. That way users can easily create time series plots. Example: +
  • Convert date variables that are beyond just year to POSIX date objects using the lubridate package. That way users can easily create time series plots. Example:
    • If only a year variable exits, then we leave it as is.
    • If there are year and month variables, we convert them POSIX date objects as year-month-01.
    • +
    • If there are year, month, and day variables, we convert them POSIX date objects as year-month-day.