Skip to contents

Find MLB Seasons

Usage

mlb_seasons(sport_id = 1, with_game_type_dates = TRUE)

Arguments

sport_id

The sport_id to return season information for.

with_game_type_dates

with_game_type_dates to return season information

Value

Returns a tibble with the following columns:

col_nametypes
season_idcharacter
has_wildcardlogical
pre_season_start_datecharacter
pre_season_end_datecharacter
season_start_datecharacter
spring_start_datecharacter
spring_end_datecharacter
regular_season_start_datecharacter
last_date1st_halfcharacter
all_star_datecharacter
first_date2nd_halfcharacter
regular_season_end_datecharacter
post_season_start_datecharacter
post_season_end_datecharacter
season_end_datecharacter
offseason_start_datecharacter
off_season_end_datecharacter
season_level_gameday_typecharacter
game_level_gameday_typecharacter
qualifier_plate_appearancesnumeric
qualifier_outs_pitchedinteger

Examples

# \donttest{
 try(mlb_seasons(sport_id = 1))
#> ── MLB Seasons data from MLB.com ──────────────────── baseballr 1.6.0 ──
#>  Data updated: 2024-04-13 21:56:45 UTC
#> # A tibble: 1 × 21
#>   season_id has_wildcard pre_season_start_date pre_season_end_date
#>   <chr>     <lgl>        <chr>                 <chr>              
#> 1 2024      TRUE         2024-01-01            2024-02-21         
#> # ℹ 17 more variables: season_start_date <chr>,
#> #   spring_start_date <chr>, spring_end_date <chr>,
#> #   regular_season_start_date <chr>, last_date1st_half <chr>,
#> #   all_star_date <chr>, first_date2nd_half <chr>,
#> #   regular_season_end_date <chr>, post_season_start_date <chr>,
#> #   post_season_end_date <chr>, season_end_date <chr>,
#> #   offseason_start_date <chr>, off_season_end_date <chr>, …
# }