Loading version of fb_advanced_match_stats
. Only some leagues available.
Usage
load_fb_advanced_match_stats(
country,
gender,
tier,
stat_type,
team_or_player,
season_end_year = NA
)
Arguments
- country
the three character country code
- gender
gender of competition, either "M" or "F"
- tier
the tier of the league, ie '1st' for the EPL or '2nd' for the Championship and so on
- stat_type
the type of team statistics the user requires
- team_or_player
result either summarised for each team, or individual players
- season_end_year
the year(s) the season concludes
Examples
# \donttest{
try({
load_fb_advanced_match_stats(
country = "ENG",
gender = "M",
tier = "1st",
stat_type = "summary",
team_or_player = "player"
)
load_fb_advanced_match_stats(
country = c("ITA", "ESP"),
gender = "M",
tier = "1st",
season_end_year = 2023,
stat_type = "defense",
team_or_player = "player"
)
})
#> → Data last updated 2024-11-12 22:36:23.3208529949188 UTC
#> → Data last updated 2024-11-12 23:08:29.74356508255 UTC
#> # A tibble: 23,723 × 49
#> MatchURL League Match_Date Matchweek Home_Team Home_Formation Home_Score
#> <chr> <chr> <chr> <chr> <chr> <chr> <dbl>
#> 1 https://fbre… Serie… 2022-08-13 Serie A … Sampdoria 4-1-4-1 0
#> 2 https://fbre… Serie… 2022-08-13 Serie A … Sampdoria 4-1-4-1 0
#> 3 https://fbre… Serie… 2022-08-13 Serie A … Sampdoria 4-1-4-1 0
#> 4 https://fbre… Serie… 2022-08-13 Serie A … Sampdoria 4-1-4-1 0
#> 5 https://fbre… Serie… 2022-08-13 Serie A … Sampdoria 4-1-4-1 0
#> 6 https://fbre… Serie… 2022-08-13 Serie A … Sampdoria 4-1-4-1 0
#> 7 https://fbre… Serie… 2022-08-13 Serie A … Sampdoria 4-1-4-1 0
#> 8 https://fbre… Serie… 2022-08-13 Serie A … Sampdoria 4-1-4-1 0
#> 9 https://fbre… Serie… 2022-08-13 Serie A … Sampdoria 4-1-4-1 0
#> 10 https://fbre… Serie… 2022-08-13 Serie A … Sampdoria 4-1-4-1 0
#> # ℹ 23,713 more rows
#> # ℹ 42 more variables: Home_xG <dbl>, Home_Goals <chr>,
#> # Home_Yellow_Cards <chr>, Home_Red_Cards <chr>, Away_Team <chr>,
#> # Away_Formation <chr>, Away_Score <dbl>, Away_xG <dbl>, Away_Goals <chr>,
#> # Away_Yellow_Cards <chr>, Away_Red_Cards <chr>, Game_URL <chr>, Team <chr>,
#> # Home_Away <chr>, Player <chr>, Player_Href <chr>, Player_Num <dbl>,
#> # Nation <chr>, Pos <chr>, Age <chr>, Min <dbl>, Tkl_Tackles <dbl>, …
# }