{"repo":"dcaribou/transfermarkt-datasets","free":true,"listed":false,"github":"https://github.com/dcaribou/transfermarkt-datasets","clone":"git clone https://github.com/dcaribou/transfermarkt-datasets.git","description":"⚽️ Extract, prepare and publish Transfermarkt datasets.","language":"Python","stars":472,"topics":["analytics","dataset","dbt","football","football-data","soccer-analytics"],"license":"CC0-1.0","category":"sports_data","readme_excerpt":"![Build Status](https://github.com/dcaribou/transfermarkt-datasets/actions/workflows/build.yml/badge.svg)\n![Scraper Pipeline Status](https://github.com/dcaribou/transfermarkt-datasets/actions/workflows/acquire-transfermarkt-scraper.yml/badge.svg)\n![API Pipeline Status](https://github.com/dcaribou/transfermarkt-datasets/actions/workflows/acquire-transfermarkt-api.yml/badge.svg)\n![dbt Version](https://img.shields.io/static/v1?logo=dbt&label=dbt-version&message=1.11.5&color=orange)\n\n# transfermarkt-datasets\n\nClean, structured and **automatically updated** football (soccer) dataset built from [Transfermarkt](https://www.transfermarkt.co.uk/) data -- 79,000+ games, 37,000+ players, 1,800,000+ appearances and more, refreshed weekly.\n\n> [!IMPORTANT]\n> ⚽ **World Cup 2026 data is live — updated as the tournament plays out.**\n>\n> Group stage results and player appearances for all 48 nations are already in the dataset. Query them right now:\n>\n> ```sql\n> -- Who scored in Brazil's last group game?\n> SELECT player_name, goals\n> FROM appearances\n> JOIN games USING (game_id)\n> WHERE competition_id = 'FIWC'\n>   AND (home_club_name = 'Brazil' OR away_club_name = 'Brazil')\n>   AND goals > 0\n> ORDER BY date DESC;\n> -- Vinicius Junior  2\n> -- Matheus Cunha    1\n> ```\n>\n> The dataset covers all major national team tournaments (🏆 World Cup, UEFA Euro, Copa América, AFCON, AFC Asian Cup) plus `international_caps`, `international_goals`, and `current_national_team_id` on every player profile.\n\n## What's in it\n\nThe dataset is composed of **12 tables** covering competitions, games, clubs, players, appearances, player valuations, club games, game events, game lineups, transfers, countries and national teams. Each table contains the attributes of the entity and IDs that can be used to join them together.\n\n| Table | Description | Scale |\n| --- | --- | --- |\n| `competitions` | Leagues, tournaments and national team competitions | 40+ |\n| `clubs` | Club details, squad size, market value | 400+ |\n| `players` | Player profiles, positions, market values, international caps | 37,000+ |\n| `games` | Match results, lineups, attendance | 79,000+ |\n| `appearances` | One row per player per game played | 1,800,000+ |\n| `player_valuations` | Historical market value records | 500,000+ |\n| `club_games` | Per-club view of each game | 150,000+ |\n| `game_events` | Goals, cards, substitutions | 1,100,000+ |\n| `game_lineups` | Starting and bench lineups | 2,800,000+ |\n| `transfers` | Player transfers between clubs | 87,000+ |\n| `countries` | Country details and confederation membership | 100+ |\n| `national_teams` | National team profiles, squad size, FIFA ranking | 100+ |\n\n<a href=\"https://pub-e682421888d945d684bcae8890b0ec20.r2.dev/data/transfermarkt-datasets.zip\"><img src=\"https://img.shields.io/badge/-Download%20Dataset-brightgreen?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJ3aGl0ZSI+PHBhdGggZD0iTTEyIDNhMSAxIDAgMCAxIDEgMXY5LjU5bDIuMy0yLjNhMSAxIDAgMSAxIDEuNDEgMS40MmwtNCA0YTEgMSAwIDAgMS0xLjQyIDBsLTQtNGExIDEgMCAxIDEgMS40Mi0xLjQybDIuMyAyLjNWNGExIDEgMCAwIDEgMS0xem0tNyAxNGEyIDIgMCAwIDAtMiAydjFhMiAyIDAgMCAwIDIgMmgxNGEyIDIgMCAwIDAgMi0ydi0xYTIgMiAwIDAgMC0yLTJINXoiLz48L3N2Zz4=\" alt=\"Download Dataset\" height=\"28\"></a>\n<a href=\"https://codespaces.new/dcaribou/transfermarkt-datasets/tree/master?quickstart=1\"><img src=\"https://github.com/codespaces/badge.svg\" alt=\"Open in GitHub Codespaces\" height=\"28\"></a>\n<a href=\"https://www.kaggle.com/datasets/davidcariboo/player-scores\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" alt=\"Kaggle\" height=\"28\"></a>\n\n<details>\n<summary><strong>ER diagram</strong></summary>\n\n```mermaid\nclassDiagram\ndirection LR\ncompetitions --|> games : competition_id\ncompetitions --|> clubs : domestic_competition_id\nclubs --|> players : current_club_id\nclubs --|> club_games : opponent/club_id\nclubs --|> game_events : club_id\nplayers --|> appearances : player_id\nplayers --|> game_events : player_id\nplayers --|> player_valuations : player_id\ngames --|> appearances : game_id\ngames --|> game_events : game_id\ngames --|> clubs : home/away_club_id\ngames --|> club_games : game_id\ncountries --|> national_teams : country_id\nnational_teams --|> players : current_national_team_id\nclass competitions {\n    competition_id\n    type\n}\nclass games {\n    game_id\n    home/away_club_id\n    competition_id\n}\nclass game_events {\n    game_id\n    player_id\n}\nclass clubs {\n    club_id\n    domestic_competition_id\n}\nclass club_games {\n    club_id\n    opponent_club_id\n    game_id\n}\nclass players {\n    player_id\n    current_club_id\n    current_national_team_id\n    international_caps\n    international_goals\n}\nclass player_valuations{\n    player_id\n}\nclass appearances {\n    appearance_id\n    player_id\n    game_id\n}\nclass countries {\n    country_id\n    country_name\n    confederation\n}\nclass national_teams {\n    national_team_id\n    country_id\n    confederation\n    fifa_ranking\n}\n```\n\n</details>\n\n## Getting started\n\nThe fastest way to explore the dataset is to download the DuckDB database file -- a single file containing all 12 tables, ready to query.\n\n### 1. Download the database\n\n<a href=\"https://pub-e682421888d945d684bcae8890b0ec20.r2.dev/data/transfermarkt-datasets.duckdb\"><img src=\"https://img.shields.io/badge/-Download%20DuckDB%20Database-ff9900?style=for-the-badge&logo=duckdb&logoColor=white\" alt=\"Download DuckDB Database\" height=\"28\"></a>\n\nOr via the command line:\n\n```bash\ncurl -LO https://pub-e682421888d945d684bcae8890b0ec20.r2.dev/data/transfermarkt-datasets.duckdb\n```\n\n### 2. Query with any DuckDB client\n\nOpen the file with the [DuckDB CLI](https://duckdb.org/docs/installation/), Python, R, or any compatible client:\n\n```sql\n-- DuckDB CLI\n-- $ duckdb transfermarkt-datasets.duckdb\n\nSHOW TABLES;\n\nSELECT player_id, name, position, market_value_in_eur\nFROM players\nWHERE position = 'Attack'\nORDER BY market_value_in_eur DESC\nLIMIT 10;\n\n-- player_id | name            | position | market_value_in_eur\n-- 418560    | Erling Haaland  | Attack   | 200000000\n-- 342229    | Kylian Mbappé   | Attack   | 180000000\n-- 371998    | Vinicius Junior | Attack   | 180000000\n-- 433177    | Bukayo Saka     | Attack   | 130000000\n-- ...\n```\n\n> **Tip:** You can also query individual CSV files remotely with [DuckDB](https://duckdb.org/docs/installation/) -- no download required:\n> ```sql\n> INSTALL httpfs; LOAD httpfs;\n> SELECT * FROM read_csv_auto('https://pub-e682421888d945d684bcae8890b0ec20.r2.dev/data/players.csv.gz') LIMIT 10;\n> ```\n\n## Community\n\n### Getting in touch\nIn order to keep things tidy, there are two simple guidelines\n* Keep the conversation centralised and public by getting in touch via the [Discussions](https://github.com/dcaribou/transfermarkt-datasets/discussions) tab.\n* Avoid topic duplication by having a quick look at the [FAQs](https://github.com/dcaribou/transfermarkt-datasets/discussions/175)\n\n### Sponsoring\nMaintenance of this project is made possible by <a href=\"https://github.com/sponsors/dcaribou\">sponsors</a>. If you'd like to sponsor this project you can use the `Sponsor` button at the top.\n\n## Contributing\nContributions to `transfermarkt-datasets` are most welcome. If you want to contribute new fields or assets to this dataset, the instructions are quite simple:\n1. [Fork the repo](https://github.com/dcaribou/transfermarkt-datasets/fork)\n2. Set up your [local environment](docs/developer-guide.md#setup)\n3. [Populate the `data` directory](docs/developer-guide.md#data-storage)\n4. Start modifying assets or creating new ones in [the dbt project](docs/developer-guide.md#data-preparation)\n5. If it's all looking good, create a pull request with your changes :rocket:\n\n> In case you face any issue following the instructions above please [get in touch](#getting-in-touch)\n\nFor full setup and workflow details, see the [Developer guide](docs/developer-guide.md).\n","default_branch":"master","files":131,"tree":[".claude/skills/process-issue/SKILL.md",".devcontainer/devcontainer.json",".dockerignore",".dvc/.gitignore",".dvc/config",".github/FUNDING.yml",".github/workflows/acquire-national-teams.yml",".github/workflows/acquire-tournament-games.yml",".github/workflows/acquire-transfermarkt-api.yml",".github/workflows/acquire-transfermarkt-scraper.yml",".github/workflows/build-contribution.yml",".github/workflows/build.yml",".github/workflows/sync-kaggle.yml",".github/workflows/sync-streamlit.yml",".github/workflows/test_events/workflow_run.json",".gitignore",".pre-commit-config.yaml",".python-version",".streamlit/config.toml","CLAUDE.md","Dockerfile","LICENSE","README.md","config.yml","data/.gitignore","data/README.md","data/competitions.json","data/countries.json","data/prep/dataset-metadata.json","data/raw/.gitignore","data/raw/transfermarkt-api.dvc","data/raw/transfermarkt-scraper.dvc","data/supplemental_competitions.json","data/tournament_editions.json","dbt/.gitignore","dbt/README.md","dbt/dbt_project.yml","dbt/duckdb","dbt/macros/helpers.sql","dbt/macros/io.sql","dbt/macros/parsing.sql","dbt/models/base/transfermarkt_api/base_market_value_development.sql","dbt/models/base/transfermarkt_api/base_transfers.sql","dbt/models/base/transfermarkt_api/models.yml","dbt/models/base/transfermarkt_api/sources.yml","dbt/models/base/transfermarkt_scraper/base_appearances.sql","dbt/models/base/transfermarkt_scraper/base_clubs.sql","dbt/models/base/transfermarkt_scraper/base_competitions.sql","dbt/models/base/transfermarkt_scraper/base_countries.sql","dbt/models/base/transfermarkt_scraper/base_game_events.sql","dbt/models/base/transfermarkt_scraper/base_game_lineups.sql","dbt/models/base/transfermarkt_scraper/base_games.sql","dbt/models/base/transfermarkt_scraper/base_national_teams.sql","dbt/models/base/transfermarkt_scraper/base_players.sql","dbt/models/base/transfermarkt_scraper/models.yml","dbt/models/base/transfermarkt_scraper/sources.yml","dbt/models/curated/appearances.sql","dbt/models/curated/club_games.sql","dbt/models/curated/clubs.sql","dbt/models/curated/competitions.sql","dbt/models/curated/countries.sql","dbt/models/curated/game_events.sql","dbt/models/curated/game_lineups.sql","dbt/models/curated/games.sql","dbt/models/curated/models.yml","dbt/models/curated/national_teams.sql","dbt/models/curated/player_valuations.sql","dbt/models/curated/players.sql","dbt/models/curated/transfers.sql","dbt/package-lock.yml","dbt/packages.yml","dbt/profiles.yml","dbt/tests/consistent_club_ids_in_appearances.sql","dbt/tests/consistent_number_of_games_per_matchday.sql","dbt/tests/every_first_tier_league_has_clubs.sql","dbt/tests/every_first_tier_league_has_games.sql","dbt/tests/expected_number_of_first_tier_leagues.sql","dbt/tests/generic/too_many_missings.sql","dbt/tests/market_value_development_null_responses.sql","dbt/tests/player_valuations_club_transitions.sql","dbt/tests/transfers_null_responses_do_not_drop_players.sql","docs/developer-guide.md","docs/resources/README.md","docs/resources/dbt.png","docs/resources/diagram.mmd","docs/resources/diagram.svg","docs/vision.md","fly.toml","infra/.terraform-version","infra/base/base.tf","infra/iam/iam.tf","infra/main.tf","infra/r2/r2.tf","justfile","poetry.lock","pyproject.toml","scripts/acquiring/transfermarkt-api.py","scripts/acquiring/transfermarkt-scraper.py","scripts/bootstrap.sh","scripts/runner.sh","scripts/synching/export-duckdb.py","scripts/synching/sync-kaggle.py","scripts/synching/sync-r2.py","streamlit/01_👋_about.py","streamlit/pages/02_🔎_app:_explore_dataset.py","streamlit/pages/03_💰_app:_player_value.py","streamlit/pages/04_📈_app:_manager_performance.py","streamlit/pages/05_🧮_app:_match_overview.py","streamlit/utils.py","transfermarkt_datasets/.gitignore","transfermarkt_datasets/assets/cur_appearances.py","transfermarkt_datasets/assets/cur_club_games.py","transfermarkt_datasets/assets/cur_clubs.py","transfermarkt_datasets/assets/cur_competitions.py","transfermarkt_datasets/assets/cur_countries.py","transfermarkt_datasets/assets/cur_game_events.py","transfermarkt_datasets/assets/cur_game_lineups.py","transfermarkt_datasets/assets/cur_games.py","transfermarkt_datasets/assets/cur_national_teams.py","transfermarkt_datasets/assets/cur_player_valuations.py","transfermarkt_datasets/assets/cur_players.py","transfermarkt_datasets/assets/cur_transfers.py","transfermarkt_datasets/core/asset.py","transfermarkt_datasets/core/dataset.py","transfermarkt_datasets/core/schema.py","transfermarkt_datasets/core/utils.py","transfermarkt_datasets/datapackage_description.md","transfermarkt_datasets/tests/test_acquire_transfermarkt_api.py","transfermarkt_datasets/tests/test_assets.py","transfermarkt_datasets/tests/test_dataset.py","transfermarkt_datasets/tests/test_schema.py"],"storefront":"/r/dcaribou","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dcaribou/transfermarkt-datasets/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}