Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fotmob_get_match_players doesn't load accurate passes #150

Closed
christianlohr9 opened this issue Jul 29, 2022 · 1 comment · Fixed by #152
Closed

fotmob_get_match_players doesn't load accurate passes #150

christianlohr9 opened this issue Jul 29, 2022 · 1 comment · Fixed by #152

Comments

@christianlohr9
Copy link

christianlohr9 commented Jul 29, 2022

Hi,

the fotmob_get_match_players function seems to have an issue.
Last week everything worked fine, but this week e.g. the function doesn't fill the accurate_passes column.

The fotmob_get_season_stats for stat_name = "Accurate passes per 90" works just fine tho.

library(worldfootballR)
library(tidyverse)

fotmob_get_match_players(3552656) %>% select(id,stats_accurate_passes)
#> # A tibble: 44 × 2
#>    id      stats_accurate_passes
#>    <chr>                   <dbl>
#>  1 734689                     NA
#>  2 888650                     NA
#>  3 859026                     NA
#>  4 881818                     NA
#>  5 886252                     NA
#>  6 859030                     NA
#>  7 964595                     NA
#>  8 646026                     NA
#>  9 1204258                    NA
#> 10 271109                     NA
#> # … with 34 more rows
#> # ℹ Use `print(n = ...)` to see more rows
䀀싸覞Ǖ
#> Error in eval(expr, envir, enclos): object '䀀싸覞Ǖ' not found

Created on 2022-07-29 by the reprex package (v2.0.1)

For example Alexandra Popp (271109 last row in example) should have 13 accurate passes out of 29 touches.

image

Thanks for this awesome package, did some nice stuff with it!

Best regards,
Christian

@tonyelhabr
Copy link
Collaborator

Thanks for the reprex! I can confirm that the NAs are un-intentional and should be fixed (see #152). You may recall better than I, but I don't think fotmob used to return the numbers in front of the percentage (13/29 in your example). This is what is causing the issue. The code was written expecting that only the percentage would be returned. I think fotmob may have changed this recently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants