Skip to contents

Retrieve additional game information for major and minor league games

Usage

mlb_game_info(game_pk)

Arguments

game_pk

The unique game_pk identifier for the game

Value

Returns a tibble that includes supplemental information, such as weather, official scorer, attendance, etc., for the game_pk provided

col_nametypes
game_datecharacter
game_pknumeric
venue_namecharacter
venue_idinteger
temperaturecharacter
other_weathercharacter
windcharacter
attendancecharacter
start_timecharacter
elapsed_timecharacter
game_idcharacter
game_typecharacter
home_sport_codecharacter
official_scorercharacter
datecharacter
status_indcharacter
home_league_idinteger
gameday_swcharacter

Examples

# \donttest{
  try(mlb_game_info(game_pk = 566001))
#> ── MLB Game Info data from MLB.com ────────────────── baseballr 1.2.0 ──
#>  Data updated: 2022-04-30 07:15:57 UTC
#> # A tibble: 1 × 18
#>   game_date  game_pk venue_name venue_id temperature other_weather wind 
#>   <chr>        <dbl> <chr>         <int> <chr>       <chr>         <chr>
#> 1 2019-04-29  566001 Citi Field     3289 51          Cloudy        10 m…
#> # … with 11 more variables: attendance <chr>, start_time <chr>,
#> #   elapsed_time <chr>, game_id <chr>, game_type <chr>,
#> #   home_sport_code <chr>, official_scorer <chr>, date <chr>,
#> #   status_ind <chr>, home_league_id <int>, gameday_sw <chr>
# }