fb_team_player_stats: Get fbref Team's Player Season Statistics

View source: R/fb_team_player_stats.R

fb_team_player_statsR Documentation

Get fbref Team's Player Season Statistics

Description

Returns the team's players season stats for a selected team(s) and stat type

Usage

fb_team_player_stats(team_urls, stat_type, time_pause = 3)

Arguments

team_urls

the URL(s) of the teams(s) (can come from fb_teams_urls())

stat_type

the type of statistic required

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 all players of a team's season stats

Examples

## Not run: 
try({
fb_team_player_stats("https://fbref.com/en/squads/d6a369a2/Fleetwood-Town-Stats",
                       stat_type = 'standard')

league_url <- fb_league_urls(country = "ENG", gender = "M",
                                             season_end_year = 2022, tier = "3rd")
team_urls <- fb_teams_urls(league_url)
multiple_playing_time <- fb_team_player_stats(team_urls,
                         stat_type = "playing_time")
})

## End(Not run)

worldfootballR documentation built on Nov. 26, 2022, 9:05 a.m.