Skip to main content

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, with home_on_ice_ids / away_on_ice_ids arrays
  • games — schedule dimension
  • game_officials — referees + linesmen per game
  • boxscore_stats — per-player per-game stats
  • shifts — per-shift per-player intervals
  • standings — 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.

Release files for nhl-bigquery 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nhl-bigquery 0.2.3
File Size Uploaded
nhl_bigquery-0.2.3.tar.gz 265.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nhl-bigquery 0.2.3
File Interpreter ABI Platform
nhl_bigquery-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 322.9 kB

Release files / nhl_bigquery-0.2.3.tar.gz

Download URL nhl_bigquery-0.2.3.tar.gz
Size 265.7 kB
Tags Source
SHA-256 checksum
How to use checksums
33263e74e20ae65a8a5dde5c351bd5afd0e3faa94eab19015c8860b4d47d8cb2
BLAKE2b-256 checksum
How to use checksums
5fa3cdf6029b4f18bd8de95629e3c645741e12275c8b152520e2e72f5a407397
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / nhl_bigquery-0.2.3-py3-none-any.whl

Download URL nhl_bigquery-0.2.3-py3-none-any.whl
Size 57.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0cfaf3284e7daa9fef7014c3d8ad72ff8c5ac2788346597ec5eee4b65f4b6c80
BLAKE2b-256 checksum
How to use checksums
8f55da4ba59a6f9c38416018e5583845b70202b5b66453f39f88dd22f0a14268
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page