ffverse / ffscrapr

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

Add expanded function of flea ff_starters #409

Closed RandalMorris closed 1 year ago

RandalMorris commented 1 year ago

Hmm. I'm not super sure that injuries would belong in ff_starters, but I think it's probably a good spot for this (unless injury status should actually go in ff_rosters for a given week?) .

If it does end up here, I'd prefer to see this being added to the main ff_starters logic rather than as a separate function.

Added text from prior PR because I goofed up the fork by forgetting to commit to a new branch and just restarted everything over.

So I looked at the ff_rosters and it does pull injury, but I think it is current inury as of now regardless of the season and week. Their is a scoring period parameter so currently the code will only pull week 1. So there is a roster call for each week.

Pulling injury from the ff_starters which uses the box score is the way to go for injury designation it seems. ff_starters has the correct data but it isn't being pulled in which is what I did and removed the filter for players_id NA. I think having that unfiltered gives better context to who played and what the score was because it show the slots left open.

I see the value of how you all have it, so it may warrant both or people can just add that filter themselves....lol. I think the filter, the injury fields, and adding BENCH to the group column is the only major changes.

Box score from Week 1 2022 shows Dak as Out and Kamara Q. This is what my detailed ff_starters shows, but ff_rosters using 2022 and week 1(local in R function and cran version) shows Dak with no injury and Kamara as Suspended. https://www.fleaflicker.com/nfl/leagues/140956/scores/50886458

RandalMorris commented 1 year ago

Updated the function and incremented it to v1.4.8.07 after the other PR.

tanho63 commented 1 year ago

Thanks for taking this on!