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.
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 currentget_tr_stats
function.