Skip to content

[Data Bug] db_playerids: four espn_id and three pfr_id values are each shared by two different players #84

Description

@f0rthelulz

Describe the data bug

In files/db_playerids.csv, four espn_id values and three pfr_id values are each attached to two different players (different mfl_id, different name, different birthdate). Same family as #75 / #54 / #42, but on espn_id and pfr_id rather than gsis_id / fantasy_data_id, so I don't think it's covered by those.

Which file is having trouble?

db_playerids.csv, via nflreadpy.load_ff_playerids() (0.1.5, 12,484 rows, pulled 2026-09-01). Reproduces in R:

library(nflreadr); library(dplyr)
ffids <- load_ff_playerids()

ffids |> filter(!is.na(espn_id), !is.na(gsis_id)) |>
  count(espn_id) |> filter(n > 1)          # 4 rows

ffids |> filter(!is.na(pfr_id), !is.na(gsis_id)) |>
  group_by(pfr_id) |> filter(n_distinct(gsis_id) > 1)   # 3 pfr_ids, 6 rows

espn_id shared by two players

espn_id mfl_id name pos born gsis_id pfr_id
16094 11450 Steven Miller RB 1991-03-23 00-0029885 MillSt00
16094 11797 Marqueston Huff S 1992-04-06 00-0031059 MillSt00
2516049 12448 Quinton Dunbar CB 1992-07-22 00-0032007 DunbQu00
2516049 12500 Houston Bates LB 1991-12-20 00-0032181 BateHo00
2574010 12353 Aaron Ripkowski RB 1992-12-20 00-0031612 HarrAl00
2574010 12440 Alonzo Harris RB 1992-11-09 00-0031830 HarrAl00
2582138 12816 David Morgan TE 1993-05-19 00-0032430 CartKy01
2582138 12683 Kyle Carter TE 1992-12-17 00-0032606 CartKy01

I can't tell which side of each espn_id pair is correct without an ESPN lookup, so I haven't guessed.

pfr_id shared by two players — and here the id says which one is wrong

Three of the four pairs above also share a pfr_id, and since PFR ids encode the player's own name (Last4First2NN), the incorrect row is identifiable in each case:

pfr_id belongs to also (incorrectly) attached to
MillSt00 Steven Miller (mfl 11450) Marqueston Huff (mfl 11797) — should be HuffMa00
HarrAl00 Alonzo Harris (mfl 12440) Aaron Ripkowski (mfl 12353) — should be RipkAa00
CartKy01 Kyle Carter (mfl 12683) David Morgan (mfl 12816)

Expected data

espn_id and pfr_id unique per player where present, as the other id columns are.

Why it matters downstream

Anything building an id crosswalk as a map keyed on espn_id or pfr_id silently keeps whichever row it read last, so a player's data can be attributed to the other player in the pair. All seven pairs here are 2013–16-era players, so the practical impact is small today — I found them because a duplicate-detection check fired, not because anything broke.

Happy to open a PR against files/ if a correction list in the usual format would help.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions