Closed hamgamb closed 3 years ago
Thanks for the issue and the reprex!
Can I ask what is it that you are expecting here and why you think the Footywire data is incomplete? The data here is coming different data sources so they won't match. Fryzigg data is always different to Footywire data.
Is there something in the Footywire data that is specifically missing or more just that you expected them to return the same data?
I would have expected that player stats data should have data for every player within a game. Sorry that I didn't make that clear - my reprex intended to show the differences in the number of rows returned, rather than the columns.
The footywire player stats for the grand final last year only has data for 4 players - compared to the 44 players in the fryzigg data.
Ahhhhh nice. Sorry I misread that as 44! I'll have to take a look at what is going on there.
As far as i can tell @jimmyday12 , _dat_url2 <- "https://github.com/jimmyday12/fitzroy_data/raw/master/data-raw/player_stats/player_stats.rda"_ in your _update_footywirestats function is the cause of the issues, as the rda file only has ~8k rows but 2199 unique match IDs.
Hmmm there is a bug that I introduced when I renamed the master
branch to main
.
I wonder if installing the development version fixes this.
I think I was using the development version already, but just re-installed to double check. Same deal.
library(fitzRoy)
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
footywire_rows <- fetch_player_stats_footywire(season = 2020) %>%
filter(Round == "Grand Final") %>%
nrow()
#> i Getting match IDs
#> v Getting match IDs ... done
#> i Checking data on <https://github.com/jimmyday12/fitzRoy>v Checking data on <https://github.com/jimmyday12/fitzRoy> ... done
#> i No new matches found - returning data cached on github
footywire_rows
#> [1] 4
packageVersion("fitzRoy")
#> [1] '0.3.3.9000'
Created on 2021-03-10 by the reprex package (v1.0.0)
Damn. I will try take a look at it this weekend. Planning to do a CRAN release at some point over the weekend so hopefully can fix this up.
It actually looks like a data issue rather than the package itself (I keep a separate repo over at https://github.com/jimmyday12/fitzroy_data to house some historical data). As @patrickhalberstram points out - the data in that repo looks to be wrong
I think this should be fixed now - @hamgamb if you could check that would be great!
Created on 2021-03-04 by the reprex package (v1.0.0)
Compared to data for the same game from fryzigg
Created on 2021-03-04 by the reprex package (v1.0.0)