Datasets:
id int64 2 389 | name stringlengths 5 15 |
|---|---|
2 | Africa |
5 | South America |
7 | Oceania |
9 | Europe |
17 | North America |
20 | East Asia |
24 | Central America |
27 | Caribbean |
32 | South East Asia |
48 | Middle East |
73 | Europe, Asia |
341 | Uruguay |
343 | Italy |
345 | France |
347 | Brazil |
349 | Switzerland |
351 | Sweden |
353 | Chile |
355 | England |
357 | Mexico |
359 | West Germany |
361 | Argentina |
363 | Spain |
367 | China |
369 | United States |
374 | Korea, Japan |
377 | Germany |
380 | South Africa |
384 | Canada |
386 | Russia |
389 | Qatar |
Football World Cup Knowledge Graph
16,150 nodes. 12,384 edges. 92 years of FIFA World Cup football as a graph — 30 tournaments, 1,248 matches, 3,637 goals, 10,401 players, 88 national teams and 240 stadiums.
Built with Samyama Graph. Loader and ETL: samyama-ai/football-kg.
What this is
Every FIFA World Cup from 1930 to 2022 — 22 men's tournaments (1930–2022) and 8 women's tournaments (1991–2019) — modelled as a property graph rather than a set of tables.
Because it is a graph, questions that need joins across several hops are direct: which stadiums hosted the most matches across tournaments, which players scored in more than one World Cup, how goals distribute by minute and period across 92 years.
Licence
| Data | PDDL 1.0 — Open Data Commons Public Domain Dedication and Licence |
| Source | DataHub World Cup Datasets |
| Loader code | Apache-2.0, in the GitHub repo. This does not govern the data. |
PDDL places the data in the public domain: no attribution requirement, no share-alike. Attribution to DataHub and to this repository is appreciated but not required.
Files
Nodes carry an id; edges reference those ids as src and tgt. Join on id to
reconstruct the graph in any tool.
nodes/
| File | Rows | Columns |
|---|---|---|
player.csv |
10,401 | id, player_id, birth_date, count_tournaments, family_name, given_name, position |
goal.csv |
3,637 | id, goal_id, minute, own_goal, penalty, period |
match.csv |
1,248 | id, match_id, away_score, date, extra_time, home_score, name, penalty_shootout, result, stage |
manager.csv |
475 | id, manager_id, country, family_name, given_name |
stadium.csv |
240 | id, stadium_id, capacity, city, country, name |
team.csv |
88 | id, team_id, code, confederation, name, region |
country.csv |
31 | id, name |
tournament.csv |
30 | id, tournament_id, count_teams, host_country, name, winner, year |
edges/
| File | Rows | Connects |
|---|---|---|
scored_by.csv |
3,637 | Goal → Player |
scored_in.csv |
3,637 | Goal → Match |
home_team.csv |
1,248 | Match → Team |
away_team.csv |
1,248 | Match → Team |
in_tournament.csv |
1,248 | Match → Tournament |
played_at.csv |
1,248 | Match → Stadium |
from.csv |
88 | Team → Country |
hosted_by.csv |
30 | Tournament → Country |
Also included
football.sgsnap — the same graph as a Samyama snapshot (gzip-compressed JSON-lines).
Loads into the engine in one step, without running the ETL.
Usage
As tables
from datasets import load_dataset
players = load_dataset("<ORG>/football-kg", "player")
print(players["train"].num_rows) # 10401
As a graph
docker run -p 6379:6379 -p 8080:8080 samyama/samyama-graph
curl -X POST localhost:8080/api/tenants/default/snapshot/import \
-F "file=@football.sgsnap"
Then query it in Cypher:
// Stadiums that hosted the most World Cup matches
MATCH (m:Match)-[:PLAYED_AT]->(s:Stadium)
RETURN s.name AS stadium, s.city AS city, count(m) AS matches
ORDER BY matches DESC LIMIT 5
// Players who scored in more than one tournament — three hops,
// the kind of question a flat table cannot answer directly.
// `given_name` is the string "not applicable" for mononyms, so match on family_name.
MATCH (p:Player)<-[:SCORED_BY]-(g:Goal)-[:SCORED_IN]->(m:Match)-[:IN_TOURNAMENT]->(t:Tournament)
WITH p, count(DISTINCT t) AS tournaments, count(g) AS goals
WHERE tournaments > 1
RETURN p.family_name AS player, p.given_name AS given, tournaments, goals
ORDER BY goals DESC LIMIT 10
// 307 players qualify. Top: Marta (17 goals, 5 tournaments), Miroslav Klose (16, 4),
// Ronaldo (15, 3), Gerd Müller (14, 2), Birgit Prinz (14, 4).
Provenance
To reproduce this graph, or to check it against the raw data, follow the chain:
1. Original source — DataHub World Cup Datasets, released under PDDL 1.0. The upstream collection provides:
tournaments.csv · teams.csv · stadiums.csv · matches.csv · players.csv ·
squads.csv · goals.csv · managers.csv, and optionally referees.csv ·
bookings.csv · substitutions.csv · penalty_kicks.csv ·
tournament_standings.csv · group_standings.csv
2. ETL — samyama-ai/football-kg, which maps
those tables to a property graph. etl/loader.py is the entry point.
3. This dataset — exported from a Samyama snapshot taken 2026-07-01
(sgsnap format v2, engine v1.1.0), then flattened back to CSV. Node and edge totals
were asserted against the snapshot header: 16,150 and 12,384, and re-verified after
upload.
This build uses a subset of the upstream tables. It draws on tournaments, teams, players, matches, goals, stadiums and managers. It does not include
squads.csv,referees.csv,bookings.csv,substitutions.csvor the standings tables. See Limitations for what that means in practice.
Versioning
This dataset is a git repository. Every upload is a commit, and releases are tagged so that a citation stays valid even as the card is edited.
| Version | Date | Contents |
|---|---|---|
v1.0 |
2026-08-17 | Initial release — 16,150 nodes, 12,384 edges from the 2026-07-01 snapshot |
Pin the tag, not main. main moves; a tag does not.
from huggingface_hub import hf_hub_download
hf_hub_download(
"VaidhyaMegha/football-kg",
"nodes/player.csv",
repo_type="dataset",
revision="v1.0", # stable; omit this and you follow main
)
from datasets import load_dataset
load_dataset("VaidhyaMegha/football-kg", "player", revision="v1.0")
Policy for later releases: any change to the data gets a new tag (v1.1, v2.0).
Corrections to this card alone do not — they land on main, and existing tags keep pointing
at the data they described.
Limitations
Read this before using the graph for analysis.
- 9,045 of the 16,150 nodes (56%) have no edges. This graph connects players to matches only through goals, so a player appears connected only if they scored. 8,570 of 10,401 players are therefore isolated, and all 475 managers are isolated because no relationship type connects them to teams or tournaments.
- No squad, appearance, or lineup edges. You cannot answer "which players were in
which squad" from this data. The football-kg
schema defines a
PLAYED_FORedge (Player → Team, carryingtournament_id,positionandshirt_number) built fromsquads.csv— this export does not contain it, which is why most players are isolated. - No referees, bookings, substitutions or penalty-kick records, and no tournament or group standings, though the upstream DataHub collection and the repo's schema cover them.
- Country coverage is coarse — 31
Countrynodes, several of which are confederation regions rather than states (e.g. "Africa"). - Goals carry
minute,period,penaltyandown_goal, but not the assisting player. given_nameuses the literal string"not applicable", not an empty value, for players and managers known by a single name — 474 players (Marta, Ronaldo, Pelé …) and 7 managers. Concatenatinggiven_name + family_namewill produce"not applicable Marta". Filter on that string, or usefamily_namealone. One player has an emptybirth_date.
Verified against the graph: the totals reproduce the real World Cup records — Marta 17 goals across 5 tournaments (all-time record), Miroslav Klose 16, Ronaldo 15.
Citation
PDDL places the data in the public domain, so no citation is legally required. Cite it anyway — it is what lets a reader get back to the raw data and check the work.
Cite the original source — this is where the data comes from:
DataHub World Cup Datasets. Open Data Commons Public Domain Dedication
and Licence (PDDL 1.0). https://datahub.io/collections/football
Cite this graph build — the derived graph, pinned to a revision:
Football World Cup Knowledge Graph, v1.0 (16,150 nodes, 12,384 edges).
Built with Samyama Graph. https://huggingface.co/datasets/VaidhyaMegha/football-kg
ETL: https://github.com/samyama-ai/football-kg
Source data: DataHub World Cup Datasets (PDDL 1.0),
https://datahub.io/collections/football
BibTeX:
@misc{football_kg_samyama,
title = {Football World Cup Knowledge Graph},
howpublished = {\url{https://huggingface.co/datasets/VaidhyaMegha/football-kg}},
version = {v1.0},
note = {Derived from DataHub World Cup Datasets (PDDL 1.0),
\url{https://datahub.io/collections/football}.
ETL: \url{https://github.com/samyama-ai/football-kg}},
year = {2026}
}
The three pieces
| Piece | Where |
|---|---|
| Code — ETL, schema, loaders | github.com/samyama-ai/football-kg |
| Data — this dataset, plus the raw source it derives from | here, and datahub.io/collections/football |
| Graph — importable snapshot | football.sgsnap in this repository |
- Downloads last month
- -