data icon indicating copy to clipboard operation
data copied to clipboard

Nick Williams & Randy Gregory espn_id contradiction

Open TheMathNinja opened this issue 4 years ago • 3 comments

I think the Randy Gregory and Nick Williams espn_id variables might be wrong in dp_playerids(). I'm working on updating the espn_id and using the ffespn package, the only IDs that aren't matching are these two players. Not sure which is right/wrong.

remotes::install_github("dfs-with-r/ffespn")
remotes::install_github("ffverse/ffscrapr", ref = "dev")
remotes::install_github("nflverse/nflreadr")

library(tidyverse)
library(ffespn)
library(ffscrapr)
library(nflreadr)

espn_list <- bind_rows(ffespn_projections(2021, 0, "QB") %>% select(-notes),
                       ffespn_projections(2021, 0, "RB") %>% select(-notes),
                       ffespn_projections(2021, 0, "WR") %>% select(-notes),
                       ffespn_projections(2021, 0, "TE") %>% select(-notes),
                       ffespn_projections(2021, 0, "K") %>% select(-notes),
                       ffespn_projections(2021, 0, "P") %>% select(-notes),
                       ffespn_projections(2021, 0, "DT") %>% select(-notes),
                       ffespn_projections(2021, 0, "DE") %>% select(-notes),
                       ffespn_projections(2021, 0, "LB") %>% select(-notes),
                       ffespn_projections(2021, 0, "CB") %>% select(-notes),
                       ffespn_projections(2021, 0, "S") %>% select(-notes)
) %>%
  select(new_espn_id = id,
         name = player,
         team) %>%
  mutate(name = clean_player_names(name),
         team = clean_team_abbrs(team))

updated_playerids <- dp_playerids() %>%
  mutate(name = clean_player_names(name),
         team = clean_team_abbrs(team)) %>%
  left_join(.,
            espn_list,
                   by = c("name", "team")
  )

espn_match <- updated_playerids %>%
  select(name,
         team,
         position,
         espn_id,
         new_espn_id)
view(espn_match)

check <- espn_match %>%
  filter(!is.na(espn_id) & !is.na(new_espn_id) & espn_id != new_espn_id)

view(check)

TheMathNinja avatar Sep 18 '21 17:09 TheMathNinja

Just noticed this issue. Got IDs in question? easier for me to poke at

tanho63 avatar Sep 27 '21 17:09 tanho63

Your df is showing Randy Gregory: 3895806 Nick Williams: 15882

Mine was showing Randy Gregory: 3040479 Nick Williams: 2317118

TheMathNinja avatar Sep 27 '21 18:09 TheMathNinja

Hmm. It looks like these guys have two separate profiles: RG https://www.espn.com/nfl/player/stats//id/3895806 https://www.espn.com/nfl/player/stats//id/3040479

NW https://www.espn.com/nfl/player/stats//id/15882 https://www.espn.com/nfl/player/stats//id/2317118

Probably should be corrected via missing_ids.csv again

Tan Ho

On Mon, Sep 27, 2021 at 2:57 PM Mike Filicicchia @.***> wrote:

Your df is showing Randy Gregory: 3895806 Nick Williams: 15882

Mine was showing Randy Gregory: 3040479 Nick Williams: 2317118

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dynastyprocess/data/issues/28#issuecomment-928180440, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJCRZ32DEVRMNSLYBKEACX3UEC5BPANCNFSM5EJMEE6A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

tanho63 avatar Sep 27 '21 20:09 tanho63

This has been fixed via my reports to MFL API.

TheMathNinja avatar Sep 14 '24 04:09 TheMathNinja