conorreid / dst_scoring_model

Model for D/ST fantasy football scoring
MIT License
1 stars 0 forks source link

Fix 2018/2017 split #1

Closed conorreid closed 6 years ago

conorreid commented 6 years ago

Currently get_tr_stats just pulls in the current webpage, which is a table like https://www.teamrankings.com/nfl/stat/opponent-fumbles-per-game that has only 2018 stats. We also want 2017 season wide stats, as right now 2018 season stats are a bit useless (there's been one game!). To get 2017 stats, we'll have to use ?date=2018-02-05 at the end of the URL in question to force 2017, and then add that full season stat to the 2018 last three games stat.

I propose we create a new function that calls get_tr_stats twice, once with normal URL and once with URL + ?date=2018-02-05, then fuses the two together and drops unnecessary columns to create essentially the same output of the current get_tr_stats function.

conorreid commented 6 years ago

Added get_tr_stats_full function that calls get_tr_stats twice, calling 2017 and 2018 data. Closing issue.