jimmyday12 / fitzRoy

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

Some group_ids are NA #124

Open gregfoletta opened 4 years ago

gregfoletta commented 4 years ago

Hi,

I am using the get_afltables_stats() function, and some of the group_id values are NA. I don't think this is expected behavior. Looking at the code, it appears to be the dplyr::group_indicies() function that generates the group ID. I'm sorry I haven't had a chance to dig any deeper.

suppressMessages(library(tidyverse))
fitzRoy::get_afltables_stats() %>%
    dplyr::filter(is.na(group_id)) %>% 
    dplyr::count()

# A tibble: 1 x 1
      n
  <int>
1 31337

sessionInfo() attached. sessionInfo.txt

gregfoletta commented 4 years ago

OK, I think these are the games where data cleaning occurs (in afltables_intial_scrape.R).

Is it maybe the case the a final group_indicies() needs to be called after all of the cleaning to regenerate the IDs?

jimmyday12 commented 4 years ago

THanks @gregfoletta I will take a look soon

peteowen1 commented 1 month ago

This column has been all NA for a while i think - have removed from latest afltables data. I guess technically a breaking change but not sure what anyone would've been using it for https://github.com/jimmyday12/fitzRoy/pull/235