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.
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 theround_id
is missing.