Skip to main content

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, 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.

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

nhl_bigquery-0.2.2.tar.gz (246.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nhl_bigquery-0.2.2-py3-none-any.whl (57.0 kB view details)

Uploaded Python 3

File details

Details for the file nhl_bigquery-0.2.2.tar.gz.

File metadata

  • Download URL: nhl_bigquery-0.2.2.tar.gz
  • Upload date:
  • Size: 246.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nhl_bigquery-0.2.2.tar.gz
Algorithm Hash digest
SHA256 619d5ccce57fa7d6c20d8dfb9881f2a389e1ba503a6fc785a808844b43f9f7d9
MD5 5c11526d84100f5824b9a250c688bcfd
BLAKE2b-256 b0d34035c1e973750db40c8c27a2f30beb0f1c633b9901832ab76a9b3baad96a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nhl_bigquery-0.2.2.tar.gz:

Publisher: release.yml on blahovec-labs/nhl-bigquery

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nhl_bigquery-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: nhl_bigquery-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 57.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nhl_bigquery-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 30c9e4cdff0928e18f9632965b7886b7ef3868877c4a245a6bda1a286a8d42c9
MD5 3891accda8369c588b2b841b4840fe03
BLAKE2b-256 1ec5686aaa0eb4dbfd674467a941741c44aea776d2362ea5cbdd62ddc80d8722

See more details on using hashes here.

Provenance

The following attestation bundles were made for nhl_bigquery-0.2.2-py3-none-any.whl:

Publisher: release.yml on blahovec-labs/nhl-bigquery

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page