Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

joining data frames with different player ID conventions #101

Open
bmacGTPM opened this issue Nov 28, 2022 · 2 comments
Open

joining data frames with different player ID conventions #101

bmacGTPM opened this issue Nov 28, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@bmacGTPM
Copy link

It seems like some data frames use ESPN player IDs, and some have NBA player IDs. Is there a table in the package that has both IDs and helps with joining these data frames? Here is an example:

#### Player list has PERSON_ID ####

p = nba_commonallplayers(
  is_only_current_season = 0,
  league_id = "00")
p=p$CommonAllPlayers
p %>% 
  filter(DISPLAY_FIRST_LAST=='LeBron James') %>% 
  as.data.frame() ## PERSON_ID 2544, no other ID columns


#### Player bio info has PERSON_ID ####

dd = nba_commonplayerinfo(league='00',player_id = 2544)
dd$CommonPlayerInfo %>% as.data.frame() ## PERSON_ID 2544, no other ID columns


#### Player box score has athlete_id ####

pbox = load_nba_player_box()
pbox %>% 
  filter(athlete_display_name=='LeBron James') %>%
  head(1) %>% 
  as.data.frame() ## athlete_id 1966, no PERSON_ID or other ID columns
@saiemgilani
Copy link
Collaborator

It would be really nice. Not yet, is your answer. But in the coming months? Possibly

@saiemgilani saiemgilani added the enhancement New feature or request label Nov 28, 2022
@saiemgilani
Copy link
Collaborator

Soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants