jimmyday12 / fitzRoy

A set of functions to easily access AFL data
https://jimmyday12.github.io/fitzRoy
Other
129 stars 27 forks source link

get_footywire_betting_odds raises error on empty data set #112

Closed cfranklin11 closed 4 years ago

cfranklin11 commented 4 years ago

Requesting betting odds for a season that doesn't have any yet (e.g. 2020 while we're still in January) raises an error from the internals of get_footywire_betting_odds. It would be better for the function to return an empty data frame instead.

I almost have a fix ready, so PR forthcoming.

The code below will raise the error:

fitzRoy::get_footywire_betting_odds(start_season = 2020, end_season = 2020)
mgpullen commented 4 years ago

FYI, running the code in cfranklin11's original post still results in an error even though we are now 8 or so rounds into the season.