jimmyday12 / fitzRoy

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

Fix fetching player stats & ladder #150

Closed cfranklin11 closed 3 years ago

cfranklin11 commented 3 years ago

Resolves #149

AFLTables is returning some columns (e.g. Round, Jumper.No.) as character type for the 2020 season, but as double type for 2021, which raises an error when we try to join the season dataframes. We have to filter out empty dataframes before setting the types, because they don't have columns to convert.

There was also a small bug in fetching the ladder for seasons before 2012, because the AFL API doesn't have data going that far back, so we return NULL just like when the round_id is missing.

jimmyday12 commented 3 years ago

Awesome - thanks mate. I'm assuming this should fix https://github.com/jimmyday12/fitzRoy/issues/149