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

playername_lookup(id)

Arguments

id

An integer or character string representing a player ID in a baseball database, cross-referenced through the Chadwick Bureau's public register of baseball players.

Value

A data frame of baseball players and the various IDs associated with them in different systems of record.

col_nametypes
name_firstcharacter
name_lastcharacter
name_givencharacter
name_suffixcharacter
name_nickcharacter
birth_yearinteger
mlb_played_firstinteger
key_mlbaminteger
key_retrocharacter
key_bbrefcharacter
key_fangraphsinteger

Examples

# \donttest{
  try(playername_lookup(4885))
#> ── Player Name Lookup from the Chadwick Bureau's public register of base
#>  Data updated: 2024-04-13 21:54:53 UTC
#> # A tibble: 1 × 11
#>   name_first name_last name_given  name_suffix name_nick  birth_year
#>   <chr>      <chr>     <chr>       <chr>       <chr>           <int>
#> 1 Nyjer      Morgan    Nyjer Jamid ""          Tony Plush       1980
#> # ℹ 5 more variables: mlb_played_first <int>, key_mlbam <int>,
#> #   key_retro <chr>, key_bbref <chr>, key_fangraphs <int>
  try(playername_lookup("kaaihki01"))
#> ── Player Name Lookup from the Chadwick Bureau's public register of base
#>  Data updated: 2024-04-13 21:54:57 UTC
#> # A tibble: 1 × 11
#>   name_first name_last name_given name_suffix name_nick birth_year
#>   <chr>      <chr>     <chr>      <chr>       <chr>          <int>
#> 1 Kila       Ka'aihue  Micah Kila ""          ""              1984
#> # ℹ 5 more variables: mlb_played_first <int>, key_mlbam <int>,
#> #   key_retro <chr>, key_bbref <chr>, key_fangraphs <int>
# }