View source: R/mlb_team_leaders.R
| mlb_team_leaders | R Documentation |
MLB Team Leaders
mlb_team_leaders(
team_id = NULL,
leader_categories = NULL,
leader_game_types = NULL,
season = NULL,
limit = 1000
)
team_id |
Team ID to return team leader information for. |
leader_categories |
Team leader category to return information and ranking for a particular statistic. |
leader_game_types |
Game type to return information and ranking for a particular statistic in a particular game type. |
season |
Season to return team leader information for. |
limit |
A limit to limit return to a particular number of records. |
Returns a tibble with the following columns
| col_name | types | description |
| leader_category | character | Team leader category (e.g., homeRuns). |
| rank | integer | Rank within the team leaderboard. |
| value | character | Statistic value for the leader. |
| season | character | Season year. |
| team_id | integer | Team MLBAM ID. |
| team_name | character | Team name. |
| team_link | character | API link to the team. |
| league_id | integer | League MLBAM ID. |
| league_name | character | League name. |
| league_link | character | API link to the league. |
| person_id | integer | Player MLBAM ID. |
| person_full_name | character | Player full name. |
| person_link | character | API link to the player. |
| person_first_name | character | Player first name. |
| person_last_name | character | Player last name. |
| sport_id | integer | Sport MLBAM ID. |
| sport_link | character | API link to the sport. |
| sport_abbreviation | character | Sport abbreviation (e.g., MLB). |
| stat_group | character | Stat group (e.g., hitting). |
| total_splits | integer | Total number of splits in the leaderboard. |
| game_type_id | character | Game type code (e.g., R for regular season). |
| game_type_description | character | Game type description. |
try(mlb_team_leaders(team_id = 137, leader_categories = "homeRuns", season = 2021))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.