jimmyday12 / fitzRoy

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

Indigenous round team names not addressed using `replace_teams()` #215

Open JaseZiv opened 1 month ago

JaseZiv commented 1 month ago

AFL.com.au uses the indigenous team names for Sir Doug Nicholls round, causing downstream issues in code that joins on typical AFL team names.

packageVersion("fitzRoy")
[1] ‘1.3.0’
# obviously, this doesn't return 'Melbourne' as we'd hope:
fitzRoy::replace_teams("Narrm")
[1] "Narrm"

Additionally, the AFL randomly started using the capitalised versions of GWS and GC team nicknames (GIANTS and SUNS as opposed to Giants and Suns).

# this returns the standardised team name (as expected):
fitzRoy::replace_teams("GWS Giants")
[1] "GWS"

# while this is wrong:
fitzRoy::replace_teams("GWS GIANTS")
[1] "GWS GIANTS"

I will submit a PR for your review shortly @jimmyday12. Feel free to reject it if that function isn't intended to clean AFL.com.au team names

jimmyday12 commented 1 month ago

Thanks for picking this up. I probably won't get a chance to review until tonight but appreciate the PR

JaseZiv commented 1 month ago

Absolutely no rush at all.