Skip to contents

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.

Usage

playerid_lookup(last_name = NULL, first_name = NULL)

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_nametypes
first_namecharacter
last_namecharacter
given_namecharacter
name_suffixcharacter
nick_namecharacter
birth_yearinteger
mlb_played_firstinteger
mlbam_idinteger
retrosheet_idcharacter
bbref_idcharacter
fangraphs_idinteger

Examples

# \donttest{
  try(playerid_lookup("Garcia", "Karim"))
#> ── Player ID Lookup from the Chadwick Bureau's public register of baseba
#>  Data updated: 2022-04-30 07:14:55 UTC
#> # A tibble: 1 × 11
#>   first_name last_name given_name    name_suffix nick_name birth_year
#>   <chr>      <chr>     <chr>         <chr>       <chr>          <int>
#> 1 Karim      Garcia    Gustavo Karim ""          ""              1975
#> # … with 5 more variables: mlb_played_first <int>, mlbam_id <int>,
#> #   retrosheet_id <chr>, bbref_id <chr>, fangraphs_id <int>
# }