Skip to content

Add national teams acquiring pipeline and dataset assets#353

Merged
dcaribou merged 6 commits into
masterfrom
add-national-teams-pipeline
Mar 21, 2026
Merged

Add national teams acquiring pipeline and dataset assets#353
dcaribou merged 6 commits into
masterfrom
add-national-teams-pipeline

Conversation

@dcaribou

Copy link
Copy Markdown
Owner

Summary

  • New tables: countries (200+ rows) and national_teams (200+ rows) with full dbt base + curated models and tests
  • New fields on players: international_caps, international_goals, current_national_team_id — populated from national team player scrapes
  • New competition type: national_team_competition in competitions — covers World Cup, UEFA Euro, Copa América, AFCON, AFC Asian Cup
  • New CI workflow: acquire-national-teams.yml — scheduled Tue/Fri at 06:00 UTC, jobs: countries → national_teams → national_team_players → dvc-push
  • ER diagram and README updated to reflect new tables and fields

Note: pyproject.toml currently points the transfermarkt-scraper dependency to branch add-countries-national-teams. This should be updated to main once transfermarkt-scraper#99 is merged.

Test plan

  • dbt build -s base_countries base_national_teams countries national_teams — 20/20 tests pass
  • dbt build -s base_players players — 11/11 tests pass (height regex fix for U+201A character, current_club_name tolerance raised to 15% for uncovered-league national team players)
  • dbt build -s base_games games club_games game_events game_lineups — 33/33 tests pass
  • 5,157 national team players scraped and merged into players dataset (9,586 total)
  • 135 national team competition games scraped for 2025 (AFCN: 52, AFAC: 51, COPA: 32)

🤖 Generated with Claude Code

dcaribou and others added 6 commits March 20, 2026 21:57
- Add countries, national_teams assets to the acquiring script and dbt pipeline
- Add national_team_players acquisition (reuses players crawler, merges into players.json.gz)
- Add 5 national team competitions (World Cup, UEFA Euro, Copa América, AFCON, AFC Asian Cup)
- Add international_caps, international_goals, current_national_team_id fields to players
- Add GitHub Actions workflow for scheduled national teams acquisition
- Update README with new tables and ER diagram

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…on.gz

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-2022

- Add data/tournament_editions.json with 5 WC editions (2006/2010/2014/2018/2022)
- Add acquire_tournament_games() to scraper script, driven by tournament_editions.json
- Add tournament_games asset to argparse choices
- Fix VARCHAR_CASTS for games: add home_club_position/away_club_position to prevent
  type mismatch when merging tournament (JSON-inferred) with league (VARCHAR) game data
- Add .github/workflows/acquire-tournament-games.yml (workflow_dispatch only)
- Update poetry.lock with latest transfermarkt-scraper from add-countries-national-teams

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ed stats

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Changes are now merged into main, no longer need the feature branch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dcaribou
dcaribou merged commit ddfe1ec into master Mar 21, 2026
3 checks passed
@dcaribou
dcaribou deleted the add-national-teams-pipeline branch March 21, 2026 10:36
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