Skip to contents

MLB Award Recipients

Usage

mlb_awards_recipient(
  award_id = NULL,
  sport_id = NULL,
  league_id = NULL,
  season = NULL
)

Arguments

award_id

award_id to return a directory of players for a given award.

sport_id

sport_id to return a directory of players for a given aware in a specific sport.

league_id

league_id(s) to return a directory of players for a given award in a specific league. Format '103,104'

season

Year(s) to return a directory of players for a given award in a given season.

Value

Returns a tibble with the following columns

col_nametypes
award_idcharacter
award_namecharacter
datecharacter
seasoncharacter
votesinteger
notescharacter
player_idinteger
player_linkcharacter
player_name_first_lastcharacter
player_primary_position_codecharacter
player_primary_position_namecharacter
player_primary_position_typecharacter
player_primary_position_abbreviationcharacter
team_idinteger
team_linkcharacter

Examples

# \donttest{
  try(mlb_awards_recipient(award_id = 'MLBHOF', season = 2020))
#> ── MLB Awards Recipient data from MLB.com ─────────── baseballr 1.6.0 ──
#>  Data updated: 2024-04-13 21:56:02 UTC
#> # A tibble: 4 × 15
#>   award_id award_name   date    season votes notes player_id player_link
#>   <chr>    <chr>        <chr>   <chr>  <int> <chr>     <int> <chr>      
#> 1 MLBHOF   Hall Of Fame 2020-0… 2020      12 Mode…    692968 /api/v1/pe…
#> 2 MLBHOF   Hall Of Fame 2020-0… 2020      13 Mode…    122247 /api/v1/pe…
#> 3 MLBHOF   Hall Of Fame 2020-0… 2020     396 NA       116539 /api/v1/pe…
#> 4 MLBHOF   Hall Of Fame 2020-0… 2020     304 NA       123833 /api/v1/pe…
#> # ℹ 7 more variables: player_name_first_last <chr>,
#> #   player_primary_position_code <chr>,
#> #   player_primary_position_name <chr>,
#> #   player_primary_position_type <chr>,
#> #   player_primary_position_abbreviation <chr>, team_id <int>,
#> #   team_link <chr>
# }