Skip to content

Commit

Permalink
Merge pull request #128 from mrcaseb/cran-update
Browse files Browse the repository at this point in the history
Cran update v3.1.1
  • Loading branch information
mrcaseb authored Oct 22, 2020
2 parents f984d53 + 5439655 commit 518f9e8
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 29 deletions.
4 changes: 2 additions & 2 deletions CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This package was submitted to CRAN on 2020-09-24.
Once it is accepted, delete this file and tag the release (commit bec3afd).
This package was submitted to CRAN on 2020-10-22.
Once it is accepted, delete this file and tag the release (commit 9173809).
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: nflfastR
Title: Functions to Efficiently Access NFL Play by Play Data
Version: 3.0.0.9012
Version: 3.1.1
Authors@R:
c(person(given = "Sebastian",
family = "Carl",
Expand Down Expand Up @@ -29,7 +29,7 @@ Authors@R:
Description: A set of functions to access National Football League play-by-play
data from <https://www.nfl.com/>.
License: MIT + file LICENSE
URL: https://mrcaseb.github.io/nflfastR/, https://github.com/mrcaseb/nflfastR
URL: https://www.nflfastr.com/, https://github.com/mrcaseb/nflfastR
BugReports: https://github.com/mrcaseb/nflfastR/issues
Depends:
R (>= 3.5.0)
Expand Down
46 changes: 29 additions & 17 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,44 @@
# nflfastR (development version)
# nflfastR 3.1.1

* More fixes for `fixed_drive` which was not incrementing properly on drives
that began following a timeout
* Fixed more bugs in EPA and win probability on PATs and kickoffs with penalties
* Fixed a bug where scoring probabilities weren't adding to 1 on field goal attempts
near the end of a half
## New features

### Database Function `update_db()`

* The argument `force_rebuild` of the function `update_db()` is now of hybrid
type. It can rebuild the play by play data table either for the whole nflfastR
era (with `force_rebuild = TRUE`) or just for specified seasons
(e.g. `force_rebuild = 2019:2020`).
The latter is intended to be used for running seasons because the NFL fixes bugs
in the play by play data during the week and we recommend to rebuild the current
season every Thursday.
* Fixed a bug where `update_db()` disconnected the connection to a database provided
by the argument `db_connection` (#102)
* Fixed a bug where `update_db()` didn't build a fresh database without providing
the argument `force_rebuild`
* `update_db()` no longer removes the complete data table when a numeric argument
`force_rebuild` is passed but only removes the rows within the table (#109)
* The argument `force_rebuild` of the function `update_db()` is now of hybrid
type. It can rebuild the play by play data table either for the whole nflfastR
era (with `force_rebuild = TRUE`) or just for specified seasons (e.g. `force_rebuild = 2019:2020`).
The latter is intended to be used for running seasons because the NFL fixes bugs
in the play by play data during the week and we recommend to rebuild the current
season every Thursday.
* Messages to the user are now created with the new dependency `usethis`

### New Functions

* Added the new function `build_nflfastR_pbp()`, a convenient wrapper around
multiple nflfastR functions for an easy creation of the nflfastR play-by-play data set
* Added a function that applies our experimental expected pass model, `add_xpass()`,
that creates columns `xpass` and `pass_oe`
* Added the option `fast` (either `TRUE` or `FALSE`) to the function `decode_player_ids()`
to activate the high efficient C++ decoder of the package [`gsisdecoder`](https://cran.r-project.org/package=gsisdecoder).
* Fixed bug where plays with "backward pass" in play description were counted as pass plays
(`pass` = 1)

## Minor improvements and fixes

* More fixes for `fixed_drive` which was not incrementing properly on drives
that began following a timeout
* Fixed more bugs in EPA and win probability on PATs and kickoffs with penalties
* Fixed a bug where scoring probabilities weren't adding to 1 on field goal
attempts near the end of a half
* Messages to the user are now created with the new dependency `usethis`
* Fixed bug where plays with "backward pass" in play description were counted as
pass plays (`pass` = 1)
* Fixed missing kick distance on touchbacks and blocked punts (#53)
* Added the option `fast` (either `TRUE` or `FALSE`) to the function
`decode_player_ids()` to activate the high efficient C++ decoder of the package
[`gsisdecoder`](https://cran.r-project.org/package=gsisdecoder)

# nflfastR 3.0.0

Expand Down
2 changes: 1 addition & 1 deletion R/helper_additional_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' @param ... Additional arguments passed to a message function (for internal use).
#' @details Build columns that capture what happens on all plays, including
#' penalties, using string extraction from play description.
#' Loosely based on Ben's nflfastR guide (\url{https://mrcaseb.github.io/nflfastR/articles/beginners_guide.html})
#' Loosely based on Ben's nflfastR guide (\url{https://www.nflfastr.com/articles/beginners_guide.html})
#' but updated to work with the RS data, which has a different player format in
#' the play description; e.g. 24-M.Lynch instead of M.Lynch.
#' The function also standardizes team abbreviations so that, for example,
Expand Down
16 changes: 10 additions & 6 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
## Resbumission

This is a resubmission. The package URL in `DESCRIPTION` was updated as the
original Github URL is now being redirected. A similar adjustment of the URL was
also made in `man/clean_pbp.Rd`

## Release summary

This is a major release that
* adds the two exported functions `fast_scraper_roster()` as well as `decode_player_ids()`,
* adds a new option to the exported function `update_db()` and
This is a minor release that
* adds the new exported function `build_nflfastR_pbp()`
* adds two new dependencies `usethis` and `gsisdecoder`
* fixes some minor bugs.

## Test environments
Expand Down Expand Up @@ -30,6 +36,4 @@ This is a major release that

## R CMD check results

0 errors | 0 warnings | 1 note

* unable to verify current time -> this is a R CMD Check problem
0 errors | 0 warnings | 0 notes
2 changes: 1 addition & 1 deletion man/clean_pbp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 518f9e8

Please sign in to comment.