Skip to main content

NFL play-by-play → BigQuery: idempotent nflverse ingestion + LLM-friendly docs + verification

Project description

nfl-bigquery

NFL play-by-play → BigQuery. Idempotent nflverse ingestion + LLM-friendly docs + verification. Fourth in the *-bigquery family (statcast-bigquery, nhl-bigquery, yfinance-bigquery).

Install

pip install nfl-bigquery
gcloud auth application-default login

Sync

# Backfill 1999–present into a shared dataset (idempotent, resumable)
nfl-bigquery sync --seasons 1999-2025 --resume \
    --pbp-table myproject.mydataset.nfl_plays
# Player dimension
nfl-bigquery players --players-table myproject.mydataset.dim_players

Writes nfl_plays, games, weekly_player_stats (season-chunked DELETE→INSERT) and dim_players (MERGE on gsis_id), plus a _nfl_ingest_runs log for --resume.

Docs & verify

nfl-bigquery docs --format llm
nfl-bigquery docs --format bq-apply --table myproject.mydataset.nfl_plays
nfl-bigquery verify --source internal --season 2024 \
    --pbp-table myproject.mydataset.nfl_plays

The verify command runs 8 checks: duplicate-play detection, orphan-play detection, and plays→weekly reconciliation for passing/rushing/receiving yards and TDs (6 metrics). The --tolerance flag (default 0.0) sets the maximum allowed absolute aggregate diff; lateral plays cause small legitimate yard diffs, so consider --tolerance 5 for yards.

Data source

All data from nflverse via nflreadpy. Play-by-play is nflfastR's 372-column feed (EPA/WPA/air-yards/CPOE modeled), back to 1999.

MIT licensed.

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

nfl_bigquery-0.1.0.tar.gz (308.6 kB view details)

Uploaded Source

Built Distribution

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

nfl_bigquery-0.1.0-py3-none-any.whl (38.0 kB view details)

Uploaded Python 3

File details

Details for the file nfl_bigquery-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for nfl_bigquery-0.1.0.tar.gz
Algorithm Hash digest
SHA256 32f3955e1069520410bb726200f90168d2db1350eb599ec090fc91002e3fadb1
MD5 75eba5acc47b50494cb0ab0aedfcc037
BLAKE2b-256 5ecd354ba55ea1309c4afb02fa2d836b59c1904eb284c10c604bcc43fdcd1df8

See more details on using hashes here.

Provenance

The following attestation bundles were made for nfl_bigquery-0.1.0.tar.gz:

Publisher: release.yml on blahovec-labs/nfl-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 nfl_bigquery-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for nfl_bigquery-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ca9951c83e569e791cd1743890ded0cf30be27ce673e9fecd315abaf0081f16
MD5 e18ab60fe2d4a54e01d4f7af94264cd3
BLAKE2b-256 e116af586f6366379a8475017ac98b195e23b0fbbeea7ff4866e9a238a72234d

See more details on using hashes here.

Provenance

The following attestation bundles were made for nfl_bigquery-0.1.0-py3-none-any.whl:

Publisher: release.yml on blahovec-labs/nfl-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