From ae045ff9f93b09a40375770af75b76b20f6c847f Mon Sep 17 00:00:00 2001 From: mrcaseb Date: Tue, 26 Nov 2024 21:07:47 +0100 Subject: [PATCH 1/6] prepare cran v5 --- .github/workflows/revdepcheck.yaml | 19 +++++++++++++++++++ DESCRIPTION | 2 +- NEWS.md | 14 +++++++++++--- README.Rmd | 2 +- README.md | 2 +- cran-comments.md | 4 ++-- 6 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/revdepcheck.yaml diff --git a/.github/workflows/revdepcheck.yaml b/.github/workflows/revdepcheck.yaml new file mode 100644 index 00000000..b8919d4a --- /dev/null +++ b/.github/workflows/revdepcheck.yaml @@ -0,0 +1,19 @@ +# Workflow derived from https://github.com/r-devel/recheck?tab=readme-ov-file#how-to-use-with-github-actions +on: + workflow_dispatch: + inputs: + which: + type: choice + description: Which dependents to check + options: + - strong + - most + +name: Reverse dependency check + +jobs: + revdep_check: + name: Reverse check ${{ inputs.which }} dependents + uses: r-devel/recheck/.github/workflows/recheck.yml@v1 + with: + which: ${{ inputs.which }} diff --git a/DESCRIPTION b/DESCRIPTION index 5521beed..bbfc98b3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: nflfastR Title: Functions to Efficiently Access NFL Play by Play Data -Version: 4.6.1.9020 +Version: 5.0.0 Authors@R: c(person(given = "Sebastian", family = "Carl", diff --git a/NEWS.md b/NEWS.md index 2b183299..656ed997 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,11 @@ -# nflfastR (development version) +# nflfastR 5.0.0 + +## Major Changes + +- Added new function `calculate_stats()` that combines the output of all `calculate_player_stats*()` functions with a more robust and faster approach. The `calculate_player_stats*()` function will be deprecated in a future release. (#470) +- Added new exported dataframe `nfl_stats_variables`. It lists and explains all variables returned by `calculate_stats()`. A searchable table is available at . (#470) + +## Bug Fixes and Minor Changes - Drop `{crayon}`, `{DT}`, `{httr}`, `{jsonlite}`, `{qs}` dependencies. (#453) - The function `calculate_player_stats_def` now returns `season_type` if argument `weekly` is set to `TRUE` for consistency with the other player stats functions. (#455) @@ -12,15 +19,16 @@ - `punter_player_id`, and `punter_player_name` are filled for blocked punt attempts. (#463) - Fixed an issue affecting scores of 2022 games involving a return touchdown (#466) - Added identification of scrambles from 1999 through 2004 with thank to Aaron Schatz (#468, #489) -- Added new function `calculate_stats()` that combines the output of all `calculate_player_stats*()` functions with a more robust and faster approach. The `calculate_player_stats*()` function will be deprecated in a future release. (#470) - Updated the dataframe `stat_ids` with some IDs that were previously missing. (#470) -- Added new exported dataframe `nfl_stats_variables`. It lists and explains all variables returned by `calculate_stats()`. A searchable table is available at . (#470) - nflfastR tried to fix bugs in the underlying pbp data of JAX home games prior to the 2016 season. An update of the raw pbp data resolved those bugs so nflfastR needs to remove the hard coded adjustments. This means that nflfastR <= v4.6.1 will return incorrect pbp data for all Jacksonville home games prior to the 2016 season! (#478) - Fixed a problem where `clean_pbp()` returned `pass = 1` in actual rush plays in very rare cases. (#479) - Removed extra lines for injury timeouts that were breaking `fixed_drive` (#482) - The variable `penalty_type` now correctly lists the penalty "Kickoff Short of Landing Zone" introduced in the 2024 season. (#486) - Fixed a bug where `ep` was incorrect on PAT attempts preceded by a timeout and then a penalty (extremely rare). This bug also caused the variables `total_home_epa` and `total_away_epa` to be incorrect for all subsequent plays in the same game. (#493) +Thank you to +[@ahmed-cheema](https://github.com/ahmed-cheema), [@andrewtek](https://github.com/andrewtek), [@guga31bb](https://github.com/guga31bb), [@isaactpetersen](https://github.com/isaactpetersen), [@JoeMarino2021](https://github.com/JoeMarino2021), [@john-b-edwards](https://github.com/john-b-edwards), [@marcusSasser](https://github.com/marcusSasser), [@mlounsberry](https://github.com/mlounsberry), [@morganandrew](https://github.com/morganandrew), [@mrcaseb](https://github.com/mrcaseb), [@mscoop16](https://github.com/mscoop16), [@parsnipz](https://github.com/parsnipz), [@rjthompson2](https://github.com/rjthompson2), and [@Useight](https://github.com/Useight) for their questions, feedback, and contributions towards this release. + # nflfastR 4.6.1 - The function `calculate_series_conversion_rates()` now correctly aggregates season level conversion rates. Performance has also been improved. (#440) diff --git a/README.Rmd b/README.Rmd index 2c968646..7519aa4f 100644 --- a/README.Rmd +++ b/README.Rmd @@ -72,7 +72,7 @@ Even though `nflfastR` is very fast, **we recommend downloading the data from [h ## nflfastR models -`nflfastR` uses its own models for Expected Points, Win Probability, Completion Probability, and Expected Yards After the Catch. To read about the models, please see [this post on Open Source Football](https://opensourcefootball.com/posts/2020-09-28-nflfastr-ep-wp-and-cp-models/). For a more detailed description of the motivation for Expected Points models, we highly recommend this paper [from the nflscrapR team located here](https://arxiv.org/pdf/1802.00998.pdf). +`nflfastR` uses its own models for Expected Points, Win Probability, Completion Probability, and Expected Yards After the Catch. To read about the models, please see [this post on Open Source Football](https://opensourcefootball.com/posts/2020-09-28-nflfastr-ep-wp-and-cp-models/). For a more detailed description of the motivation for Expected Points models, we highly recommend this paper [from the nflscrapR team located here](http://arxiv.org/pdf/1802.00998). Here is a visualization of the Expected Points model by down and yardline. diff --git a/README.md b/README.md index a01be7ee..c8dee6a9 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ about the models, please see [this post on Open Source Football](https://opensourcefootball.com/posts/2020-09-28-nflfastr-ep-wp-and-cp-models/). For a more detailed description of the motivation for Expected Points models, we highly recommend this paper [from the nflscrapR team located -here](https://arxiv.org/pdf/1802.00998.pdf). +here](http://arxiv.org/pdf/1802.00998). Here is a visualization of the Expected Points model by down and yardline. diff --git a/cran-comments.md b/cran-comments.md index 3f5bf835..a83d186f 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,7 +1,7 @@ ## Release summary -This is a minor release that -* adjusts the setup process of unit tests per request +This is a major release that +* adds new functions, deprecates old functions. ## R CMD check results From b0a61cdc61be582fc8bc6b1fc4ebbeca211bc2a6 Mon Sep 17 00:00:00 2001 From: mrcaseb Date: Tue, 26 Nov 2024 21:11:23 +0100 Subject: [PATCH 2/6] update pkgdown workflow --- .github/workflows/pkgdown.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 11d5b04c..d2f961ae 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -24,7 +24,7 @@ jobs: isPush: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 @@ -56,7 +56,7 @@ jobs: - name: Deploy to GitHub pages 🚀 if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4.4.1 + uses: JamesIves/github-pages-deploy-action@v4.5.0 with: clean: false branch: gh-pages From 0588a2ba6aee4bc1bca49b8db2eae0098cad9e24 Mon Sep 17 00:00:00 2001 From: mrcaseb Date: Tue, 26 Nov 2024 21:19:27 +0100 Subject: [PATCH 3/6] update release bullets --- R/utils.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index cbcec755..09d1d657 100644 --- a/R/utils.R +++ b/R/utils.R @@ -202,7 +202,7 @@ fetch_raw <- function(game_id, release_bullets <- function() { c( '`devtools::check_mac_release()`', - '`rhub::check_for_cran(email = "mrcaseb@gmail.com", show_status = FALSE)`', + '`rhub::rhub_check(platforms = rhub::rhub_platforms()$name)`', '`pkgdown::check_pkgdown()`', '`usethis::use_tidy_thanks()`', NULL From 8f7ad977f3048f127aeeaa9b01283b3895a677ef Mon Sep 17 00:00:00 2001 From: mrcaseb Date: Tue, 26 Nov 2024 21:23:28 +0100 Subject: [PATCH 4/6] avoid useless platform --- R/utils.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index 09d1d657..55ca6eb1 100644 --- a/R/utils.R +++ b/R/utils.R @@ -202,7 +202,7 @@ fetch_raw <- function(game_id, release_bullets <- function() { c( '`devtools::check_mac_release()`', - '`rhub::rhub_check(platforms = rhub::rhub_platforms()$name)`', + '`rhub::rhub_check(platforms = rhub::rhub_platforms()$name[rhub::rhub_platforms()$name != "rchk"])`', '`pkgdown::check_pkgdown()`', '`usethis::use_tidy_thanks()`', NULL From 94bbd3ae3a9581480e3d902e7dc4cc6e7f7548c8 Mon Sep 17 00:00:00 2001 From: mrcaseb Date: Tue, 26 Nov 2024 21:38:24 +0100 Subject: [PATCH 5/6] update url --- R/nflfastR-package.R | 2 +- man/nflfastR-package.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/nflfastR-package.R b/R/nflfastR-package.R index da506a41..9a014196 100644 --- a/R/nflfastR-package.R +++ b/R/nflfastR-package.R @@ -50,7 +50,7 @@ #' inherits(future::plan(), "sequential") #' ``` #' For more information on possible plans please see -#' [the future package Readme](https://github.com/HenrikBengtsson/future/blob/develop/README.md). +#' [the future package Readme](https://github.com/futureverse/future/blob/develop/README.md). #' #' For more information on `.Renviron` please see #' [this book chapter](https://rstats.wtf/r-startup.html). diff --git a/man/nflfastR-package.Rd b/man/nflfastR-package.Rd index 12796358..c79de3a8 100644 --- a/man/nflfastR-package.Rd +++ b/man/nflfastR-package.Rd @@ -66,7 +66,7 @@ will behave like they were called with \code{\link[purrr:map]{purrr::map()}} and }\if{html}{\out{}} For more information on possible plans please see -\href{https://github.com/HenrikBengtsson/future/blob/develop/README.md}{the future package Readme}. +\href{https://github.com/futureverse/future/blob/develop/README.md}{the future package Readme}. For more information on \code{.Renviron} please see \href{https://rstats.wtf/r-startup.html}{this book chapter}. From d2d77d904843b51aa0b531f632803b2f866f52a6 Mon Sep 17 00:00:00 2001 From: mrcaseb Date: Tue, 26 Nov 2024 21:40:44 +0100 Subject: [PATCH 6/6] submission file --- CRAN-SUBMISSION | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 CRAN-SUBMISSION diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION new file mode 100644 index 00000000..9154d3c0 --- /dev/null +++ b/CRAN-SUBMISSION @@ -0,0 +1,3 @@ +Version: 5.0.0 +Date: 2024-11-26 20:40:18 UTC +SHA: 9e4581c6b5fdb3582a65de80b354d271bc3ad685