jimmyday12 / fitzRoy

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

Gary Ablett Snr missing goal not added as per 2019 AFL Tables update #182

Closed insightlane closed 3 months ago

insightlane commented 2 years ago

Please briefly describe your problem and what output you expect.

Please include a minimal reproducible example (AKA a reprex). If you've never heard of a reprex before, start by reading https://www.tidyverse.org/help/#reprex.


Historically Gary Ablett Senior was credited with 1030 VFL/AFL goals, the same tally that fitzRoy's fetch_player_stats_afltables returns.

In 2019 it was found that in his 4th match for Hawthorn against Richmond in 1982, he kicked 2 goals when the historical record had him recorded for 1: https://www.afl.com.au/news/52689/gary-ablett-snr-just-added-to-his-goal-tally-23-years-after-retiring

This has been updated on AFL Tables: https://afltables.com/afl/stats/games/1982/101419820424.html

However, fetch_player_stats_afltables still returns 1 goal for him in that match.

library(tibble)
library(dplyr)
library(fitzRoy)

afltables_data <- fetch_player_stats_afltables(season = c(1897:2022))

afltables_data %>%
  filter(ID == 567) %>%
  filter(Season == 1982) %>%
  mutate(Round = as.integer((Round))) %>%
  select(Season, Round, First.name, Surname, Goals, Behinds) %>%
  arrange(Round) 

# A tibble: 6 x 6
  Season Round First.name Surname Goals Behinds
   <dbl> <int> <chr>      <chr>   <dbl>   <dbl>
1   1982     2 Gary       Ablett      1       1
2   1982     3 Gary       Ablett      2       5
3   1982     4 Gary       Ablett      0       2
4   1982     5 Gary       Ablett      1       4
5   1982     9 Gary       Ablett      2       0
6   1982    22 Gary       Ablett      3       1
jimmyday12 commented 2 years ago

Thanks mate. There is actually an issue I'm working through where I have cached historical AFL Tables data so that each call doesn't have to scrape the entire website. The problem here is when any updates are made they aren't made in the cached data. I am looking to update the cache a bit more regularly than I currently do. It just takes a long time to run so trying to figure out logistics

jimmyday12 commented 3 months ago

https://github.com/jimmyday12/fitzRoy/pull/223