ffverse / ffscrapr

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

Column type consistency (ints, characters, doubles etc) #285

Open TheMathNinja opened 3 years ago

TheMathNinja commented 3 years ago

I suppose this straddles the border between a bug and feature request. Maybe more feature request.

I'm still working to join ff_playerscores() and ff_scoringhistory() and was striking out, and realized it's because ff_playerscores() presents player names in "First Last" format whereas ff_playerscores() presents player names in "Last, First" format.

I'm thinking that keeping like variables of like name/type consistent across the various ffscrapr functions would be a helpful thing. On a smaller level, didn't know if season being an int in ff_playerscores() and a dbl in ff_scoringhistory() might present similar kinds of problems.

tanho63 commented 3 years ago

Naming consistency issue there is because I just try to join mfl_players onto the supplied nflfastr data. I’d get around it by doing nflfastr -> dp_playerids via gsis_id to get mfl_id.

Would not recommend name join.

As I said in #286 - ideally solved with some improved nflfastr rosters logic, which I can PR eventually. In the meantime, if you’re keen to coerce all season/week variables to ints here I would be glad to accept a PR for it, otherwise I’ll get to it when I can