nflverse / nflfastR

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

Potential Issues in pbp_data - missing game and gsis_id? #384

Closed marvin3FF closed 2 years ago

marvin3FF commented 2 years ago
  1. Have you installed the latest development version of the package(s) in question?

Yes, updated this morning.

  1. Describe the bug

When loading pbp data, I'm not seeing SF @ DEN from Week 3 in there. I believe last week SNF was already loaded in pbp by now.

I also noticed that Romeo Doubs gsis_id was not populating for Week 3. I'm not sure if other players are missing, but that's the first one I found.

  1. Reprex

pbp <- load_pbp(2021:2022)

test <- pbp%>%
  filter(season==2022)%>%
  filter(week == 3)%>%
  group_by(posteam)%>%
  summarize(plays=n())
  1. Expected Behaviour

I assumed Week 3 SNF would already be in there by now, but let me know if that's not the case.

Also, I haven't had issues with rookies since the patch last week, so I'm not sure why week 3 does not have Romeo Doubs' ID in the pbp data. For prior weeks, his ID is populating.

  1. nflverse_sitrep()
sitrep ```r -- System Info ----------------------------------------------------------------------------------------------------------------------------------------------------- * R version 4.1.2 (2021-11-01) * Running under: Windows 10 x64 (build 22000) -- nflverse Packages ----------------------------------------------------------------------------------------------------------------------------------------------- * nflreadr (1.3.1) * nflseedR (1.1.0) * nflplotR (1.1.0) * nflfastR (4.4.0.9010) * nfl4th (1.0.2.9002) * nflverse (1.0.2) -- nflverse Options ------------------------------------------------------------------------------------------------------------------------------------------------ No options set for nflreadr, nflfastR, nflseedR, nfl4th, nflplotR, and nflverse -- nflverse Dependencies ------------------------------------------------------------------------------------------------------------------------------------------- * askpass (1.1) * gtable (0.3.1) * progressr (0.11.0) * bit (4.0.4) * hms (1.1.2) * proto (1.0.0) * bit64 (4.0.5) * httr (1.4.4) * purrr (0.3.4) * cachem (1.0.6) * isoband (0.2.5) * R6 (2.5.1) * cli (3.3.0) * janitor (2.1.0) * rappdirs (0.3.3) * clipr (0.8.0) * jsonlite (1.8.0) * RColorBrewer (1.1-3) * codetools (0.2-18) * labeling (0.4.2) * Rcpp (1.0.9) * colorspace (2.0-3) * lattice (0.20-45) * readr (2.1.2) * cpp11 (0.4.2) * lifecycle (1.0.1) * rlang (1.0.5) * crayon (1.5.1) * listenv (0.8.0) * rstudioapi (0.14) * curl (4.3.2) * lubridate (1.8.0) * scales (1.2.1) * data.table (1.14.2) * magick (2.7.3) * snakecase (0.11.0) * digest (0.6.29) * magrittr (2.0.3) * stringi (1.7.8) * dplyr (1.0.10) * MASS (7.3-54) * stringr (1.4.1) * ellipsis (0.3.2) * Matrix (1.3-4) * sys (3.4) * fansi (1.0.3) * memoise (2.0.1) * tibble (3.1.8) * farver (2.1.1) * mgcv (1.8-38) * tidyr (1.2.0) * fastmap (1.1.0) * mime (0.12) * tidyselect (1.1.2) * fastrmodels (1.0.2) * munsell (0.5.0) * tzdb (0.3.0) * furrr (0.3.1) * nlme (3.1-153) * utf8 (1.2.2) * future (1.28.0) * openssl (2.0.2) * vctrs (0.4.1) * generics (0.1.3) * parallelly (1.32.1) * viridisLite (0.4.1) * ggplot2 (3.3.6) * pillar (1.8.1) * vroom (1.5.7) * globals (0.16.1) * pkgconfig (2.0.3) * withr (2.5.0) * glue (1.6.2) * prettyunits (1.1.1) * xgboost (1.6.0.1) * gsubfn (0.7) * progress (1.2.2) ```
  1. Screenshots

  2. Additional context

