MLB Teams History
Arguments
- team_ids
The team_id(s) to return historical data for.
- start_season
The start_season to return historical data for from the given year to present.
- end_season
The end_season to return historical data for from the the creation to the given year.
Value
Returns a tibble with the following columns
col_name | types |
all_star_status | character |
team_id | integer |
team_full_name | character |
link | character |
season | integer |
team_code | character |
file_code | character |
team_abbreviation | character |
team_name | character |
location_name | character |
first_year_of_play | character |
short_name | character |
franchise_name | character |
club_name | character |
active | logical |
venue_id | integer |
venue_name | character |
venue_link | character |
spring_venue_id | integer |
spring_venue_link | character |
league_id | integer |
league_name | character |
league_link | character |
sport_id | integer |
sport_link | character |
sport_name | character |
Examples
# \donttest{
try(mlb_team_history(team_ids = 147))
#> ── MLB Team History data from MLB.com ─────────────── baseballr 1.2.0 ──
#> ℹ Data updated: 2022-04-30 07:16:43 UTC
#> # A tibble: 5 × 26
#> all_star_status team_id team_full_name link season team_code
#> <chr> <int> <chr> <chr> <int> <chr>
#> 1 N 147 New York Yankees /api/v1… 2009 nya
#> 2 N 147 New York Yankees /api/v1… 1974 nya
#> 3 N 147 New York Yankees /api/v1… 1923 nya
#> 4 N 147 New York Yankees /api/v1… 1913 nya
#> 5 N 147 New York Highlanders /api/v1… 1903 nya
#> # … with 20 more variables: file_code <chr>, team_abbreviation <chr>,
#> # team_name <chr>, location_name <chr>, first_year_of_play <chr>,
#> # short_name <chr>, franchise_name <chr>, club_name <chr>,
#> # active <lgl>, venue_id <int>, venue_name <chr>, venue_link <chr>,
#> # spring_venue_id <int>, spring_venue_link <chr>, league_id <int>,
#> # league_name <chr>, league_link <chr>, sport_id <int>,
#> # sport_link <chr>, sport_name <chr>
# }