CoolFace
Datasetpublic

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.

sourceHugging Facecc-by-4.0updated 1mo agoView on Hugging Face
1likes196downloads
Dataset Card

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.

DataCC-BY-4.0 — attribution required
SourceCricsheet.org
Loader codeApache-2.0, in the GitHub repo. This does not govern the data.

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.

FormatMatchesGenderMatches
T2013,069men's17,166
ODI3,098women's4,158
MDM (multi-day)2,085
ODM (one-day)1,852
Test900
IT20320

Files

Nodes carry an id; edges reference those ids as src and tgt. Join on id.

nodes/

FileRowsColumns
match.csv21,324id, file_id, date, gender, match_type, season, win_by_runs, win_by_wickets, winner
player.csv12,933id, cricsheet_id, name
tournament.csv1,053id, name
venue.csv877id, city, name
team.csv383id, name
season.csv49id, year

edges/

Several edges carry performance data as properties — that is where the detail lives.

FileRowsConnectsProperties
batted_in.csv401,165Player → Matchruns, balls, fours, sixes, strike_rate, innings_num, super_over
dismissed.csv308,216Player → Playerkind, over, match_file_id
bowled_in.csv279,426Player → Matchwickets, overs, maidens, runs_conceded, economy, innings_num
fielded_dismissal.csv215,869Player → Playerkind, over, match_file_id
competed_in.csv42,648Team → Match
played_for.csv24,011Player → Team
hosted_at.csv21,324Match → Venue
in_season.csv21,324Match → Season
won_toss.csv21,324Team → Matchdecision
part_of.csv21,235Match → Tournamentgroup, match_number
won.csv19,679Team → Matchby_runs, by_wickets
player_of_match.csv15,796Player → Match

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

python
from datasets import load_dataset

batting = load_dataset("VaidhyaMegha/cricket-kg", "edge_batted_in", revision="v1.0")
print(batting["train"].num_rows)          # 401165

As a graph

bash
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"
cypher
// 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 10

Provenance

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

VersionDateContents
`v1.0`2026-08-17Initial release — 36,619 nodes, 1,392,017 edges from the 2026-03-14 snapshot

Pin the tag, not `main`. main moves; a tag does not.

python
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_id is 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 Team label 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/
bibtex
@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}
}

The three pieces

PieceWhere
Code — ETL, schema, loadersgithub.com/samyama-ai/cricket-kg
Data — this dataset, and the raw source it derives fromhere, and cricsheet.org
Graph — importable snapshotcricket.sgsnap in this repository