Title: | Extract and Clean World Football (Soccer) Data |
---|---|
Description: | Allow users to obtain clean and tidy football (soccer) game, team and player data. Data is collected from a number of popular sites, including 'FBref', transfer and valuations data from 'Transfermarkt'<https://www.transfermarkt.com/> and shooting location and other match stats data from 'Understat'<https://understat.com/>. It gives users the ability to access data more efficiently, rather than having to export data tables to files before being able to complete their analysis. |
Authors: | Jason Zivkovic [aut, cre, cph], Tony ElHabr [ctb], Tan Ho [ctb], Samuel H [ctb] |
Maintainer: | Jason Zivkovic <[email protected]> |
License: | GPL-3 |
Version: | 0.6.6.0001 |
Built: | 2024-11-15 22:52:48 UTC |
Source: | https://github.com/jaseziv/worldfootballr |
Returns data frame of selected statistics for each match, for either whole team or individual players. Multiple URLs can be passed to the function, but only one 'stat_type' can be selected. Replaces the deprecated function get_advanced_match_stats()
fb_advanced_match_stats(match_url, stat_type, team_or_player, time_pause = 3)
fb_advanced_match_stats(match_url, stat_type, team_or_player, time_pause = 3)
match_url |
the three character country code for all countries |
stat_type |
the type of team statistics the user requires |
team_or_player |
result either summarised for each team, or individual players |
time_pause |
the wait time (in seconds) between page loads The statistic type options (stat_type) include: "summary", "passing", "passing"_types, "defense" , "possession", "misc", "keeper" |
returns a dataframe of a selected team statistic type for a selected match(es)
## Not run: try({ urls <- fb_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st") df <- fb_advanced_match_stats(match_url=urls,stat_type="possession",team_or_player="player") }) ## End(Not run)
## Not run: try({ urls <- fb_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st") df <- fb_advanced_match_stats(match_url=urls,stat_type="possession",team_or_player="player") }) ## End(Not run)
Returns data frame of selected statistics for seasons of the big 5 Euro leagues, for either whole team or individual players. Multiple seasons can be passed to the function, but only one 'stat_type' can be selected
fb_big5_advanced_season_stats( season_end_year, stat_type, team_or_player, time_pause = 3 )
fb_big5_advanced_season_stats( season_end_year, stat_type, team_or_player, time_pause = 3 )
season_end_year |
the year(s) the season concludes |
stat_type |
the type of team statistics the user requires |
team_or_player |
result either summarised for each team, or individual players |
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", "keepers", "keepers_adv" |
returns a dataframe of a selected team or player statistic type for a selected season(s)
## Not run: try({ fb_big5_advanced_season_stats(season_end_year=2021,stat_type="possession",team_or_player="player") }) ## End(Not run)
## Not run: try({ fb_big5_advanced_season_stats(season_end_year=2021,stat_type="possession",team_or_player="player") }) ## End(Not run)
Get the season stats for all teams / players in a selected league
fb_league_stats( country, gender, season_end_year, tier = "1st", non_dom_league_url = NA, stat_type, team_or_player, time_pause = 3, rate = purrr::rate_backoff(max_times = 3) )
fb_league_stats( country, gender, season_end_year, tier = "1st", non_dom_league_url = NA, stat_type, team_or_player, time_pause = 3, rate = purrr::rate_backoff(max_times = 3) )
country |
the three character country code |
gender |
gender of competition, either "M" or "F", or both |
season_end_year |
the year the season(s) concludes |
tier |
the tier of the league, ie '1st' for the EPL or '2nd' for the Championship and so on |
non_dom_league_url |
the URL for Cups and Competitions found at https://fbref.com/en/comps/ |
stat_type |
the type of statistic required. Must be one of the following:
|
team_or_player |
result either summarised for each team, or individual players |
time_pause |
the wait time (in seconds) between page loads |
rate |
passed to 'purrr::insistently'. The function can be brittle, and works only on a second or third try. This parameter controls how much the function will retry to get a result. |
a dataframe of season stats for all teams / players in a league
## Not run: try({ fb_league_stats( country = "ENG", gender = "M", season_end_year = 2022, tier = "1st", stat_type = "shooting", team_or_player = "player" ) ## Non-domestic league ## Note that this is more likely to fail due to the volume of players fb_league_stats( country = NA_character_, gender = "M", season_end_year = 2023, tier = NA_character_, non_dom_league_url = "https://fbref.com/en/comps/8/history/Champions-League-Seasons", stat_type = "standard", team_or_player = "player" ) }) ## End(Not run)
## Not run: try({ fb_league_stats( country = "ENG", gender = "M", season_end_year = 2022, tier = "1st", stat_type = "shooting", team_or_player = "player" ) ## Non-domestic league ## Note that this is more likely to fail due to the volume of players fb_league_stats( country = NA_character_, gender = "M", season_end_year = 2023, tier = NA_character_, non_dom_league_url = "https://fbref.com/en/comps/8/history/Champions-League-Seasons", stat_type = "standard", team_or_player = "player" ) }) ## End(Not run)
Returns the URLs for season leagues of a selected country
fb_league_urls(country, gender, season_end_year, tier = "1st")
fb_league_urls(country, gender, season_end_year, tier = "1st")
country |
the three character country code |
gender |
gender of competition, either "M" or "F" |
season_end_year |
the year the season(s) concludes (defaults to all available seasons) |
tier |
the tier of the league, ie '1st' for the EPL or '2nd' for the Championship and so on |
returns a character vector of all fbref league URLs for selected country, season, gender and tier
## Not run: try({ fb_league_urls(country = "ENG", gender = "M", season_end_year = 2021, tier = '1st') }) ## End(Not run)
## Not run: try({ fb_league_urls(country = "ENG", gender = "M", season_end_year = 2021, tier = '1st') }) ## End(Not run)
Returns lineups for home and away teams for a selected match Replaces the deprecated function get_match_lineups
fb_match_lineups(match_url, time_pause = 3)
fb_match_lineups(match_url, time_pause = 3)
match_url |
the fbref.com URL for the required match |
time_pause |
the wait time (in seconds) between page loads |
returns a dataframe with the team lineups for a selected match
## Not run: try({ match <- fb_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st")[1] df <- fb_match_lineups(match_url = match) }) ## End(Not run)
## Not run: try({ match <- fb_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st")[1] df <- fb_match_lineups(match_url = match) }) ## End(Not run)
Returns match report details for selected matches. Replaces the deprecated function get_match_report
fb_match_report(match_url, time_pause = 3)
fb_match_report(match_url, time_pause = 3)
match_url |
the fbref.com URL for the required match |
time_pause |
the wait time (in seconds) between page loads |
returns a dataframe with the match details for a selected match
## Not run: try({ match <- fb_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st")[1] df <- fb_match_report(match_url = match) }) ## End(Not run)
## Not run: try({ match <- fb_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st")[1] df <- fb_match_report(match_url = match) }) ## End(Not run)
Returns the game results for a given league season(s) Replaces the deprecated function get_match_results
fb_match_results( country, gender, season_end_year, tier = "1st", non_dom_league_url = NA )
fb_match_results( country, gender, season_end_year, tier = "1st", non_dom_league_url = NA )
country |
the three character country code |
gender |
gender of competition, either "M" or "F" |
season_end_year |
the year(s) the season concludes |
tier |
the tier of the league, ie '1st' for the EPL or '2nd' for the Championship and so on |
non_dom_league_url |
the URL for Cups and Competitions found at https://fbref.com/en/comps/ |
returns a dataframe with the results of the competition, season and gender
## Not run: try({ df <- fb_match_results(country = c("ITA"), gender = "M", season_end_year = 2021) # for results from English Championship: df <- fb_match_results(country = "ENG", gender = "M", season_end_year = 2021, tier = "2nd") # for international friendlies: }) ## End(Not run)
## Not run: try({ df <- fb_match_results(country = c("ITA"), gender = "M", season_end_year = 2021) # for results from English Championship: df <- fb_match_results(country = "ENG", gender = "M", season_end_year = 2021, tier = "2nd") # for international friendlies: }) ## End(Not run)
Returns detailed player shooting data for home and away teams for a selected match(es) Replaces the deprecated function get_match_shooting
fb_match_shooting(match_url, time_pause = 3)
fb_match_shooting(match_url, time_pause = 3)
match_url |
the fbref.com URL for the required match |
time_pause |
the wait time (in seconds) between page loads |
returns a dataframe
## Not run: try({ match <- "https://fbref.com/en/matches/bf52349b/Fulham-Arsenal-September-12-2020-Premier-League" df <- fb_match_shooting(match_url = match) }) ## End(Not run)
## Not run: try({ match <- "https://fbref.com/en/matches/bf52349b/Fulham-Arsenal-September-12-2020-Premier-League" df <- fb_match_shooting(match_url = match) }) ## End(Not run)
Returns match summary data for selected match URLs, including goals, subs and cards Replaces the deprecated function get_match_summary
fb_match_summary(match_url, time_pause = 3)
fb_match_summary(match_url, time_pause = 3)
match_url |
the fbref.com URL for the required match |
time_pause |
the wait time (in seconds) between page loads |
returns a dataframe with the match events (goals, cards, subs) for selected matches
## Not run: try({ match <- fb_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st")[1] df <- fb_match_summary(match_url = match) }) ## End(Not run)
## Not run: try({ match <- fb_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st")[1] df <- fb_match_summary(match_url = match) }) ## End(Not run)
Returns the URL for each match played for a given league season Replaces the deprecated get_match_urls
fb_match_urls( country, gender, season_end_year, tier = "1st", non_dom_league_url = NA, time_pause = 3 )
fb_match_urls( country, gender, season_end_year, tier = "1st", non_dom_league_url = NA, time_pause = 3 )
country |
the three character country code |
gender |
gender of competition, either "M" or "F", or both |
season_end_year |
the year the season(s) concludes |
tier |
the tier of the league, ie '1st' for the EPL or '2nd' for the Championship and so on |
non_dom_league_url |
the URL for Cups and Competitions found at https://fbref.com/en/comps/ |
time_pause |
the wait time (in seconds) between page loads |
returns a character vector of all fbref match URLs for selected competition, season and gender
## Not run: try({ fb_match_urls(country = "ENG", gender = "M", season_end_year = c(2019:2021), tier = "1st") non_dom <- "https://fbref.com/en/comps/218/history/Friendlies-M-Seasons" fb_match_urls(country = "", gender = "M", season_end_year = 2021, non_dom_league_url = non_dom) }) ## End(Not run)
## Not run: try({ fb_match_urls(country = "ENG", gender = "M", season_end_year = c(2019:2021), tier = "1st") non_dom <- "https://fbref.com/en/comps/218/history/Friendlies-M-Seasons" fb_match_urls(country = "", gender = "M", season_end_year = 2021, non_dom_league_url = non_dom) }) ## End(Not run)
Returns the player's career goal and assist logs
fb_player_goal_logs(player_urls, time_pause = 3, goals_or_assists = "goals")
fb_player_goal_logs(player_urls, time_pause = 3, goals_or_assists = "goals")
player_urls |
the URL(s) of the player(s) |
time_pause |
the wait time (in seconds) between page loads |
goals_or_assists |
select whether to return data of "goals" (the default), "assists", or "both" |
returns a dataframe of the player's goals and assists
## Not run: try({ # for single players: jwp_url <- "https://fbref.com/en/players/3515d404/" fb_player_goal_logs(player_urls = jwp_url, goals_or_assists = "goals") }) ## End(Not run)
## Not run: try({ # for single players: jwp_url <- "https://fbref.com/en/players/3515d404/" fb_player_goal_logs(player_urls = jwp_url, goals_or_assists = "goals") }) ## End(Not run)
Returns all match logs for a selected player, season and stat type
fb_player_match_logs(player_url, season_end_year, stat_type, time_pause = 3)
fb_player_match_logs(player_url, season_end_year, stat_type, time_pause = 3)
player_url |
the URL of the player (can come from fb_player_urls()) |
season_end_year |
the year the season(s) concludes |
stat_type |
the type of statistic required |
time_pause |
the wait time (in seconds) between page loads The statistic type options (stat_type) include: "summary", "keepers", "passing", "passing_types", "gca", "defense", "possession", "misc" |
returns a dataframe of a player's match logs for a season
try({ fb_player_match_logs("https://fbref.com/en/players/3bb7b8b4/Ederson", season_end_year = 2021, stat_type = 'summary') })
try({ fb_player_match_logs("https://fbref.com/en/players/3bb7b8b4/Ederson", season_end_year = 2021, stat_type = 'summary') })
Returns the scouting report for a selected player
fb_player_scouting_report( player_url, pos_versus, league_comp_name = NULL, time_pause = 3 )
fb_player_scouting_report( player_url, pos_versus, league_comp_name = NULL, time_pause = 3 )
player_url |
the URL of the player (can come from fb_player_urls()) |
pos_versus |
either "primary" or "secondary" as fbref offer comparisons against multiple positions |
league_comp_name |
the league or competition name(s) you want the scouting report for. Defaults to all |
time_pause |
the wait time (in seconds) between page loads |
returns a dataframe of a player's full scouting information for all seasons available on FBref
## Not run: try({ fb_player_scouting_report(player_url = "https://fbref.com/en/players/d70ce98e/Lionel-Messi", pos_versus = "primary") # to filter for the last 365 days: fb_player_scouting_report(player_url = "https://fbref.com/en/players/d70ce98e/Lionel-Messi", pos_versus = "primary", league_comp_name = "Last 365 Days Men's Big 5 Leagues, UCL, UEL") # to get secondary positions fb_player_scouting_report(player_url = "https://fbref.com/en/players/d70ce98e/Lionel-Messi", pos_versus = "secondary") # for the last 365 days and also the 2022 WC fb_player_scouting_report(player_url = "https://fbref.com/en/players/d70ce98e/Lionel-Messi", pos_versus = "secondary", league_comp_name = c("Last 365 Days Men's Big 5 Leagues, UCL, UEL", "2022 World Cup")) }) ## End(Not run)
## Not run: try({ fb_player_scouting_report(player_url = "https://fbref.com/en/players/d70ce98e/Lionel-Messi", pos_versus = "primary") # to filter for the last 365 days: fb_player_scouting_report(player_url = "https://fbref.com/en/players/d70ce98e/Lionel-Messi", pos_versus = "primary", league_comp_name = "Last 365 Days Men's Big 5 Leagues, UCL, UEL") # to get secondary positions fb_player_scouting_report(player_url = "https://fbref.com/en/players/d70ce98e/Lionel-Messi", pos_versus = "secondary") # for the last 365 days and also the 2022 WC fb_player_scouting_report(player_url = "https://fbref.com/en/players/d70ce98e/Lionel-Messi", pos_versus = "secondary", league_comp_name = c("Last 365 Days Men's Big 5 Leagues, UCL, UEL", "2022 World Cup")) }) ## End(Not run)
Returns the historical season stats for a selected player(s) and stat type
fb_player_season_stats(player_url, stat_type, national = FALSE, time_pause = 3)
fb_player_season_stats(player_url, stat_type, national = FALSE, time_pause = 3)
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" |
returns a dataframe of a player's historical season stats
## Not run: 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 ) }) ## End(Not run)
## Not run: 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 ) }) ## End(Not run)
Returns the URLs for all players for a given team
fb_player_urls(team_url, time_pause = 3)
fb_player_urls(team_url, time_pause = 3)
team_url |
the player's team URL (can be from fb_team_urls()) |
time_pause |
the wait time (in seconds) between page loads |
returns a character vector of all fbref player URLs for a selected team
## Not run: try({ fb_player_urls("https://fbref.com/en/squads/fd962109/Fulham-Stats") }) ## End(Not run)
## Not run: try({ fb_player_urls("https://fbref.com/en/squads/fd962109/Fulham-Stats") }) ## End(Not run)
Returns different team season statistics results for a given league season and stat type Replaces the deprecated function get_season_team_stats
fb_season_team_stats( country, gender, season_end_year, tier, stat_type, time_pause = 3 )
fb_season_team_stats( country, gender, season_end_year, tier, stat_type, time_pause = 3 )
country |
the three character country code for all countries |
gender |
gender of competition, either "M", "F" or both |
season_end_year |
the year the season(s) concludes |
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 |
time_pause |
the wait time (in seconds) between page loads The statistic type options (stat_type) include: "league_table", "league_table_home_away", "standard", "keeper", "keeper_adv", "shooting", "passing", "passing_types", "goal_shot_creation", "defense" , "possession", "playing_time", "misc" |
returns a dataframe of a selected team statistic type for a selected league season
## Not run: try({ fb_season_team_stats("ITA", "M", 2021, "1st", "defense") }) ## End(Not run)
## Not run: try({ fb_season_team_stats("ITA", "M", 2021, "1st", "defense") }) ## End(Not run)
Returns all player wages from FBref via Capology
fb_squad_wages(team_urls, time_pause = 3)
fb_squad_wages(team_urls, time_pause = 3)
team_urls |
the URL(s) of the teams(s) (can come from fb_teams_urls()) |
time_pause |
the wait time (in seconds) between page loads |
returns a dataframe with all available estimated player wages for the selected team(s)
## Not run: try({ # for single teams: man_city_url <- "https://fbref.com/en/squads/b8fd03ef/Manchester-City-Stats" fb_squad_wages(team_urls = man_city_url) }) ## End(Not run)
## Not run: try({ # for single teams: man_city_url <- "https://fbref.com/en/squads/b8fd03ef/Manchester-City-Stats" fb_squad_wages(team_urls = man_city_url) }) ## End(Not run)
Returns the team's season goal logs
fb_team_goal_logs(team_urls, time_pause = 3, for_or_against = "for")
fb_team_goal_logs(team_urls, time_pause = 3, for_or_against = "for")
team_urls |
the URL(s) of the team(s) (can come from fb_teams_urls()) |
time_pause |
the wait time (in seconds) between page loads |
for_or_against |
select whether to return data of goals "for" (the default), goals "against", or "both" |
returns a dataframe of the team's goals scored and conceded in the season
## Not run: try({ # for single teams: man_city_url <- "https://fbref.com/en/squads/b8fd03ef/Manchester-City-Stats" fb_team_goal_logs(team_urls = man_city_url, for_or_against = "for") }) ## End(Not run)
## Not run: try({ # for single teams: man_city_url <- "https://fbref.com/en/squads/b8fd03ef/Manchester-City-Stats" fb_team_goal_logs(team_urls = man_city_url, for_or_against = "for") }) ## End(Not run)
Returns all match statistics for a team(s) in a given season
fb_team_match_log_stats(team_urls, stat_type, time_pause = 3)
fb_team_match_log_stats(team_urls, stat_type, time_pause = 3)
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: "shooting", "keeper", "passing", "passing_types", "gca", "defense", "misc" |
returns a dataframe with the selected stat outputs of all games played by the selected team(s)
## Not run: try({ # for single teams: man_city_url <- "https://fbref.com/en/squads/b8fd03ef/Manchester-City-Stats" fb_team_match_log_stats(team_urls = man_city_url, stat_type = "passing") }) ## End(Not run)
## Not run: try({ # for single teams: man_city_url <- "https://fbref.com/en/squads/b8fd03ef/Manchester-City-Stats" fb_team_match_log_stats(team_urls = man_city_url, stat_type = "passing") }) ## End(Not run)
Returns all game results for a team in a given season Replaces the deprecated function get_team_match_results
fb_team_match_results(team_url, time_pause = 3)
fb_team_match_results(team_url, time_pause = 3)
team_url |
the URL for the team season |
time_pause |
the wait time (in seconds) between page loads |
returns a dataframe with the results of all games played by the selected team(s)
## Not run: try({ # for single teams: man_city_url <- "https://fbref.com/en/squads/b8fd03ef/Manchester-City-Stats" fb_team_match_results(man_city_url) }) ## End(Not run)
## Not run: try({ # for single teams: man_city_url <- "https://fbref.com/en/squads/b8fd03ef/Manchester-City-Stats" fb_team_match_results(man_city_url) }) ## End(Not run)
Returns match team stats for selected matches.
fb_team_match_stats(match_url, time_pause = 3)
fb_team_match_stats(match_url, time_pause = 3)
match_url |
the fbref.com URL for the required match |
time_pause |
the wait time (in seconds) between page loads |
returns a dataframe with the match team stats for a selected match
## Not run: try({ match <- fb_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st")[1] df <- fb_team_match_stats(match_url = match) }) ## End(Not run)
## Not run: try({ match <- fb_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st")[1] df <- fb_team_match_stats(match_url = match) }) ## End(Not run)
Returns the team's players season stats for a selected team(s) and stat type
fb_team_player_stats(team_urls, stat_type, time_pause = 3)
fb_team_player_stats(team_urls, stat_type, time_pause = 3)
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" |
returns a dataframe of all players of a team's season stats
## 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)
## 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)
Returns the URLs for all teams for a given league
fb_teams_urls(league_url, time_pause = 3)
fb_teams_urls(league_url, time_pause = 3)
league_url |
the league URL (can be from fb_league_urls()) |
time_pause |
the wait time (in seconds) between page loads |
returns a character vector of all fbref team URLs for a selected league
## Not run: try({ fb_teams_urls("https://fbref.com/en/comps/9/Premier-League-Stats") }) ## End(Not run)
## Not run: try({ fb_teams_urls("https://fbref.com/en/comps/9/Premier-League-Stats") }) ## End(Not run)
Returns data frame of selected statistics for each match, for either whole team or individual players. Multiple URLs can be passed to the function, but only one 'stat_type' can be selected
get_advanced_match_stats(match_url, stat_type, team_or_player, time_pause = 3)
get_advanced_match_stats(match_url, stat_type, team_or_player, time_pause = 3)
match_url |
the three character country code for all countries |
stat_type |
the type of team statistics the user requires |
team_or_player |
result either summarised for each team, or individual players |
time_pause |
the wait time (in seconds) between page loads The statistic type options (stat_type) include: "summary", "passing", "passing"_types, "defense" , "possession", "misc", "keeper" |
returns a dataframe of a selected team statistic type for a selected match(es)
## Not run: try({ urls <- get_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st") df <- get_advanced_match_stats(match_url=urls,stat_type="possession",team_or_player="player") }) ## End(Not run)
## Not run: try({ urls <- get_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st") df <- get_advanced_match_stats(match_url=urls,stat_type="possession",team_or_player="player") }) ## End(Not run)
Returns lineups for home and away teams for a selected match
get_match_lineups(match_url, time_pause = 3)
get_match_lineups(match_url, time_pause = 3)
match_url |
the fbref.com URL for the required match |
time_pause |
the wait time (in seconds) between page loads |
returns a dataframe with the team lineups for a selected match
## Not run: try({ match <- get_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st")[1] df <- get_match_lineups(match_url = match) }) ## End(Not run)
## Not run: try({ match <- get_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st")[1] df <- get_match_lineups(match_url = match) }) ## End(Not run)
Returns match report details for selected matches
get_match_report(match_url, time_pause = 3)
get_match_report(match_url, time_pause = 3)
match_url |
the fbref.com URL for the required match |
time_pause |
the wait time (in seconds) between page loads |
returns a dataframe with the match details for a selected match
## Not run: try({ match <- get_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st")[1] df <- get_match_report(match_url = match) }) ## End(Not run)
## Not run: try({ match <- get_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st")[1] df <- get_match_report(match_url = match) }) ## End(Not run)
Returns the game results for a given league season(s)
get_match_results( country, gender, season_end_year, tier = "1st", non_dom_league_url = NA )
get_match_results( country, gender, season_end_year, tier = "1st", non_dom_league_url = NA )
country |
the three character country code |
gender |
gender of competition, either "M" or "F" |
season_end_year |
the year(s) the season concludes |
tier |
the tier of the league, ie '1st' for the EPL or '2nd' for the Championship and so on |
non_dom_league_url |
the URL for Cups and Competitions found at https://fbref.com/en/comps/ |
returns a dataframe with the results of the competition, season and gender
## Not run: try({ df <- get_match_results(country = c("ITA"), gender = "M", season_end_year = 2021) # for results from English Championship: df <- get_match_results(country = "ENG", gender = "M", season_end_year = 2021, tier = "2nd") # for international friendlies: }) ## End(Not run)
## Not run: try({ df <- get_match_results(country = c("ITA"), gender = "M", season_end_year = 2021) # for results from English Championship: df <- get_match_results(country = "ENG", gender = "M", season_end_year = 2021, tier = "2nd") # for international friendlies: }) ## End(Not run)
Returns detailed player shooting data for home and away teams for a selected match(es)
get_match_shooting(match_url, time_pause = 3)
get_match_shooting(match_url, time_pause = 3)
match_url |
the fbref.com URL for the required match |
time_pause |
the wait time (in seconds) between page loads |
returns a dataframe
## Not run: try({ match <- "https://fbref.com/en/matches/bf52349b/Fulham-Arsenal-September-12-2020-Premier-League" df <- get_match_shooting(match_url = match) }) ## End(Not run)
## Not run: try({ match <- "https://fbref.com/en/matches/bf52349b/Fulham-Arsenal-September-12-2020-Premier-League" df <- get_match_shooting(match_url = match) }) ## End(Not run)
Returns match summary data for selected match URLs, including goals, subs and cards
get_match_summary(match_url, time_pause = 3)
get_match_summary(match_url, time_pause = 3)
match_url |
the fbref.com URL for the required match |
time_pause |
the wait time (in seconds) between page loads |
returns a dataframe with the match events (goals, cards, subs) for selected matches
## Not run: try({ match <- get_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st")[1] df <- get_match_summary(match_url = match) }) ## End(Not run)
## Not run: try({ match <- get_match_urls(country = "AUS", gender = "F", season_end_year = 2021, tier = "1st")[1] df <- get_match_summary(match_url = match) }) ## End(Not run)
Returns the URL for each match played for a given league season
get_match_urls( country, gender, season_end_year, tier = "1st", non_dom_league_url = NA, time_pause = 3 )
get_match_urls( country, gender, season_end_year, tier = "1st", non_dom_league_url = NA, time_pause = 3 )
country |
the three character country code |
gender |
gender of competition, either "M" or "F", or both |
season_end_year |
the year the season(s) concludes |
tier |
the tier of the league, ie '1st' for the EPL or '2nd' for the Championship and so on |
non_dom_league_url |
the URL for Cups and Competitions found at https://fbref.com/en/comps/ |
time_pause |
the wait time (in seconds) between page loads |
returns a character vector of all fbref match URLs for selected competition, season and gender
## Not run: try({ get_match_urls(country = "ENG", gender = "M", season_end_year = c(2019:2021), tier = "1st") non_dom <- "https://fbref.com/en/comps/218/history/Friendlies-M-Seasons" get_match_urls(country = "", gender = "M", season_end_year = 2021, non_dom_league_url = non_dom) }) ## End(Not run)
## Not run: try({ get_match_urls(country = "ENG", gender = "M", season_end_year = c(2019:2021), tier = "1st") non_dom <- "https://fbref.com/en/comps/218/history/Friendlies-M-Seasons" get_match_urls(country = "", gender = "M", season_end_year = 2021, non_dom_league_url = non_dom) }) ## End(Not run)
Returns data frame of player valuations (in Euros) from transfermarkt.com
get_player_market_values(country_name, start_year, league_url = NA)
get_player_market_values(country_name, start_year, league_url = NA)
country_name |
the country of the league's players |
start_year |
the start year of the season (2020 for the 20/21 season) |
league_url |
league url from transfermarkt.com. To be used when country_name not available in main function |
returns a dataframe of player valuations for country/seasons
Returns different team season statistics results for a given league season and stat type
get_season_team_stats( country, gender, season_end_year, tier, stat_type, time_pause = 3 )
get_season_team_stats( country, gender, season_end_year, tier, stat_type, time_pause = 3 )
country |
the three character country code for all countries |
gender |
gender of competition, either "M", "F" or both |
season_end_year |
the year the season(s) concludes |
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 |
time_pause |
the wait time (in seconds) between page loads The statistic type options (stat_type) include: "league_table", "league_table_home_away", "standard", "keeper", "keeper_adv", "shooting", "passing", "passing_types", "goal_shot_creation", "defense" , "possession", "playing_time", "misc" |
returns a dataframe of a selected team statistic type for a selected league season
## Not run: try({ get_season_team_stats("ITA", "M", 2021, "1st", "defense") }) ## End(Not run)
## Not run: try({ get_season_team_stats("ITA", "M", 2021, "1st", "defense") }) ## End(Not run)
Returns all game results for a team in a given season
get_team_match_results(team_url, time_pause = 3)
get_team_match_results(team_url, time_pause = 3)
team_url |
the URL for the team season |
time_pause |
the wait time (in seconds) between page loads |
returns a dataframe with the results of all games played by the selected team(s)
## Not run: try({ # for single teams: man_city_url <- "https://fbref.com/en/squads/b8fd03ef/Manchester-City-Stats" get_team_match_results(man_city_url) }) ## End(Not run)
## Not run: try({ # for single teams: man_city_url <- "https://fbref.com/en/squads/b8fd03ef/Manchester-City-Stats" get_team_match_results(man_city_url) }) ## End(Not run)
Loading version of fb_advanced_match_stats
. Only some leagues available.
load_fb_advanced_match_stats( country, gender, tier, stat_type, team_or_player, season_end_year = NA )
load_fb_advanced_match_stats( country, gender, tier, stat_type, team_or_player, season_end_year = NA )
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 |
returns a dataframe
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" ) })
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" ) })
Loading version of fb_big5_advanced_season_stats
Returns data frame of selected statistics for seasons of the big 5 Euro leagues, for either
whole team or individual players.
Multiple seasons can be passed to the function, but only one 'stat_type' can be selected
load_fb_big5_advanced_season_stats( season_end_year = NA, stat_type, team_or_player )
load_fb_big5_advanced_season_stats( season_end_year = NA, stat_type, team_or_player )
season_end_year |
the year(s) the season concludes |
stat_type |
the type of team statistics the user requires |
team_or_player |
result either summarised for each team, or individual players The statistic type options (stat_type) include: "standard", "shooting", "passing", "passing_types", "gca", "defense", "possession", "playing_time", "misc", "keepers", "keepers_adv" |
returns a dataframe of a selected team or player statistic type for a selected season(s)
try({ df <- load_fb_big5_advanced_season_stats( season_end_year = c(2018:2022), stat_type = "defense", team_or_player = "player" ) df <- load_fb_big5_advanced_season_stats( season_end_year = 2022, stat_type = "defense", team_or_player = "player" ) })
try({ df <- load_fb_big5_advanced_season_stats( season_end_year = c(2018:2022), stat_type = "defense", team_or_player = "player" ) df <- load_fb_big5_advanced_season_stats( season_end_year = 2022, stat_type = "defense", team_or_player = "player" ) })
Loading version of fb_match_shooting
. Only some leagues available.
load_fb_match_shooting(country, gender, tier, season_end_year = NA)
load_fb_match_shooting(country, gender, tier, season_end_year = NA)
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 |
returns a dataframe
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 ) })
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 ) })
Loading version of fb_match_summary
. Only some leagues available.
load_fb_match_summary(country, gender, tier, season_end_year = NA)
load_fb_match_summary(country, gender, tier, season_end_year = NA)
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 |
returns a dataframe
try({ load_fb_match_summary( country = "ENG", gender = "M", tier = "1st" ) load_fb_match_summary( country = c("ITA", "ESP"), gender = "M", tier = "1st", season_end_year = 2019 ) })
try({ load_fb_match_summary( country = "ENG", gender = "M", tier = "1st" ) load_fb_match_summary( country = c("ITA", "ESP"), gender = "M", tier = "1st", season_end_year = 2019 ) })
Returns the game results for a competition(s), ie League cups or international competitions from FBref. comp_name comes from https://github.com/JaseZiv/worldfootballR_data/tree/master/data/match_results_cups#readme
load_match_comp_results(comp_name)
load_match_comp_results(comp_name)
comp_name |
the three character country code |
returns a dataframe with the results of the competition name
try({ df <- load_match_comp_results( comp_name = "Coppa Italia" ) # for multiple competitions: cups <- c("FIFA Women's World Cup", "FIFA World Cup") df <- load_match_comp_results( comp_name = cups ) })
try({ df <- load_match_comp_results( comp_name = "Coppa Italia" ) # for multiple competitions: cups <- c("FIFA Women's World Cup", "FIFA World Cup") df <- load_match_comp_results( comp_name = cups ) })
Loading version of get_match_results
Returns the game results for a given league season(s) from FBref
load_match_results(country, gender, season_end_year, tier)
load_match_results(country, gender, season_end_year, tier)
country |
the three character country code |
gender |
gender of competition, either "M" or "F" |
season_end_year |
the year(s) the season concludes |
tier |
the tier of the league, ie '1st' for the EPL or '2nd' for the Championship and so on |
returns a dataframe with the results of the competition, season and gender
try({ df <- load_match_results( country = c("ITA"), gender = "M", season_end_year = 2021, tier = "1st" ) # for results from English 1st div for men and women: df <- load_match_results( country = "ENG", gender = c("M", "F"), season_end_year = 2021, tier = "1st" ) })
try({ df <- load_match_results( country = c("ITA"), gender = "M", season_end_year = 2021, tier = "1st" ) # for results from English 1st div for men and women: df <- load_match_results( country = "ENG", gender = c("M", "F"), season_end_year = 2021, tier = "1st" ) })
Loading version of understat_league_season_shots
, but for all seasons
Returns shooting locations for all matches played in the selected league
load_understat_league_shots(league)
load_understat_league_shots(league)
league |
the available leagues in Understat as outlined below The leagues currently available for Understat are: "EPL", "La liga", "Bundesliga", "Serie A", "Ligue 1", "RFPL" |
returns a dataframe of shooting locations for a selected league
## Not run: try({ df <- load_understat_league_shots(league = "Serie A") }) ## End(Not run)
## Not run: try({ df <- load_understat_league_shots(league = "Serie A") }) ## End(Not run)
Returns data frame of players from the top 5 Euro leagues, their player URL and their respective Transfermarkt URL. Currently only for the players who have been in the top 5 leagues since the 2017-2018 season
player_dictionary_mapping()
player_dictionary_mapping()
returns a dataframe of FBref players and respective Transfermarkt URL
try({ mapped_players <- player_dictionary_mapping() })
try({ mapped_players <- player_dictionary_mapping() })
Returns data frame of player(s) transfer history from transfermarkt.com
player_transfer_history(player_urls)
player_transfer_history(player_urls)
player_urls |
the player url(s) from transfermarkt |
returns a dataframe of player transfers
Returns a data frame of players with expiring contracts for a selected league and time period
tm_expiring_contracts(country_name, contract_end_year, league_url = NA)
tm_expiring_contracts(country_name, contract_end_year, league_url = NA)
country_name |
the country of the league's players |
contract_end_year |
the year the contract is due to expire |
league_url |
league url from transfermarkt.com. To be used when country_name not available in main function |
returns a dataframe of expiring contracts in the selected league
Returns data frame of a player's absences from suspension from transfermarkt.com
tm_get_player_absence(player_urls)
tm_get_player_absence(player_urls)
player_urls |
player url(s) from transfermarkt |
returns a dataframe
## Not run: try({ player_urls <- c("https://www.transfermarkt.com/cristian-romero/profil/spieler/355915", "https://www.transfermarkt.com/micky-van-de-ven/profil/spieler/557459") df <- tm_get_player_absence(player_urls) }) ## End(Not run)
## Not run: try({ player_urls <- c("https://www.transfermarkt.com/cristian-romero/profil/spieler/355915", "https://www.transfermarkt.com/micky-van-de-ven/profil/spieler/557459") df <- tm_get_player_absence(player_urls) }) ## End(Not run)
Returns a data frame of debutants for a selected league
tm_league_debutants( country_name, league_url = NA, debut_type, debut_start_year, debut_end_year )
tm_league_debutants( country_name, league_url = NA, debut_type, debut_start_year, debut_end_year )
country_name |
the country of the league's players |
league_url |
league url from transfermarkt.com. To be used when country_name not available in main function |
debut_type |
whether you want 'league' debut or 'pro' debut |
debut_start_year |
the season start year of the beginning of the period you want results for |
debut_end_year |
the season start year of the end of the period you want results for |
returns a dataframe of players who debuted in the selected league
Returns a data frame of all currently injured players players for a selected league
tm_league_injuries(country_name, league_url = NA)
tm_league_injuries(country_name, league_url = NA)
country_name |
the country of the league's players |
league_url |
league url from transfermarkt.com. To be used when country_name not available in main function |
returns a dataframe of injured players in the selected league
Returns the URLs for all teams for a given league season
tm_league_team_urls(country_name, start_year, league_url = NA)
tm_league_team_urls(country_name, start_year, league_url = NA)
country_name |
the country of the league's players |
start_year |
the start year of the season (2020 for the 20/21 season) |
league_url |
league url from transfermarkt.com. To be used when country_name not available in main function |
returns a character vector of all transfermarkt team URLs for a selected league
Returns the league table for each chosen matchday from transfermarkt
tm_matchday_table(country_name, start_year, matchday, league_url = NA)
tm_matchday_table(country_name, start_year, matchday, league_url = NA)
country_name |
the country of the league's players |
start_year |
the start year of the season (2020 for the 20/21 season) |
matchday |
the matchweek number. Can be a vector of matchdays |
league_url |
league url from transfermarkt.com. To be used when country_name not available in main function |
returns a dataframe of the table for a selected league and matchday
## Not run: try({ tm_matchday_table(country_name="England", start_year="2020", matchday=1) tm_matchday_table(country_name="England", start_year="2020", matchday=c(1:5)) }) ## End(Not run)
## Not run: try({ tm_matchday_table(country_name="England", start_year="2020", matchday=1) tm_matchday_table(country_name="England", start_year="2020", matchday=c(1:5)) }) ## End(Not run)
Returns data frame of player bios from transfermarkt.com
tm_player_bio(player_urls)
tm_player_bio(player_urls)
player_urls |
player url(s) from transfermarkt |
returns a dataframe of player bios
## Not run: try({ player_url <- "https://www.transfermarkt.com/eden-hazard/profil/spieler/50202" tm_player_bio(player_url) tm_player_bio(player_urls = c("https://www.transfermarkt.com/eden-hazard/profil/spieler/50202", "https://www.transfermarkt.com/sergio-ramos/profil/spieler/25557", "https://www.transfermarkt.com/ivo-grbic/profil/spieler/226073")) }) ## End(Not run)
## Not run: try({ player_url <- "https://www.transfermarkt.com/eden-hazard/profil/spieler/50202" tm_player_bio(player_url) tm_player_bio(player_urls = c("https://www.transfermarkt.com/eden-hazard/profil/spieler/50202", "https://www.transfermarkt.com/sergio-ramos/profil/spieler/25557", "https://www.transfermarkt.com/ivo-grbic/profil/spieler/226073")) }) ## End(Not run)
Returns data frame of a player's injury history transfermarkt.com
tm_player_injury_history(player_urls)
tm_player_injury_history(player_urls)
player_urls |
player url(s) from transfermarkt |
returns a dataframe of player injury history
Returns data frame of player valuations (in Euros) from transfermarkt.com Replaces the deprecated function get_player_market_values
tm_player_market_values(country_name, start_year, league_url = NA)
tm_player_market_values(country_name, start_year, league_url = NA)
country_name |
the country of the league's players |
start_year |
the start year of the season (2020 for the 20/21 season) |
league_url |
league url from transfermarkt.com. To be used when country_name not available in main function |
returns a dataframe of player valuations for country/seasons
Returns data frame of player(s) transfer history from transfermarkt.com Replaces the deprecated function player_transfer_history
tm_player_transfer_history(player_urls, get_extra_info = TRUE)
tm_player_transfer_history(player_urls, get_extra_info = TRUE)
player_urls |
the player url(s) from transfermarkt |
get_extra_info |
allows users to decide if they want to scrape extra info (contract length, countries involved) or not |
returns a dataframe of player transfers
Returns basic stats for players of a team season
tm_squad_stats(team_url)
tm_squad_stats(team_url)
team_url |
transfermarkt.com team url for a season |
returns a dataframe of all player stats for team(s)
Returns all roles a selected staff member(s) has held and performance data
tm_staff_job_history(staff_urls)
tm_staff_job_history(staff_urls)
staff_urls |
transfermarkt.com staff(s) url (can use tm_league_staff_urls() to get) |
returns a data frame of all roles a selected staff member(s) has held and performance data
Returns the transfermarkt URLs for all players for a given team
tm_team_player_urls(team_url)
tm_team_player_urls(team_url)
team_url |
the player's team URL (can be from tm_league_team_urls()) |
returns a character vector of all transfermarkt player URLs for a selected team
Returns all people who have held the selected role in a team's history
tm_team_staff_history(team_urls, staff_role = "Manager")
tm_team_staff_history(team_urls, staff_role = "Manager")
team_urls |
transfermarkt.com team(s) url for a season |
staff_role |
the role description which can be found here: https://github.com/JaseZiv/worldfootballR_data/blob/master/raw-data/transfermarkt_staff/tm_staff_types.csv |
returns a data frame of all selected staff roles for a team(s) history
Returns the transfermarkt URLs for all staff of selected roles for a given team
tm_team_staff_urls(team_urls, staff_role)
tm_team_staff_urls(team_urls, staff_role)
team_urls |
the staff member's team URL (can be from tm_league_team_urls()) |
staff_role |
role of the staff member URLs required for with options including: "Manager", "Assistant Manager", "Goalkeeping Coach", "Fitness Coach", "Conditioning Coach" |
returns a character vector of all transfermarkt staff URLs for a selected team(s)
Returns all team's transfer aggregated performances for a chosen league season
tm_team_transfer_balances(country_name, start_year, league_url = NA)
tm_team_transfer_balances(country_name, start_year, league_url = NA)
country_name |
the country of the league's players |
start_year |
the start year of the season (2020 for the 20/21 season) |
league_url |
league url from transfermarkt.com. To be used when country_name not available in main function |
returns a dataframe of the summarised financial transfer performance of all teams for a league season
Returns all transfer arrivals and departures for a given team season
tm_team_transfers(team_url, transfer_window = "all")
tm_team_transfers(team_url, transfer_window = "all")
team_url |
transfermarkt.com team url for a season |
transfer_window |
which window the transfer occurred - options include "all" for both, "summer" or "winter" |
returns a dataframe of all team transfers
Returns all available team names for the selected leagues
understat_available_teams(leagues)
understat_available_teams(leagues)
leagues |
the available leagues in Understat as outlined below #' The leagues currently available for Understat are: "EPL", "La liga", "Bundesliga", "Serie A", "Ligue 1", "RFPL" #' @return a character vector teams names |
## Not run: try({ understat_available_teams(leagues = c('EPL', 'La liga')) }) ## End(Not run)
## Not run: try({ understat_available_teams(leagues = c('EPL', 'La liga')) }) ## End(Not run)
Returns match results for all matches played in the selected league season from Understat.com
understat_league_match_results(league, season_start_year)
understat_league_match_results(league, season_start_year)
league |
the available leagues in Understat as outlined below |
season_start_year |
the year the season started The leagues currently available for Understat are: "EPL", "La liga", "Bundesliga", "Serie A", "Ligue 1", "RFPL" |
returns a dataframe of match results for a selected league season
Returns shooting locations for all matches played in the selected league season from Understat.com
understat_league_season_shots(league, season_start_year)
understat_league_season_shots(league, season_start_year)
league |
the available leagues in Understat as outlined below |
season_start_year |
the year the season started The leagues currently available for Understat are: "EPL", "La liga", "Bundesliga", "Serie A", "Ligue 1", "RFPL" |
returns a dataframe of shooting locations for a selected league season
Returns player values for a selected match from Understat.com.
understat_match_players(match_url)
understat_match_players(match_url)
match_url |
A 'character' string with the URL of the match played. |
returns a 'data.frame' with data for all players for the match.
Returns shooting locations for a selected match from Understat.com
understat_match_shots(match_url)
understat_match_shots(match_url)
match_url |
the URL of the match played |
returns a dataframe of shooting locations for a selected team season
Returns the Stats values for a selected match from Understat.com.
understat_match_stats(match_url)
understat_match_stats(match_url)
match_url |
A 'character' string with the URL of the match played. |
For 'draw_chances', 'home_chances' and 'away_chances', values below 10
returns a 'data.frame' with data from the stats table for the match.
Returns shooting locations for a selected player for all matches played from Understat.com
understat_player_shots(player_url)
understat_player_shots(player_url)
player_url |
the URL of a selected player |
returns a dataframe of shooting locations for a selected player
Retrieve Understat team metadata, including team URLs. Similar to 'understatr::get_team_meta'.
understat_team_meta(team_names)
understat_team_meta(team_names)
team_names |
a vector of team names (can be just 1) |
a data.frame
## Not run: try({ understat_team_meta(team_name = c("Liverpool", "Manchester City")) }) ## End(Not run)
## Not run: try({ understat_team_meta(team_name = c("Liverpool", "Manchester City")) }) ## End(Not run)
Retrieve Understat team player stats.
understat_team_players_stats(team_url)
understat_team_players_stats(team_url)
team_url |
the URL of the team season |
a dataframe of player stats for a selected team season
Returns shooting locations for all matches played by a selected team from Understat.com
understat_team_season_shots(team_url)
understat_team_season_shots(team_url)
team_url |
the URL of the team season |
returns a dataframe of shooting locations for a selected team season
Returns a data frame for the selected team(s) with stats broken down in different ways. Breakdown groups include:
understat_team_stats_breakdown(team_urls)
understat_team_stats_breakdown(team_urls)
team_urls |
the url(s) of the teams in question |
"Situation", "Formation", "Game state", "Timing", "Shot zones", "Attack speed", "Result"
returns a dataframe of all stat groups and values