Skip to contents

Returns the historical season stats for a selected player(s) and stat type

Usage

fb_player_season_stats(player_url, stat_type, national = FALSE, time_pause = 3)

Arguments

player_url

the URL(s) of the player(s) (can come from fb_player_urls())

stat_type

the type of statistic required

national

the category of the required stats, with FALSE being Club Stats and TRUE being National Team Stats

time_pause

the wait time (in seconds) between page loads

The statistic type options (stat_type) include:

"standard", "shooting", "passing", "passing_types", "gca", "defense", "possession" "playing_time", "misc", "keeper", "keeper_adv"

Value

returns a dataframe of a player's historical season stats

Examples

if (FALSE) { # \dontrun{
try({
  standard_stats <- fb_player_season_stats(
    "https://fbref.com/en/players/3bb7b8b4/Ederson",
    stat_type = "standard"
  )

  multiple_playing_time <- fb_player_season_stats(
    player_url = c(
      "https://fbref.com/en/players/d70ce98e/Lionel-Messi",
      "https://fbref.com/en/players/dea698d9/Cristiano-Ronaldo"
    ),
    stat_type = "playing_time"
  )

  national_standard_stats <- fb_player_season_stats(
    "https://fbref.com/en/players/3bb7b8b4/Ederson",
    stat_type = "standard",
    national = TRUE
  )

  multiple_national_playing_time <- fb_player_season_stats(
    player_url = c(
      "https://fbref.com/en/players/d70ce98e/Lionel-Messi",
      "https://fbref.com/en/players/dea698d9/Cristiano-Ronaldo"
    ),
    stat_type = "playing_time",
    national = TRUE
  )
})
} # }