Skip to contents

Loading version of fb_match_shooting. Only some leagues available.

Usage

load_fb_match_shooting(country, gender, tier, 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

season_end_year

the year(s) the season concludes

Value

returns a dataframe

Examples

# \donttest{
try({
load_fb_match_shooting(
  country = "ENG",
  gender = "M",
  tier = "1st"
)

load_fb_match_shooting(
  country = c("ITA", "ESP"),
  gender = "M",
  tier = "1st",
  season_end_year = 2019
)
})
#> → Data last updated 2024-11-12 17:52:58.2008628845215 UTC
#> → Data last updated 2024-11-12 17:54:48.3509800434113 UTC
#> # A tibble: 19,810 × 23
#>    MatchURL     Date  Squad Home_Away Match_Half Minute Player Player_Href xG   
#>    <chr>        <chr> <chr> <chr>          <dbl> <chr>  <chr>  <chr>       <chr>
#>  1 https://fbr… 2018… Chie… Home               1 15     Ivan … /en/player… 0.02 
#>  2 https://fbr… 2018… Chie… Home               1 22     Ivan … /en/player… 0.02 
#>  3 https://fbr… 2018… Chie… Home               1 38     Mariu… /en/player… 0.23 
#>  4 https://fbr… 2018… Chie… Home               2 56     Emanu… /en/player… 0.79 
#>  5 https://fbr… 2018… Chie… Home               2 67     Ivan … /en/player… 0.03 
#>  6 https://fbr… 2018… Chie… Home               2 84     Fabri… /en/player… 0.02 
#>  7 https://fbr… 2018… Juve… Away               1 3      Sami … /en/player… 0.20 
#>  8 https://fbr… 2018… Juve… Away               1 5      Paulo… /en/player… 0.04 
#>  9 https://fbr… 2018… Juve… Away               1 6      Sami … /en/player… 0.07 
#> 10 https://fbr… 2018… Juve… Away               1 9      João … /en/player… 0.66 
#> # ℹ 19,800 more rows
#> # ℹ 14 more variables: PSxG <chr>, Outcome <chr>, Distance <chr>,
#> #   `Body Part` <chr>, Notes <chr>, Player_SCA_1 <chr>, Event_SCA_1 <chr>,
#> #   Player_SCA_2 <chr>, Event_SCA_2 <chr>, Competition_Name <chr>,
#> #   Gender <chr>, Country <chr>, Tier <chr>, Season_End_Year <int>
# }