ffverse / ffscrapr

R API Client for Fantasy Football League Platforms
https://ffscrapr.ffverse.com
Other
76 stars 21 forks source link

ff_starter_positions() returning incorrect offense_starters #415

Closed justlikekevin closed 10 months ago

justlikekevin commented 10 months ago

Describe the bug offense_starters appears to be reporting an incorrect value using a private ESPN league

Expected behavior Optimal lineups are not returning someone who would be in the FLEX position

Session information Please copy the output of ffscrapr::ffverse_sitrep() into the box below.

ffscrapr::ffverse_sitrep()
── System Info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
• R version 4.3.1 (2023-06-16 ucrt) • Running under: Windows 10 x64 (build 19045)
── Package Status ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
        package installed  cran      dev behind
1 ffopportunity  0.1.0.06  <NA> 0.1.0.06       
2        ffpros     0.1.5  <NA>    0.1.5       
3      ffscrapr  1.4.8.11 1.4.8 1.4.8.11       
4   ffsimulator  1.2.3.01 1.2.3 1.2.3.01       
── Package Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
• No options set for above packages
── Package Dependencies ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
• askpass      (1.1)      • lubridate  (1.9.2)       • tidyselect (1.2.0)     
• assertthat   (0.2.1)    • magrittr   (2.0.3)       • timechange (0.2.0)     
• backports    (1.4.1)    • memoise    (2.0.1)       • timeDate   (4022.108)  
• cachem       (1.0.8)    • mime       (0.12)        • tzdb       (0.4.0)     
• checkmate    (2.2.0)    • nflreadr   (1.4.0)       • utf8       (1.2.3)     
• cli          (3.6.1)    • numDeriv   (2016.8-1.1)  • V8         (4.3.3)     
• clock        (0.7.0)    • openssl    (2.1.0)       • vctrs      (0.6.3)     
• cpp11        (0.4.5)    • parallelly (1.36.0)      • withr      (2.5.0)     
• curl         (5.0.1)    • pillar     (1.9.0)       • xgboost    (1.7.5.1)   
• data.table   (1.14.8)   • pkgconfig  (2.0.3)       • xml2       (1.3.5)     
• diagram      (1.6.5)    • prodlim    (2023.08.28)  • class      (7.3-22)    
• digest       (0.6.33)   • progressr  (0.13.0)      • codetools  (0.2-19)    
• dplyr        (1.1.2)    • purrr      (1.0.1)       • compiler   (4.3.1)     
• ellipsis     (0.3.2)    • R6         (2.5.1)       • graphics   (4.3.1)     
• fansi        (1.0.4)    • rappdirs   (0.3.3)       • grDevices  (4.3.1)     
• fastmap      (1.1.1)    • ratelimitr (0.4.1)       • grid       (4.3.1)     
• future       (1.33.0)   • Rcpp       (1.0.11)      • KernSmooth (2.23-21)   
• future.apply (1.11.0)   • recipes    (1.0.8)       • lattice    (0.21-8)    
• generics     (0.1.3)    • Rglpk      (0.6-5)       • MASS       (7.3-60)    
• globals      (0.16.2)   • rlang      (1.1.1)       • Matrix     (1.5-4.1)   
• glue         (1.6.2)    • rvest      (1.0.3)       • methods    (4.3.1)     
• gower        (1.0.1)    • selectr    (0.4-2)       • nnet       (7.3-19)    
• hardhat      (1.3.0)    • shape      (1.4.6)       • parallel   (4.3.1)     
• hms          (1.1.3)    • slam       (0.1-50)      • rpart      (4.1.19)    
• httr         (1.4.6)    • snakecase  (0.11.0)      • splines    (4.3.1)     
• ipred        (0.9-14)   • SQUAREM    (2021.1)      • stats      (4.3.1)     
• janitor      (2.2.0)    • stringi    (1.7.12)      • survival   (3.5-5)     
• jsonlite     (1.8.7)    • stringr    (1.5.0)       • tools      (4.3.1)     
• lava         (1.7.2.1)  • sys        (3.4.2)       • utils      (4.3.1)     
• lifecycle    (1.0.3)    • tibble     (3.2.1)         
• listenv      (0.9.0)    • tidyr      (1.3.0)         

Screenshots image

image

image

Additional context Add any other context about the problem here.

justlikekevin commented 10 months ago

My first guess is that in this function the sum for offense_starters doesn't recognize RB/WR/TE because it's not there

image

image

justlikekevin commented 10 months ago

lineupSlotCounts = list(0 = 1L, 1 = 0L, 2 = 2L, 3 = 0L, 4 = 2L, 5 = 0L, 6 = 1L, 7 = 0L, 8 = 0L, 9 = 0L, 10 = 0L, 11 = 0L, 12 = 0L, 13 = 0L, 14 = 0L, 15 = 0L, 16 = 1L, 17 = 1L, 18 = 0L, 19 = 0L, 20 = 7L, 21 = 2L, 22 = 0L, 23 = 1L, 24 = 0L), lineupSlotStatLimits = structure(list(), names = character(0)), moveLimit = -1L, positionLimits = list(0 = 0L, 1 = 3L, 2 = 6L, 3 = 6L, 4 = 3L, 5 = 2L, 6 = 0L, 7 = 0L, 8 = 0L, 9 = 0L, 10 = 0L, 11 = 0L, 12 = 0L, 13 = 0L, 14 = 0L, 15 = -1L, 16 = 2L, 17 = 0L)