
Look up Baseball Player IDs by Player Name
Source:R/chadwick_playerid_lookup.R
chadwick_player_id_lu.Rd
This function allows you to query the Chadwick Bureau's public register of baseball players and the various IDs associated with them in different systems of record.
Arguments
- last_name
A text string used to return results for players with that string in their last name.
- first_name
A text string used to return results for players with that string in their first name.
Value
A data frame of baseball players and the various IDs associated with them in different systems of record.
col_name | types |
first_name | character |
last_name | character |
given_name | character |
name_suffix | character |
nick_name | character |
birth_year | integer |
mlb_played_first | integer |
mlbam_id | integer |
retrosheet_id | character |
bbref_id | character |
fangraphs_id | integer |
Examples
# \donttest{
try(playerid_lookup("Garcia", "Karim"))
#> ── Player ID Lookup from the Chadwick Bureau's public register of baseba
#> ℹ Data updated: 2022-12-29 00:07:11 UTC
#> # A tibble: 1 × 11
#> first_name last_name given_n…¹ name_…² nick_…³ birth…⁴ mlb_p…⁵ mlbam…⁶
#> <chr> <chr> <chr> <chr> <chr> <int> <int> <int>
#> 1 Karim Garcia Gustavo … "" "" 1975 1995 114588
#> # … with 3 more variables: retrosheet_id <chr>, bbref_id <chr>,
#> # fangraphs_id <int>, and abbreviated variable names ¹given_name,
#> # ²name_suffix, ³nick_name, ⁴birth_year, ⁵mlb_played_first, ⁶mlbam_id
# }