Skip to content

2022 Club Debutants have ID 0 from AFL Tables source #189

@jaidenpopowski

Description

@jaidenpopowski

Using fetch_player_stats_afltables(), club debutants in 2022 are returned with ID 0 as Heber Quinton.
Jumper numbers still work which confirms this issue only affects new players to each club in 2022.
For example, Collingwood players include debutants 35 Nick Daicos, 26 Reef McInnes; and traded-in players 1 Patrick Lipinski, 15 Nathan Kreuger.

This is also the case with rescrape = F

library(tidyverse)

afl_tables <- fitzRoy::fetch_player_stats_afltables(season=2022, rescrape = T)
#> ℹ Looking for data from 2022-01-01 to 2022-12-31
#> ℹ fetching cached data from <github.com>✔ fetching cached data from <github.com> ... done
#> ℹ New data found for 207 matches
#> ℹ Downloading data✔ Downloading data ... done
#> ℹ Processing XMLS
#> Warning: `separate_()` was deprecated in tidyr 1.2.0.
#> ℹ Please use `separate()` instead.
#> ℹ The deprecated feature was likely used in the fitzRoy package.
#>   Please report the issue at <https://github.com/jimmyday12/fitzRoy/issues>.
#> ✔ Processing XMLS ... done
#> Finished getting afltables data

afl_tables %>% 
  filter(ID == 0) %>%
  group_by(Playing.for) %>% 
  summarise(
    games_affected = n(),
    jumper_numbers = paste(sort(unique(parse_number(Jumper.No.))), collapse = ", "),
    .groups = 'drop'
  )
#> # A tibble: 18 × 3
#>    Playing.for            games_affected jumper_numbers                         
#>    <chr>                           <int> <chr>                                  
#>  1 Adelaide                           85 5, 8, 12, 14, 30, 37                   
#>  2 Brisbane Lions                     74 1, 16, 29, 32, 39, 43, 44              
#>  3 Carlton                            83 3, 5, 16, 22, 29, 33, 37, 38, 40       
#>  4 Collingwood                        82 1, 15, 26, 34, 35, 39, 40, 45          
#>  5 Essendon                           80 8, 18, 26, 28, 29, 37, 40, 42, 47      
#>  6 Fremantle                          68 6, 17, 24, 28, 30                      
#>  7 Geelong                            41 10, 12, 15, 18, 28, 33                 
#>  8 Gold Coast                         63 1, 16, 21, 30, 31, 33, 36, 47          
#>  9 Greater Western Sydney             39 9, 10, 11, 17, 21, 31, 43              
#> 10 Hawthorn                           89 6, 18, 25, 27, 29, 30, 31, 36, 43, 45  
#> 11 Melbourne                          22 12, 27, 42                             
#> 12 North Melbourne                    88 6, 18, 21, 25, 27, 31, 34, 39, 42      
#> 13 Port Adelaide                      59 8, 11, 25, 27, 31, 36, 43, 44          
#> 14 Richmond                           71 6, 20, 28, 38, 40, 42, 47              
#> 15 St Kilda                           80 7, 17, 24, 31, 33, 38, 47              
#> 16 Sydney                             38 19, 29, 34, 39                         
#> 17 West Coast                        105 10, 19, 22, 26, 28, 31, 33, 34, 36, 39…
#> 18 Western Bulldogs                   36 10, 22, 26, 27, 36

Created on 2023-01-07 with reprex v2.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions