Skip to content

Corrections in 2022/2023 draft trades#32

Open
robert-moore wants to merge 3 commits into
nflverse:masterfrom
robert-moore:fix/trades-csv-duplicates-wrong-picks
Open

Corrections in 2022/2023 draft trades#32
robert-moore wants to merge 3 commits into
nflverse:masterfrom
robert-moore:fix/trades-csv-duplicates-wrong-picks

Conversation

@robert-moore

@robert-moore robert-moore commented May 1, 2026

Copy link
Copy Markdown

Summary

Eight trades in data/trades.csv have incorrect pick_number values. All eight follow the same root cause: a trade that sent two picks from the same round, where the second pick's slot was recorded as a copy of the first instead of the correct value.

In five cases the rows had no pfr_id (anonymous pick rows), making the error less obvious. In three cases a player's pfr_id makes the correct slot identifiable by joining to load_draft_picks().

All eight corrections

trade_id Season Direction pfr_name Was Correct Verified against
1649 2022 PHI → HOU (no player) 166 168 PHI sent HOU 15, 124, 166, 168 for pick 13 (Jordan Davis)
1656 2022 GB → MIN (no player) 59 53 GB sent MIN 53 + 59 for pick 34
1660 2022 HOU → CLE (no player) 124 108 HOU sent CLE 68, 108, 124 for pick 44
1759 2023 DET → ARI (no player) 168 139 DET sent ARI 122, 139, 168 for pick 96
1773 2023 PHI → HOU (no player) 248 230 PHI sent HOU 230 + 248 for pick 191
1671 2022 LV → MIN Esezi Otomewo 169 165 Verified via load_draft_picks()
1674 2022 JAX → PHI Malcolm Rodriguez 198 188 Verified via load_draft_picks()
1681 2022 TB → LA Daniel Hardy 261 235 Verified via load_draft_picks()

To reproduce (Category 2 — player rows)

library(nflreadr)
library(dplyr)

trades <- load_trades() |> filter(trade_id %in% c(1671, 1674, 1681))
picks  <- load_draft_picks() |> select(pfr_player_id, season, pick, team)

trades |>
  filter(!is.na(pfr_id)) |>
  left_join(picks, by = c("pfr_id" = "pfr_player_id", "pick_season" = "season")) |>
  filter(!is.na(pick), pick != pick_number) |>
  select(trade_id, pfr_name, stored_pick = pick_number, actual_pick = pick, actual_team = team)

Five trades had exact-duplicate rows for the same pick slot (identical
trade_id/gave/received/pick_season/pick_number). Five duplicate rows removed:
- trade_id 1649: duplicate PHI→HOU pick 166
- trade_id 1656: duplicate GB→MIN pick 59
- trade_id 1660: duplicate HOU→CLE pick 124
- trade_id 1759: duplicate DET→ARI pick 168
- trade_id 1773: duplicate PHI→HOU pick 248

Three trades had a player (pfr_id) attached to the wrong pick slot — each
involved two picks from the same round where the second pick's number was
recorded as a copy of the first. Corrected pick_number values:
- trade_id 1671: Esezi Otomewo (OtomEs00) 169 → 165
- trade_id 1674: Malcolm Rodriguez (RodrMa00) 198 → 188
- trade_id 1681: Daniel Hardy (HardDa01) 261 → 235

All corrections verified against load_draft_picks() for the same season.
@robert-moore robert-moore marked this pull request as draft May 1, 2026 18:35
Trade 1649 (2022, PHI→HOU): the duplicate pick 166 row was actually a
second 5th-round pick — corrected to pick 168. PHI sent HOU picks 15,
124, 166, and 168 in exchange for pick 13 (Jordan Davis).

Trade 1773 (2023, PHI→HOU): the duplicate pick 248 row was actually a
second 7th-round pick — corrected to pick 230. PHI sent HOU picks 230
and 248 in exchange for pick 191.
All five originally labelled as 'pure duplicates' were actually a second
pick from the same round recorded with the wrong slot number — none should
have been deleted.

Trade 1656 (2022): GB gave MIN picks 53 + 59 for pick 34.
  Second 2nd-round pick corrected from 59 to 53.

Trade 1660 (2022): HOU gave CLE picks 68, 108, + 124 for pick 44.
  Second 4th-round pick corrected from 124 to 108.

Trade 1759 (2023): DET gave ARI picks 122, 139, + 168 for pick 96.
  Second 5th-round pick corrected from 168 to 139.
@robert-moore robert-moore changed the title Fix duplicate rows and wrong pick_numbers in 2022/2023 trades Corrections in 2022/2023 draft trades May 1, 2026
@robert-moore robert-moore marked this pull request as ready for review May 1, 2026 18:50
@tanho63 tanho63 requested a review from leesharpe May 6, 2026 00:15
@robert-moore

Copy link
Copy Markdown
Author

Hey @leesharpe would love to get this merged in

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant