Closed f33dy0urhe4d-VM closed 2 years ago
hey, I wasn't able to reproduce this error. It looks like this was an issue on understat's side, at the time you tried hitting the site. I'll close this for now but file a new one if you still have problems!
library(understatr)
get_leagues_meta()
#> # A tibble: 48 × 4
#> league_name year season url
#> <chr> <dbl> <chr> <chr>
#> 1 EPL 2021 2021/2022 https://understat.com/league/EPL/2021
#> 2 EPL 2020 2020/2021 https://understat.com/league/EPL/2020
#> 3 EPL 2019 2019/2020 https://understat.com/league/EPL/2019
#> 4 EPL 2018 2018/2019 https://understat.com/league/EPL/2018
#> 5 EPL 2017 2017/2018 https://understat.com/league/EPL/2017
#> 6 EPL 2016 2016/2017 https://understat.com/league/EPL/2016
#> 7 EPL 2015 2015/2016 https://understat.com/league/EPL/2015
#> 8 EPL 2014 2014/2015 https://understat.com/league/EPL/2014
#> 9 La liga 2021 2021/2022 https://understat.com/league/La%20liga/2021
#> 10 La liga 2020 2020/2021 https://understat.com/league/La%20liga/2020
#> # … with 38 more rows
get_team_players_stats(team_name = "Manchester City", year = 2018)
#>
#> ── Column specification ────────────────────────────────────────────────────────
#> cols(
#> player_id = col_double(),
#> player_name = col_character(),
#> games = col_double(),
#> time = col_double(),
#> goals = col_double(),
#> xG = col_double(),
#> assists = col_double(),
#> xA = col_double(),
#> shots = col_double(),
#> key_passes = col_double(),
#> yellow_cards = col_double(),
#> red_cards = col_double(),
#> position = col_character(),
#> team_name = col_character(),
#> npg = col_double(),
#> npxG = col_double(),
#> xGChain = col_double(),
#> xGBuildup = col_double()
#> )
#> # A tibble: 21 × 19
#> player_id player_name games time goals xG assists xA shots key_passes
#> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 619 Sergio Agüero 33 2515 21 19.9 8 5.23 118 34
#> 2 618 Raheem Sterling 34 2788 17 15.9 10 10.8 77 66
#> 3 337 Leroy Sané 31 1866 10 6.98 10 8.10 56 40
#> 4 750 Riyad Mahrez 27 1333 7 6.62 4 5.01 54 24
#> 5 3635 Bernardo Silva 36 2851 7 8.20 7 8.63 62 71
#> 6 5543 Gabriel Jesus 29 993 7 12.6 3 2.65 43 21
#> 7 314 Ilkay Gündogan 31 2133 6 4.21 3 4.97 43 43
#> 8 617 David Silva 33 2426 6 8.13 8 10.1 51 73
#> 9 2498 Aymeric Laporte 35 3059 3 3.75 3 0.839 26 13
#> 10 447 Kevin De Bruyne 19 965 2 1.47 2 6.65 31 36
#> # … with 11 more rows, and 9 more variables: yellow_cards <dbl>,
#> # red_cards <dbl>, position <chr>, team_name <chr>, npg <dbl>, npxG <dbl>,
#> # xGChain <dbl>, xGBuildup <dbl>, year <dbl>
Created on 2022-01-05 by the reprex package (v2.0.1)
I'm struggling to retrieve data from understat. I get the following error: Error in open.connection(x, "rb") : SSL certificate problem: certificate has expired. I attached more info below.
R version 3.6.3 (2020-02-29) Platform: x86_64-apple-darwin15.6.0 (64-bit) understatr package version 1.0.1.90
Any help would be appreciated, thanks!