jimmyday12 / fitzRoy

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

Some AFL Tables ID's have more than 1 player associated with them #183

Closed jimmyday12 closed 3 weeks ago

jimmyday12 commented 1 year ago

Some ID's have more than 1 player associated with them. Not exactly sure on the long term solution but here they are for now.

x <- get_afltables_player_ids(1897:2022)

x %>%
  group_by(ID) %>%
  summarise(ids = n_distinct(Player)) %>%
  arrange(desc(ids))

# These IDS have more than 1 player
#ID   ids
#<dbl> <int>
#1  4144     2
#2 11746     2
#3 12254     2
#4 12438     2
#5 12462     2
adamcullen commented 1 year ago

Hi Jimmyday12, when I try to run x <- get_afltables_player_ids(1897:2022) I get an error: could not find function "get_afltables_player_ids".

I've run it using both the CRAN version and the dev version from Github, both produce the same error.

peteowen1 commented 3 weeks ago

fixed by https://github.com/jimmyday12/fitzRoy/pull/222

x <- get_afltables_player_ids(1897:2024)

x %>%
group_by(ID) %>%
summarise(ids = n_distinct(Player)) %>%
arrange(desc(ids))
# A tibble: 13,153 × 2
      ID   ids
   <dbl> <int>
 1     0     1
 2     1     1
 3     2     1
 4     3     1
 5     4     1
 6     5     1
 7     6     1
 8     7     1
 9     8     1
10     9     1
# ℹ 13,143 more rows
# ℹ Use `print(n = ...)` to see more rows