mrcaseb commented 2 years ago

Can you please restart your session or try nflreadr::.clear_cache() and try again?

marvin3FF commented 2 years ago

@mrcaseb restarted and cleared cache! Still same results. Doubs is still missing gsis_id in pbp and SF vs DEN is still not populating

mrcaseb commented 2 years ago

We had some automation issues with that game and are currently updating the data. Should be up in about 10 minutes. Please restart/clear cache again before you try to load it.

mrcaseb commented 2 years ago

Both issue have been resolved now

pbp <- nflfastR::load_pbp(2022)

pbp |> 
  dplyr::filter(week == 3) |> 
  dplyr::count(game_id)
#> ── nflverse play by play data ──────────────────────────────────────────────────
#> ℹ Data updated: 2022-09-26 22:34:16 CEST
#> # A tibble: 15 × 2
#>    game_id             n
#>    <chr>           <int>
#>  1 2022_03_ATL_SEA   167
#>  2 2022_03_BAL_NE    169
#>  3 2022_03_BUF_MIA   177
#>  4 2022_03_CIN_NYJ   190
#>  5 2022_03_DET_MIN   196
#>  6 2022_03_GB_TB     172
#>  7 2022_03_HOU_CHI   181
#>  8 2022_03_JAX_LAC   175
#>  9 2022_03_KC_IND    172
#> 10 2022_03_LA_ARI    177
#> 11 2022_03_LV_TEN    173
#> 12 2022_03_NO_CAR    177
#> 13 2022_03_PHI_WAS   190
#> 14 2022_03_PIT_CLE   179
#> 15 2022_03_SF_DEN    174

pbp |> 
  dplyr::filter(stringr::str_detect(desc, "Doubs")) |> 
  dplyr::select(
    game_id, receiver_player_name, receiver_player_id, receiver, receiver_id
  )
#> ── nflverse play by play data ──────────────────────────────────────────────────
#> ℹ Data updated: 2022-09-26 22:34:16 CEST
#> # A tibble: 17 × 5
#>    game_id        receiver_player_name receiver_player_id receiver receiver_id
#>    <chr>          <chr>                <chr>              <chr>    <chr>      
#>  1 2022_01_GB_MIN R.Doubs              00-0037816         R.Doubs  00-0037816 
#>  2 2022_01_GB_MIN R.Doubs              00-0037816         R.Doubs  00-0037816 
#>  3 2022_01_GB_MIN <NA>                 <NA>               <NA>     <NA>       
#>  4 2022_01_GB_MIN R.Doubs              00-0037816         R.Doubs  00-0037816 
#>  5 2022_01_GB_MIN R.Doubs              00-0037816         R.Doubs  00-0037816 
#>  6 2022_01_GB_MIN R.Doubs              00-0037816         R.Doubs  00-0037816 
#>  7 2022_02_CHI_GB R.Doubs              00-0037816         R.Doubs  00-0037816 
#>  8 2022_02_CHI_GB R.Doubs              00-0037816         R.Doubs  00-0037816 
#>  9 2022_02_CHI_GB R.Doubs              00-0037816         R.Doubs  00-0037816 
#> 10 2022_03_GB_TB  R.Doubs              00-0037816         R.Doubs  00-0037816 
#> 11 2022_03_GB_TB  R.Doubs              00-0037816         R.Doubs  00-0037816 
#> 12 2022_03_GB_TB  R.Doubs              00-0037816         R.Doubs  00-0037816 
#> 13 2022_03_GB_TB  R.Doubs              00-0037816         R.Doubs  00-0037816 
#> 14 2022_03_GB_TB  R.Doubs              00-0037816         R.Doubs  00-0037816 
#> 15 2022_03_GB_TB  R.Doubs              00-0037816         R.Doubs  00-0037816 
#> 16 2022_03_GB_TB  R.Doubs              00-0037816         R.Doubs  00-0037816 
#> 17 2022_03_GB_TB  R.Doubs              00-0037816         R.Doubs  00-0037816

Created on 2022-09-26 with reprex v2.0.2

marvin3FF commented 2 years ago

Thank you @mrcaseb!