nflverse / nflverse-rosters

builds roster data for nflverse/nflverse-data
Other
20 stars 3 forks source link

NA experience in some cases #58

Closed Adeiko closed 1 year ago

Adeiko 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?

nflreadr 1.3.1

Describe the bug

Some players seem to have missing draft/experience datapoints some years.

Reprex

nflreadr::load_rosters(2016) |>
  dplyr::filter(pfr_id == "ThomMi05") |>
  dplyr::select(full_name, rookie_year, years_exp, entry_year)
#> ── nflverse roster data ────────────────────────────────────────────────────────
#> ℹ Data updated: 2022-08-18 21:40:54 CEST
#> # A tibble: 1 × 4
#>   full_name      rookie_year years_exp entry_year
#>   <chr>                <int>     <int>      <int>
#> 1 Michael Thomas          NA        NA         NA
nflreadr::load_rosters(2018) |>
  dplyr::filter(pfr_id == "KirkCh01") |>
  dplyr::select(full_name, rookie_year, years_exp, entry_year)
#> ── nflverse roster data ────────────────────────────────────────────────────────
#> ℹ Data updated: 2022-08-18 21:51:33 CEST
#> # A tibble: 1 × 4
#>   full_name      rookie_year years_exp entry_year
#>   <chr>                <int>     <int>      <int>
#> 1 Christian Kirk          NA        NA         NA

Expected Behavior

There shoul be the data, not NA. In other years of the same player it has data.

nflverse_sitrep

nflverse::nflverse_sitrep()
#> ── System Info ─────────────────────────────────────────────────────────────────
#> • R version 4.2.1 (2022-06-23 ucrt)   • Running under: Windows 10 x64 (build 19043)
#> ── 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.4.1)       • 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.2)     • rlang        (1.0.6)    
#> • 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-58.1)  • stringr      (1.4.1)    
#> • ellipsis    (0.3.2)       • Matrix      (1.5-1)     • sys          (3.4)      
#> • fansi       (1.0.3)       • memoise     (2.0.1)     • tibble       (3.1.8)    
#> • farver      (2.1.1)       • mgcv        (1.8-40)    • tidyr        (1.2.1)    
#> • fastmap     (1.1.0)       • mime        (0.12)      • tidyselect   (1.1.2)    
#> • fastrmodels (1.0.2.9001)  • munsell     (0.5.0)     • tzdb         (0.3.0)    
#> • furrr       (0.3.1)       • nlme        (3.1-159)   • utf8         (1.2.2)    
#> • future      (1.28.0)      • openssl     (2.0.3)     • 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)       
#> ────────────────────────────────────────────────────────────────────────────────

Screenshots

No response

Additional context

Thought it was because of missing games at the start/end of the season but MT only missed 1 game in the middle of the season.

john-b-edwards commented 1 year ago

Should be mostly if not completely resolved with #69 :

nflreadr::load_rosters(2016) |>
  dplyr::filter(pfr_id == "ThomMi05") |>
  dplyr::select(full_name, rookie_year, years_exp, entry_year)
#> ── nflverse roster data ────────────────────────────────────────────────────────
#> ℹ Data updated: 2023-03-21 20:41:17 PDT
#> # A tibble: 1 × 4
#>   full_name      rookie_year years_exp entry_year
#>   <chr>                <int>     <int>      <int>
#> 1 Michael Thomas        2016         0       2016

nflreadr::load_rosters(2018) |>
  dplyr::filter(pfr_id == "KirkCh01") |>
  dplyr::select(full_name, rookie_year, years_exp, entry_year)
#> ── nflverse roster data ────────────────────────────────────────────────────────
#> ℹ Data updated: 2023-03-21 20:52:16 PDT
#> # A tibble: 1 × 4
#>   full_name      rookie_year years_exp entry_year
#>   <chr>                <int>     <int>      <int>
#> 1 Christian Kirk        2018         0       2018