Acquire game context metrics for Major and Minor League games
Source:R/mlb_game_context_metrics.R
mlb_game_context_metrics.Rd
Acquire game context metrics for Major and Minor League games
Arguments
- game_pk
The game_pk for the game requested
- timecode
The time code for the MLB game (format: MMDDYYYY_HHMMSS)
Value
Returns a tibble that includes time codes from the game_pk requested
col_name | types |
game_pk | integer |
link | character |
game_type | character |
season | character |
game_date | character |
official_date | character |
status_abstract_game_state | character |
status_coded_game_state | character |
status_detailed_state | character |
status_status_code | character |
status_start_time_tbd | logical |
status_abstract_game_code | character |
teams_away_league_record_wins | integer |
teams_away_league_record_losses | integer |
teams_away_league_record_pct | character |
teams_away_score | integer |
teams_away_team_id | integer |
teams_away_team_name | character |
teams_away_team_link | character |
teams_away_is_winner | logical |
teams_away_probable_pitcher_id | integer |
teams_away_probable_pitcher_full_name | character |
teams_away_probable_pitcher_link | character |
teams_away_split_squad | logical |
teams_away_series_number | integer |
teams_home_league_record_wins | integer |
teams_home_league_record_losses | integer |
teams_home_league_record_pct | character |
teams_home_score | integer |
teams_home_team_id | integer |
teams_home_team_name | character |
teams_home_team_link | character |
teams_home_is_winner | logical |
teams_home_probable_pitcher_id | integer |
teams_home_probable_pitcher_full_name | character |
teams_home_probable_pitcher_link | character |
teams_home_split_squad | logical |
teams_home_series_number | integer |
venue_id | integer |
venue_name | character |
venue_link | character |
link_1 | character |
is_tie | logical |
game_number | integer |
public_facing | logical |
double_header | character |
gameday_type | character |
tiebreaker | character |
calendar_event_id | character |
season_display | character |
day_night | character |
scheduled_innings | integer |
reverse_home_away_status | logical |
inning_break_length | integer |
games_in_series | integer |
series_game_number | integer |
series_description | character |
record_source | character |
if_necessary | character |
if_necessary_description | character |
game_id | character |
home_win_probability | numeric |
away_win_probability | numeric |
Examples
# \donttest{
try(mlb_game_context_metrics(game_pk = 531060, timecode = "20180803_182458"))
#> ── MLB Game Context Metrics data from MLB.com ─────── baseballr 1.6.0 ──
#> ℹ Data updated: 2024-04-13 21:56:14 UTC
#> # A tibble: 1 × 64
#> game_pk game_guid link game_type season game_date official_date
#> <int> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 531060 053ddbf2-26e1-… /api… R 2018 2018-08-… 2018-08-03
#> # ℹ 57 more variables: status_abstract_game_state <chr>,
#> # status_coded_game_state <chr>, status_detailed_state <chr>,
#> # status_status_code <chr>, status_start_time_tbd <lgl>,
#> # status_abstract_game_code <chr>,
#> # teams_away_league_record_wins <int>,
#> # teams_away_league_record_losses <int>,
#> # teams_away_league_record_pct <chr>, teams_away_score <int>, …
# }