Skip to content

data: refresh UFC datasets through 2026-06-27 - #11

Merged
komaksym merged 1 commit into
mainfrom
data-refresh-2026-07-10
Jul 10, 2026
Merged

data: refresh UFC datasets through 2026-06-27#11
komaksym merged 1 commit into
mainfrom
data-refresh-2026-07-10

Conversation

@komaksym

@komaksym komaksym commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Refresh UFCStats fight data from the previous cutoff of 2026-03-28 through 2026-06-27.
  • Add 146 fights across 12 completed UFC events.
  • Increase stats_raw.csv to 8,737 fights.
  • Refresh UFCStats profiles for all 286 fighters appearing in the newly added bouts.
  • Rebuild the decisive-only and all-bouts processed datasets.
  • Rebuild the stats-plus-scorecards table while preserving all existing scorecard values.
  • Add a rematch-safe incremental merge utility plus a regression test for the two Sakuraba vs. Silveira bouts at UFC Ultimate Japan.

Updated files

  • data/external_data/raw_fighter_details.csv
  • data/stats/stats_raw.csv
  • data/stats/stats_processed.csv
  • data/stats/stats_processed_all_bouts.csv
  • data/merged_stats_n_scorecards/merged_stats_n_scorecards.csv
  • src/data_processing/stats_update.py
  • tests/data_processing/test_stats_update.py

Validation

  • The branch is one commit ahead of main and changes only the seven files listed above.
  • Exactly 146 net-new fight rows were added; no historical fight identities were removed.
  • No historical raw fight values changed.
  • The same-event Sakuraba vs. Silveira no-contest and rematch are both preserved.
  • No newly added processed row is missing an entire fighter feature block.
  • Existing scorecard values are unchanged.
  • Both processed datasets reproduce exactly from the committed raw stats and fighter-profile inputs.
  • Data-processing test suite: 6 passed.

Scorecard note

Scorecards for the newly added fights were not scraped and OCR-processed in this refresh, so their scorecard-total fields remain empty. Existing scorecard values were preserved exactly.

Breaking changes

None.

@komaksym komaksym closed this Jul 10, 2026
@komaksym komaksym reopened this Jul 10, 2026
@komaksym komaksym changed the title data: refresh UFC datasets through latest completed event data: refresh UFC datasets through 2026-06-27 Jul 10, 2026
@komaksym
komaksym marked this pull request as ready for review July 10, 2026 10:14
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@komaksym komaksym closed this Jul 10, 2026
@komaksym komaksym reopened this Jul 10, 2026
@komaksym komaksym closed this Jul 10, 2026
@komaksym komaksym reopened this Jul 10, 2026
@komaksym komaksym closed this Jul 10, 2026
@komaksym komaksym reopened this Jul 10, 2026
@komaksym komaksym closed this Jul 10, 2026
@komaksym komaksym reopened this Jul 10, 2026

@komaksym komaksym left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review verdict: changes required before merge.

  1. The deduplication removes a legitimate historical bout.

The base raw dataset contains two distinct Kazushi Sakuraba vs. Marcus Silveira bouts at UFC - Ultimate Japan on 21/12/1997: the first was recorded as no_contest / Overturned, and the rematch was red_win / Submission. The refresh deduplicates on only (red_fighter_name, blue_fighter_name, event_date, event_name), so it collapses those two real fights into one. This is why the scrape adds 146 new identity keys but stats_raw.csv grows by only 145 rows.

Please restore both bouts and use a true bout identifier—preferably the UFCStats fight-detail ID/URL. If that is unavailable, the identity must include a bout discriminator such as method, round, time, or an explicit occurrence index. Fighter pair + event + date is not unique.

  1. The refreshed processed datasets are largely missing fighter features.

For the 146 new fights, only 19 rows have the full static fighter-feature block populated for both fighters. In 121 rows, at least one fighter has the entire height/reach/stance/career-stat block missing; in 62 rows, both fighters are entirely missing that block. Consequently, most new rows in stats_processed.csv have blank stance and blank height/reach/career-stat delta features.

Please refresh data/external_data/raw_fighter_details.csv (or the equivalent fighter-details source) before rebuilding stats_processed_all_bouts.csv and stats_processed.csv. Otherwise these files should not be presented as fully refreshed analytical outputs.

What passed the audit:

  • all four schemas are unchanged;
  • 146 genuinely new bout identities across 12 events were added;
  • no other historical raw fight values changed;
  • existing scorecard values were preserved exactly;
  • output cardinalities are internally consistent;
  • both processed files reproduce exactly from the currently committed raw and fighter-details inputs.

@komaksym komaksym closed this Jul 10, 2026
@komaksym komaksym reopened this Jul 10, 2026
@komaksym komaksym closed this Jul 10, 2026
@komaksym komaksym reopened this Jul 10, 2026
@github-actions
github-actions Bot force-pushed the data-refresh-2026-07-10 branch from 1e211bd to cfa0014 Compare July 10, 2026 11:53
@komaksym komaksym closed this Jul 10, 2026
@komaksym komaksym reopened this Jul 10, 2026
@github-actions
github-actions Bot force-pushed the data-refresh-2026-07-10 branch from cfa0014 to 86d4b04 Compare July 10, 2026 12:00
@komaksym komaksym closed this Jul 10, 2026
@komaksym komaksym reopened this Jul 10, 2026
@komaksym komaksym closed this Jul 10, 2026
@komaksym komaksym reopened this Jul 10, 2026

Copy link
Copy Markdown
Owner Author

AI-generated response: The earlier review comment on this PR was produced by ChatGPT acting on Maksym's behalf. Future comments I post on this PR will be explicitly labeled as AI-generated.

@github-actions
github-actions Bot force-pushed the data-refresh-2026-07-10 branch from 86d4b04 to 8524e13 Compare July 10, 2026 12:14

@komaksym komaksym left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI-generated response: Final re-review completed on the cleaned, one-commit branch.

No remaining blocking findings.

Verified:

  • exactly 146 new fights across 12 events, through 2026-06-27;
  • raw dataset contains 8,737 fights;
  • no historical raw fight rows or values were removed or changed;
  • both same-event Sakuraba vs. Silveira bouts are preserved;
  • all 286 fighters appearing in the new bouts have profile rows;
  • no new processed row is missing an entire fighter-feature block;
  • existing scorecard values are unchanged;
  • processed outputs are exactly reproducible from the committed inputs;
  • data-processing tests pass: 6 passed;
  • branch is one commit ahead of main and changes only the seven documented files.

Known, documented limitation: scorecards for newly added fights were not scraped/OCR-processed, so those new scorecard fields remain empty.

PR #11 is ready for human review. It has not been merged.

@komaksym
komaksym merged commit 3268146 into main Jul 10, 2026
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