jimmyday12 / fitzRoy

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

Some Footywire matches duplicated using update_footywire_stats() #115

Closed insightlane closed 4 years ago

insightlane commented 4 years ago

Some records in update_footywire_stats() are duplicated, it seems to be related to 2019 Round 4 and 2019 Round 6:

footywire_data <- update_footywire_stats()

footywire_data %>%
  ungroup() %>%
  group_by(Date, Season, Round, Team, Player) %>%
  summarise(count_rows = n()) %>%
  arrange(-count_rows)

# A tibble: 792 x 6
# Groups:   Date, Season, Round, Team [36]
   Date       Season Round   Team      Player             count_rows
   <date>      <dbl> <chr>   <chr>     <chr>                   <int>
 1 2019-04-11   2019 Round 4 Melbourne Angus Brayshaw              2
 2 2019-04-11   2019 Round 4 Melbourne Bayley Fritsch              2
 3 2019-04-11   2019 Round 4 Melbourne Billy Stretch               2
 4 2019-04-11   2019 Round 4 Melbourne Braydon Preuss              2
 5 2019-04-11   2019 Round 4 Melbourne Charlie Spargo              2
 6 2019-04-11   2019 Round 4 Melbourne Christian Petracca          2
 7 2019-04-11   2019 Round 4 Melbourne Christian Salem             2
 8 2019-04-11   2019 Round 4 Melbourne Clayton Oliver              2
 9 2019-04-11   2019 Round 4 Melbourne Corey Wagner                2
10 2019-04-11   2019 Round 4 Melbourne Jack Viney                  2
# ... with 782 more rows

footywire_data %>%
  ungroup() %>%
  group_by(Season, Round) %>%
  summarise(count_rows = n()) %>%
  arrange(-count_rows) 

# A tibble: 281 x 3
# Groups:   Season [11]
   Season Round    count_rows
    <dbl> <chr>         <int>
 1   2019 Round 4         792
 2   2019 Round 6         792
 3   2012 Round 1         396
 4   2012 Round 10        396
 5   2012 Round 14        396
 6   2012 Round 15        396
 7   2012 Round 16        396
 8   2012 Round 17        396
 9   2012 Round 18        396
10   2012 Round 19        396
# ... with 271 more rows