nflverse / nflfastR

A Set of Functions to Efficiently Scrape NFL Play by Play Data
https://www.nflfastr.com/
Other
414 stars 50 forks source link

Refresh load_snap_counts for NE vs PHI in Week 1 #430

Closed marvin3FF closed 1 year ago

marvin3FF commented 1 year ago

Is there an existing issue for this?

Have you installed the latest development version of the package(s) in question?

What version of the package do you have?

4.5.1.9012

Describe the bug

New England's snaps were listed incorrectly on Pro Football Reference. They had Mac Jones listed with one snap and as a CB. Would it be possible to refresh this game so that the snaps are accurate in load_snap_counts?

Reprex

r
test <- nflreadr::load_snap_counts(2023:2023)%>%
  filter(week == 1)%>%
  filter (team == "NE")

Created on 2023-09-15 with reprex v2.0.2


### Expected Behavior

For Mac Jones, his snaps should be 100% and listed as QB

### nflverse_sitrep

```r
-- System Info -----------------------------------------------------------------------------------------------------------------------------------------
* R version 4.1.2 (2021-11-01) * Running under: Windows 10 x64 (build 22621)
-- Package Status --------------------------------------------------------------------------------------------------------------------------------------
   package  installed  cran        dev behind
1   nfl4th      1.0.4 1.0.4      1.0.4       
2 nflfastR 4.5.1.9012 4.5.1 4.5.1.9012       
3 nflplotR 1.1.0.9006 1.1.0 1.1.0.9006       
4 nflreadr   1.4.0.03 1.4.0   1.4.0.03       
5 nflseedR      1.2.0 1.2.0      1.2.0       
6 nflverse      1.0.3 1.0.3      1.0.3       
-- Package Options -------------------------------------------------------------------------------------------------------------------------------------
* No options set for above packages
-- Package Dependencies --------------------------------------------------------------------------------------------------------------------------------
* askpass     (1.1)     * janitor      (2.1.0)   * stringr     (1.4.1)    
* backports   (1.4.1)   * jsonlite     (1.8.0)   * sys         (3.4)      
* cachem      (1.0.6)   * labeling     (0.4.2)   * tibble      (3.1.8)    
* cli         (3.3.0)   * lifecycle    (1.0.1)   * tidyr       (1.2.0)    
* colorspace  (2.0-3)   * listenv      (0.8.0)   * tidyselect  (1.1.2)    
* cpp11       (0.4.2)   * lubridate    (1.8.0)   * utf8        (1.2.2)    
* crayon      (1.5.1)   * magick       (2.7.3)   * vctrs       (0.4.1)    
* curl        (4.3.2)   * magrittr     (2.0.3)   * viridisLite (0.4.1)    
* data.table  (1.14.2)  * memoise      (2.0.1)   * withr       (2.5.0)    
* digest      (0.6.29)  * mime         (0.12)    * xgboost     (1.6.0.1)  
* dplyr       (1.0.10)  * munsell      (0.5.0)   * codetools   (0.2-18)   
* ellipsis    (0.3.2)   * openssl      (2.0.2)   * compiler    (4.1.2)    
* fansi       (1.0.3)   * parallelly   (1.32.1)  * graphics    (4.1.2)    
* farver      (2.1.1)   * pillar       (1.8.1)   * grDevices   (4.1.2)    
* fastmap     (1.1.0)   * pkgconfig    (2.0.3)   * grid        (4.1.2)    
* fastrmodels (1.0.2)   * progressr    (0.11.0)  * lattice     (0.20-45)  
* furrr       (0.3.1)   * proto        (1.0.0)   * MASS        (7.3-54)   
* future      (1.28.0)  * purrr        (0.3.4)   * Matrix      (1.3-4)    
* generics    (0.1.3)   * R6           (2.5.1)   * methods     (4.1.2)    
* ggpath      (1.0.1)   * rappdirs     (0.3.3)   * mgcv        (1.8-38)   
* ggplot2     (3.3.6)   * RColorBrewer (1.1-3)   * nlme        (3.1-153)  
* globals     (0.16.1)  * Rcpp         (1.0.9)   * parallel    (4.1.2)    
* glue        (1.6.2)   * rlang        (1.0.5)   * splines     (4.1.2)    
* gsubfn      (0.7)     * rstudioapi   (0.14)    * stats       (4.1.2)    
* gtable      (0.3.1)   * scales       (1.2.1)   * tools       (4.1.2)    
* httr        (1.4.4)   * snakecase    (0.11.0)  * utils       (4.1.2)    
* isoband     (0.2.5)   * stringi      (1.7.8)

Screenshots

No response

Additional context

I believe PFR fixed the issue on their site, so it may just need a refresh for nflreadR

mrcaseb commented 1 year ago

Data refreshed. Thanks for the heads up!

nflreadr::load_snap_counts() |> 
  dplyr::filter(game_id == "2023_01_PHI_NE", player == "Mac Jones") |> 
  dplyr::glimpse()
#> Rows: 1
#> Columns: 16
#> $ game_id       <chr> "2023_01_PHI_NE"
#> $ pfr_game_id   <chr> "202309100nwe"
#> $ season        <int> 2023
#> $ game_type     <chr> "REG"
#> $ week          <int> 1
#> $ player        <chr> "Mac Jones"
#> $ pfr_player_id <chr> "JoneMa05"
#> $ position      <chr> "QB"
#> $ team          <chr> "NE"
#> $ opponent      <chr> "PHI"
#> $ offense_snaps <dbl> 80
#> $ offense_pct   <dbl> 1
#> $ defense_snaps <dbl> 0
#> $ defense_pct   <dbl> 0
#> $ st_snaps      <dbl> 0
#> $ st_pct        <dbl> 0