I’m excited to announce the official v1.2.0 release of fitzRoy has landed on CRAN!
This release includes a few new features and some improvements to bugs that had been reported. Read on to find out about them.
Breaking Change - default argument behaviour
There was some inconsistencies in how fetch_player_stats_afltables handled NULL dates. For most functions, this would return the current season. However, for this particular function it was returning all data which was confusing. This has been changed to be consistent with other functions but will break existing code that relied on the incorrect logic so you should update your code where needed.
Having two seasons in the same year for the AFLW competition was causing issues with all fetch_* functions. Specifically, the functions were only returning data for the first of the two seasons.
A change has been made that now returns both seasons when setting the season argument to “2022”. This has been determined as the simplest, least disruptive option for now but may be reviewed in the future. You can use various fields in the returned data to filter out the season you are interested in.
# A tibble: 16 × 7
compSeason.id compSeason.shortName round.id round.n…¹ home.…² away.…³ venue…⁴
<int> <chr> <int> <chr> <chr> <chr> <chr>
1 41 AFLW Season 6 578 Round 1 St Kil… Richmo… Kineti…
2 41 AFLW Season 6 578 Round 1 Kangar… Geelon… Arden …
3 41 AFLW Season 6 578 Round 1 Wester… Melbou… Victor…
4 41 AFLW Season 6 578 Round 1 Freman… West C… Freman…
5 41 AFLW Season 6 578 Round 1 Adelai… Brisba… Flinde…
6 41 AFLW Season 6 578 Round 1 Carlton Collin… Ikon P…
7 41 AFLW Season 6 578 Round 1 Gold C… GWS Gi… Great …
8 51 AFLW Season 7 728 Round 1 Carlton Collin… Ikon P…
9 51 AFLW Season 7 728 Round 1 Adelai… Melbou… ACH Gr…
10 51 AFLW Season 7 728 Round 1 Kangar… Gold C… Blunds…
11 51 AFLW Season 7 728 Round 1 West C… Port A… Minera…
12 51 AFLW Season 7 728 Round 1 Sydney… St Kil… North …
13 51 AFLW Season 7 728 Round 1 Essend… Hawtho… Marvel…
14 51 AFLW Season 7 728 Round 1 Wester… GWS Gi… Ikon P…
15 51 AFLW Season 7 728 Round 1 Brisba… Freman… Gabba
16 51 AFLW Season 7 728 Round 1 Geelon… Richmo… GMHBA …
# … with abbreviated variable names ¹round.name, ²home.team.name,
# ³away.team.name, ⁴venue.name
Non-AFL data
An experimental feature as of version 1.2.0 is returning non-AFL related data. This only works for the source AFL but there are other comps that are available. These comps do not have as much data as the AFLM and AFLW comps but some functions will work.
Available comps include
“VFL”
“VFLW”
“WAFL”
“U18B”
“U18G”
You will have to experiment with which dates, rounds and comps work for various functions but the API should at least return a NULL value or warning if no data exists. You will also note that not all data exists, particularly advanced statistics. Please note this feature is experimental and will be improved over time.