The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
2: struct<name: string, seasons: list<item: int64>, first_season: int64, last_season: int64, shot_count (... 8 chars omitted)
child 0, name: string
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
child 4, shot_count: int64
3: struct<name: string, seasons: list<item: int64>, first_season: int64, last_season: int64, shot_count (... 8 chars omitted)
child 0, name: string
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
child 4, shot_count: int64
7: struct<name: string, seasons: list<item: int64>, first_season: int64, last_season: int64, shot_count (... 8 chars omitted)
child 0, name: string
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
child 4, shot_count: int64
9: struct<name: string, seasons: list<item: int64>, first_season: int64, last_season: int64, shot_count (... 8 chars omitted)
child 0, name: string
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
child 4, shot_count: int64
12: struct<name: string, seasons: list<item: int64>, first_season: int64, last_season: int64, shot_count (... 8 chars omitted)
child 0, name: string
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
c
...
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
child 4, shot_count: int64
1643253: struct<name: string, seasons: list<item: int64>, first_season: int64, last_season: int64, shot_count (... 8 chars omitted)
child 0, name: string
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
child 4, shot_count: int64
1643257: struct<name: string, seasons: list<item: int64>, first_season: int64, last_season: int64, shot_count (... 8 chars omitted)
child 0, name: string
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
child 4, shot_count: int64
version: int64
interned_fields: list<item: string>
child 0, item: string
fields: struct<g: string, dt: string, h: string, v: string, p: string, t: string, a: string, z: string, d: s (... 73 chars omitted)
child 0, g: string
child 1, dt: string
child 2, h: string
child 3, v: string
child 4, p: string
child 5, t: string
child 6, a: string
child 7, z: string
child 8, d: string
child 9, x: string
child 10, y: string
child 11, m: string
child 12, 3: string
child 13, s: string
child 14, po: string
layout: string
lookup_tables: struct<g: string, h: string, v: string, z: string, a: string>
child 0, g: string
child 1, h: string
child 2, v: string
child 3, z: string
child 4, a: string
to
{'version': Value('int64'), 'layout': Value('string'), 'interned_fields': List(Value('string')), 'lookup_tables': {'g': Value('string'), 'h': Value('string'), 'v': Value('string'), 'z': Value('string'), 'a': Value('string')}, 'fields': {'g': Value('string'), 'dt': Value('string'), 'h': Value('string'), 'v': Value('string'), 'p': Value('string'), 't': Value('string'), 'a': Value('string'), 'z': Value('string'), 'd': Value('string'), 'x': Value('string'), 'y': Value('string'), 'm': Value('string'), '3': Value('string'), 's': Value('string'), 'po': Value('string')}}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 99, in get_rows_or_raise
return get_rows(
^^^^^^^^^
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/src/worker/utils.py", line 77, in get_rows
rows_plus_one = list(itertools.islice(ds, rows_max_number + 1))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2690, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2227, in __iter__
for key, pa_table in self._iter_arrow():
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2251, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 494, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 384, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 299, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 128, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2321, in table_cast
return cast_table_to_schema(table, schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2249, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
2: struct<name: string, seasons: list<item: int64>, first_season: int64, last_season: int64, shot_count (... 8 chars omitted)
child 0, name: string
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
child 4, shot_count: int64
3: struct<name: string, seasons: list<item: int64>, first_season: int64, last_season: int64, shot_count (... 8 chars omitted)
child 0, name: string
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
child 4, shot_count: int64
7: struct<name: string, seasons: list<item: int64>, first_season: int64, last_season: int64, shot_count (... 8 chars omitted)
child 0, name: string
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
child 4, shot_count: int64
9: struct<name: string, seasons: list<item: int64>, first_season: int64, last_season: int64, shot_count (... 8 chars omitted)
child 0, name: string
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
child 4, shot_count: int64
12: struct<name: string, seasons: list<item: int64>, first_season: int64, last_season: int64, shot_count (... 8 chars omitted)
child 0, name: string
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
c
...
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
child 4, shot_count: int64
1643253: struct<name: string, seasons: list<item: int64>, first_season: int64, last_season: int64, shot_count (... 8 chars omitted)
child 0, name: string
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
child 4, shot_count: int64
1643257: struct<name: string, seasons: list<item: int64>, first_season: int64, last_season: int64, shot_count (... 8 chars omitted)
child 0, name: string
child 1, seasons: list<item: int64>
child 0, item: int64
child 2, first_season: int64
child 3, last_season: int64
child 4, shot_count: int64
version: int64
interned_fields: list<item: string>
child 0, item: string
fields: struct<g: string, dt: string, h: string, v: string, p: string, t: string, a: string, z: string, d: s (... 73 chars omitted)
child 0, g: string
child 1, dt: string
child 2, h: string
child 3, v: string
child 4, p: string
child 5, t: string
child 6, a: string
child 7, z: string
child 8, d: string
child 9, x: string
child 10, y: string
child 11, m: string
child 12, 3: string
child 13, s: string
child 14, po: string
layout: string
lookup_tables: struct<g: string, h: string, v: string, z: string, a: string>
child 0, g: string
child 1, h: string
child 2, v: string
child 3, z: string
child 4, a: string
to
{'version': Value('int64'), 'layout': Value('string'), 'interned_fields': List(Value('string')), 'lookup_tables': {'g': Value('string'), 'h': Value('string'), 'v': Value('string'), 'z': Value('string'), 'a': Value('string')}, 'fields': {'g': Value('string'), 'dt': Value('string'), 'h': Value('string'), 'v': Value('string'), 'p': Value('string'), 't': Value('string'), 'a': Value('string'), 'z': Value('string'), 'd': Value('string'), 'x': Value('string'), 'y': Value('string'), 'm': Value('string'), '3': Value('string'), 's': Value('string'), 'po': Value('string')}}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
NBA Data Archive
Parquet mirror of NBA play-by-play, shot detail, and player-matchup data from the 1996/97 season through 2025/26.
Built and maintained as the data layer for HoopsMatic.com analytics tools and HoopsHype editorial automation. Public so other researchers and tinkerers don't have to rebuild the same pipeline.
Layout
Two complementary layouts; pick whichever fits your query pattern.
per_season/
One Parquet file per (data type, season, season type). Use this when you only need a slice — a single season, a recent few years, regular season only, etc.
per_season/shotdetail/2024.parquet # 2024/25 regular season shots
per_season/shotdetail/po_2023.parquet # 2023/24 playoff shots
per_season/matchups/2017.parquet
...
merged/
One Parquet file per data type, all seasons + season types concatenated. Use this when you want to sweep the whole history at once (career-long shot charts, all-time leaderboards, multi-season trend analysis).
merged/shotdetail.parquet
merged/matchups.parquet
merged/nbastats.parquet
merged/nbastatsv3.parquet
merged/pbpstats.parquet
merged/datanba.parquet
merged/cdnnba.parquet
Every row in both layouts carries two provenance columns:
_season— int, e.g.2024for the 2024/25 season_season_type—"rg"(regular) or"po"(playoffs)
Data types
| Type | Coverage | Description |
|---|---|---|
shotdetail |
1996/97-2025/26 | Every shot with X/Y court coordinates, distance, make/miss, period, game context |
matchups |
2017/18-2025/26 | Player-vs-player matchup possessions and box-score lines |
nbastats |
1996/97-2024/25 | Classic play-by-play from stats.nba.com |
nbastatsv3 |
2020/21-2025/26 | Newer play-by-play schema |
pbpstats |
2000/01-2024/25 | Possession-level data with start-type tags |
datanba |
2016/17-2024/25 | Play-by-play with on-court action coordinates |
cdnnba |
2016/17-2025/26 | Lightweight play-by-play from cdn.nba.com |
Playoff coverage runs through 2024/25; 2025/26 playoffs don't exist yet.
Some sources (nbastats, pbpstats, datanba) don't yet have 2025/26
backfilled upstream.
Quick start
from datasets import load_dataset
# Load all shots from a single season
ds = load_dataset(
"cdechoch/nba-data-archive",
data_files="per_season/shotdetail/2024.parquet",
split="train",
)
# Or load the full career history of every shot ever
ds = load_dataset(
"cdechoch/nba-data-archive",
data_files="merged/shotdetail.parquet",
split="train",
)
Or skip the datasets library and read Parquet directly with pandas or
pyarrow — every file is standard, snappy-compressed Parquet.
Source and license
Underlying data collected and published by Vladislav Shufinskiy at shufinskiy/nba_data under the Apache License 2.0. This dataset is the same data converted to Parquet and redistributed under the same license.
Original upstream sources, in turn: stats.nba.com, data.nba.com,
cdn.nba.com, pbpstats.com.
Statistics themselves are not copyrightable (Feist Publications v. Rural Telephone Service, 1991). Player names, team names, and game data are factual information used in a nominative reference capacity. No NBA trademarks, logos, or proprietary content are included.
Raw archives
The original .tar.xz files are mirrored at
jsierrahoopshype/nba-data-archive
on GitHub Releases, one release per data type, in case anyone prefers to
work from the CSVs.
- Downloads last month
- 21