Skip to contents

Find Biographical Information for MLB Players

Usage

mlb_people(person_ids = NULL)

Arguments

person_ids

MLBAMIDs for players of interest. Multiple IDs should be provided in a vector separated by a comma.

Value

Returns a tibble with the following columns:

col_nametypes
idinteger
full_namecharacter
linkcharacter
first_namecharacter
last_namecharacter
primary_numbercharacter
birth_datecharacter
current_ageinteger
birth_citycharacter
birth_state_provincecharacter
birth_countrycharacter
heightcharacter
weightinteger
activelogical
use_namecharacter
middle_namecharacter
boxscore_namecharacter
nick_namecharacter
gendercharacter
is_playerlogical
is_verifiedlogical
draft_yearinteger
mlb_debut_datecharacter
name_first_lastcharacter
name_slugcharacter
first_last_namecharacter
last_first_namecharacter
last_init_namecharacter
init_last_namecharacter
full_fml_namecharacter
full_lfm_namecharacter
strike_zone_topnumeric
strike_zone_bottomnumeric
pronunciationcharacter
primary_position_codecharacter
primary_position_namecharacter
primary_position_typecharacter
primary_position_abbreviationcharacter
bat_side_codecharacter
bat_side_descriptioncharacter
pitch_hand_codecharacter
pitch_hand_descriptioncharacter

Examples

# \donttest{
  try(mlb_people(person_ids = 502671))
#> ── MLB People data from MLB.com ───────────────────── baseballr 1.2.0 ──
#>  Data updated: 2022-04-30 07:16:21 UTC
#> # A tibble: 1 × 41
#>       id full_name  link  first_name last_name primary_number birth_date
#>    <int> <chr>      <chr> <chr>      <chr>     <chr>          <chr>     
#> 1 502671 Paul Gold… /api… Paul       Goldschm… 46             1987-09-10
#> # … with 34 more variables: current_age <int>, birth_city <chr>,
#> #   birth_state_province <chr>, birth_country <chr>, height <chr>,
#> #   weight <int>, active <lgl>, use_name <chr>, middle_name <chr>,
#> #   boxscore_name <chr>, nick_name <chr>, gender <chr>,
#> #   is_player <lgl>, is_verified <lgl>, draft_year <int>,
#> #   mlb_debut_date <chr>, name_first_last <chr>, name_slug <chr>,
#> #   first_last_name <chr>, last_first_name <chr>, …
  try(mlb_people(person_ids = c(502671,605151)))
#> ── MLB People data from MLB.com ───────────────────── baseballr 1.2.0 ──
#>  Data updated: 2022-04-30 07:16:21 UTC
#> # A tibble: 2 × 42
#>       id full_name  link  first_name last_name primary_number birth_date
#>    <int> <chr>      <chr> <chr>      <chr>     <chr>          <chr>     
#> 1 502671 Paul Gold… /api… Paul       Goldschm… 46             1987-09-10
#> 2 605151 Archie Br… /api… Archie     Bradley   23             1992-08-10
#> # … with 35 more variables: current_age <int>, birth_city <chr>,
#> #   birth_state_province <chr>, birth_country <chr>, height <chr>,
#> #   weight <int>, active <lgl>, use_name <chr>, middle_name <chr>,
#> #   boxscore_name <chr>, nick_name <chr>, gender <chr>,
#> #   is_player <lgl>, is_verified <lgl>, draft_year <int>,
#> #   mlb_debut_date <chr>, name_first_last <chr>, name_slug <chr>,
#> #   first_last_name <chr>, last_first_name <chr>, …
# }