VaidhyaMegha/cricket-kg
Cricket Knowledge Graph 36,619 nodes. 1,392,017 edges. 21,324 matches — Tests, ODIs, T20s, IPL, BBL and more, men's and women's, from December 2001 to March 2026. Built with Samyama Graph. Loader and ETL: samyama-ai/cricket-kg. Attribution — required This dataset is CC-BY-4.0, which means attribution is a condition of use, not a courtesy. If you use it, credit the source: Source data from Cricsheet.org, licensed CC-BY-4.0. That requirement travels with the data… See the full description on the dataset page: https://huggingface.co/datasets/VaidhyaMegha/cricket-kg.
Cricket Knowledge Graph
36,619 nodes. 1,392,017 edges. 21,324 matches — Tests, ODIs, T20s, IPL, BBL and more, men's and women's, from December 2001 to March 2026.
Built with Samyama Graph. Loader and ETL: samyama-ai/cricket-kg.
Attribution — required
This dataset is CC-BY-4.0, which means attribution is a condition of use, not a courtesy. If you use it, credit the source:
Source data from [Cricsheet.org](https://cricsheet.org/), licensed [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/).
That requirement travels with the data — anything you redistribute, publish or build on top of must carry it too.
What this is
Every match Cricsheet has published, as a property graph rather than a pile of JSON.
Because it is a graph, questions needing several hops are direct: which bowler has dismissed a given batter most often across formats, which venues a partnership performs best at, how a player's strike rate moves across seasons and competitions.
Every node is connected — there are no isolated records in this graph.
Files
Nodes carry an id; edges reference those ids as src and tgt. Join on id.
nodes/
edges/
Several edges carry performance data as properties — that is where the detail lives.
DISMISSED is bowler → batter; FIELDED_DISMISSAL is fielder → batter. Both carry the kind of dismissal and the over it happened in.
Also included
cricket.sgsnap — the same graph as a Samyama snapshot. Loads into the engine in one step, without running the ETL.
Usage
As tables
from datasets import load_dataset
batting = load_dataset("VaidhyaMegha/cricket-kg", "edge_batted_in", revision="v1.0")
print(batting["train"].num_rows) # 401165As a graph
docker run --rm -p 8080:8080 -p 6379:6379 public.ecr.aws/f9f6l5u4/samyama-graph:1.1.0
curl -X POST localhost:8080/api/tenants -H 'Content-Type: application/json' \
-d '{"id":"cricket","name":"Cricket KG"}'
curl -X POST localhost:8080/api/tenants/cricket/snapshot/import -F "file=@cricket.sgsnap"// Leading run scorers across all formats
MATCH (p:Player)-[b:BATTED_IN]->(:Match)
RETURN p.name AS player, sum(b.runs) AS runs
ORDER BY runs DESC LIMIT 5
// V Kohli 36,545 · KC Sangakkara 30,651 · DA Warner 28,317 · RG Sharma 26,748
// Which bowler has dismissed a given batter most often — a question about the
// relationship itself, which is awkward in SQL and direct in a graph
MATCH (bowler:Player)-[d:DISMISSED]->(batter:Player)
RETURN bowler.name, batter.name, count(d) AS times
ORDER BY times DESC LIMIT 10Provenance
1. Original source — [Cricsheet.org](https://cricsheet.org/), ball-by-ball match data as JSON, CC-BY-4.0. 21,325 files at the time of extraction.
2. ETL — [samyama-ai/cricket-kg](https://github.com/samyama-ai/cricket-kg), which maps those files to a property graph.
3. This dataset — exported from a Samyama snapshot taken 2026-03-14 (sgsnap format v1, engine v0.6.0), then flattened to CSV. Totals were asserted against the snapshot header — 36,619 nodes and 1,392,017 edges — and re-verified after upload.
Versioning
Pin the tag, not `main`. main moves; a tag does not.
load_dataset("VaidhyaMegha/cricket-kg", "player", revision="v1.0")Data changes get a new tag (v1.1, v2.0); corrections to this card alone land on main.
Limitations
- Not literally ball-by-ball. It is built from Cricsheet's ball-by-ball files, but the graph stores per-innings aggregates (
BATTED_IN,BOWLED_IN) plus individual dismissals with their over. Delivery-level rows are not preserved. For per-ball analysis, go to the Cricsheet source files. - Coverage starts 2001-12-19 and ends 2026-03-11 — Cricsheet's own range, not the whole history of the sport. Older Tests are absent.
- Player identity is per-Cricsheet.
cricsheet_idis the key; players are not reconciled against any external registry, and name spellings follow Cricsheet's. - Teams are strings — national sides and franchises share the
Teamlabel with no distinction between them. - No ball-by-ball commentary, no partnerships as first-class objects, no fielding positions.
Verified: totals match the snapshot header exactly, every node has at least one edge (0 orphans of 36,619), and aggregates reproduce known records — V Kohli leading run-scorer, JM Anderson leading wicket-taker at 1,140.
Citation
CC-BY-4.0 requires attribution. Cite both the source and this build.
Original source:
Cricsheet. Ball-by-ball cricket data. https://cricsheet.org/
Licensed CC-BY-4.0. https://creativecommons.org/licenses/by/4.0/This graph build:
Cricket Knowledge Graph, v1.0 (36,619 nodes, 1,392,017 edges).
Built with Samyama Graph. https://huggingface.co/datasets/VaidhyaMegha/cricket-kg
ETL: https://github.com/samyama-ai/cricket-kg
Source data: Cricsheet.org, CC-BY-4.0, https://cricsheet.org/@misc{cricket_kg_samyama,
title = {Cricket Knowledge Graph},
howpublished = {\url{https://huggingface.co/datasets/VaidhyaMegha/cricket-kg}},
version = {v1.0},
note = {Derived from Cricsheet.org ball-by-ball data, CC-BY-4.0,
\url{https://cricsheet.org/}.
ETL: \url{https://github.com/samyama-ai/cricket-kg}},
year = {2026}
}