NHL play-by-play → BigQuery: idempotent ingestion + LLM-friendly docs + verification
Project description
nhl-bigquery
Idempotent NHL play-by-play (with on-ice arrays merged from shift-charts) → BigQuery ingestion, with first-class documentation for SQL/LLM agents and verification against the NHL public API.
Install
pip install nhl-bigquery
Quickstart
gcloud auth application-default login
nhl-bigquery sync \
--start 2024-10-01 --end 2025-06-30 \
--plays-table myproject.mydataset.nhl_plays
This writes six tables to myproject.mydataset.*:
nhl_plays— one row per event, withhome_on_ice_ids/away_on_ice_idsarraysgames— schedule dimensiongame_officials— referees + linesmen per gameboxscore_stats— per-player per-game statsshifts— per-shift per-player intervalsstandings— daily team-standings snapshots
Backfill
Backfill 15 seasons in resumable monthly chunks:
nhl-bigquery sync \
--start 2010-10-01 --end 2026-05-11 \
--chunk-by month --resume \
--plays-table myproject.mydataset.nhl_plays
--resume skips chunks already recorded as success or empty in
<dataset>._nhl_ingest_runs. Re-running with the same --chunk-by is
safe; switching between runs will re-process (chunks must match exactly).
Documentation
nhl-bigquery docs --format llm > NHL_FOR_LLMS.md
nhl-bigquery docs --format bq-apply --table myproject.mydataset.nhl_plays
Five formats: bq-apply (push descriptions to BigQuery), llm (one
Markdown file packing every column for LLM context), dictionary
(JSON rows for a data dictionary table), markdown (human reference),
and dbt (dbt YAML schema stub).
Verification
nhl-bigquery verify --source internal \
--aggregation internal-consistency \
--table myproject.mydataset.nhl_plays
nhl-bigquery verify --source nhl-api \
--aggregation team-season --metric all --season 2024 \
--table myproject.mydataset.nhl_plays
MIT licensed. This software does not include or distribute NHL data.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nhl_bigquery-0.1.0.tar.gz.
File metadata
- Download URL: nhl_bigquery-0.1.0.tar.gz
- Upload date:
- Size: 239.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88511a2e9c9b75ebdddf53cc84cf766992c1c8d2e78f451aee5aff09113fc24e
|
|
| MD5 |
2855d8f2512a5a3fec19704a5a77c1fb
|
|
| BLAKE2b-256 |
f87175ab222f5eafc9d2587879602e6c21eac4e42bfddeee4ec0e25bf2aaf913
|
Provenance
The following attestation bundles were made for nhl_bigquery-0.1.0.tar.gz:
Publisher:
release.yml on blahovec-labs/nhl-bigquery
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nhl_bigquery-0.1.0.tar.gz -
Subject digest:
88511a2e9c9b75ebdddf53cc84cf766992c1c8d2e78f451aee5aff09113fc24e - Sigstore transparency entry: 1611332488
- Sigstore integration time:
-
Permalink:
blahovec-labs/nhl-bigquery@23ec2fee182f61c2e2b3172e65aa5a140a227786 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/blahovec-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@23ec2fee182f61c2e2b3172e65aa5a140a227786 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nhl_bigquery-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nhl_bigquery-0.1.0-py3-none-any.whl
- Upload date:
- Size: 51.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
722945f9e9c933db7b51873cd27ba900bf61a00e00d7827ab0b1f0108b5cfca6
|
|
| MD5 |
46f534ab7782b4ba2a434320435bd98d
|
|
| BLAKE2b-256 |
673fc29ff2e526d08b945c5d841ecff5b056c0ab80b4b21271367bd59227425b
|
Provenance
The following attestation bundles were made for nhl_bigquery-0.1.0-py3-none-any.whl:
Publisher:
release.yml on blahovec-labs/nhl-bigquery
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nhl_bigquery-0.1.0-py3-none-any.whl -
Subject digest:
722945f9e9c933db7b51873cd27ba900bf61a00e00d7827ab0b1f0108b5cfca6 - Sigstore transparency entry: 1611332589
- Sigstore integration time:
-
Permalink:
blahovec-labs/nhl-bigquery@23ec2fee182f61c2e2b3172e65aa5a140a227786 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/blahovec-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@23ec2fee182f61c2e2b3172e65aa5a140a227786 -
Trigger Event:
push
-
Statement type: