Why BLATBLAT

David Blatt on the sideline during a game
David Blatt, 2014 · Wikipedia

David Blatt was a misunderstood coach.

A EuroLeague legend who came to Cleveland.

He won a conference title and got fired midway through a 30-11 season. He deserved better.

I can't keep this up.

BLATBLAT has nothing to do with David Blatt. It has everything to do with blah blah (talking nonsense) and statistics.

Here we are with BLATBLAT.

BLATBLAT is one half statistics and one half opinion, subjectivity. It's a reason to nerd out about APIs, statistics, data visualization, and making nonsense storylines based on tangible and intangible, or loosely tangible, factors that impact each game.

Under the Hood

Data Flow Architecture

Sources
stats.nba.com
ESPN API
cdn.nba.com
Cascading Fallback
Ingestion
API Gateway
Normalizer
PocketBase
Plugin Queries
Analysis
Player Plugins
Team Plugins
Stats Plugins
External Plugins
Scored Signals
Output
Narrative Engine
Scorer / Ranker
Game Stories

Crawl Pipeline Stages

01
Scheduled Trigger
Cron job fires crawl pipeline on game days
02
API Fetching
stats.nba.com, ESPN, cdn.nba.com (cascading fallback)
03
Data Normalization
Clean, validate, and unify schemas across sources
04
PocketBase Storage
Persist player stats, rosters, schedules, transactions
05
Plugin Execution
Each plugin scores its domain against stored data
06
Narrative Generation
Convert plugin scores into human-readable storylines
07
Scoring & Ranking
Weight and rank narratives by relevance and novelty
08
Story Assembly
Final output: ranked game narratives with diagnostics

Plugin Categories

Player Analysis

Evaluates individual player readiness and risk factors based on schedule, workload, and history.

  • Rest Days
  • Back-to-Back
  • Minutes Load
  • Injury History
Team Dynamics

Measures team-level momentum, situational patterns, and home/away performance splits.

  • Win Streak
  • Home/Away Split
  • Conference Record
Statistical

Pulls season averages, league leaders, and advanced metrics for comparative analysis.

  • Season Averages
  • League Leaders
  • Advanced Metrics
External

Ingests roster moves, contract details, and depth chart changes from outside data sources.

  • Transactions
  • Contract Data
  • Depth Charts

What We Learned About Data Along the Way

The NBA is generous with data

stats.nba.com

The NBA makes statistical data available through their API endpoints. Thousands of data points per game, per player, per season. The richness of this data is what makes projects like this possible at all.

There's no official retirement ledger

No definitive, machine-readable record exists of whether a player has retired. A player might not play for two years and then come back. This makes in-season roster composition analysis surprisingly tricky -you have to infer status from absence.

Salary tracking is multi-dimensional

Players can receive money from multiple teams simultaneously through buyouts, stretches, and traded contracts. Tracking total compensation requires cross-referencing cap sheets, transaction logs, and contractual amendments across multiple sources that rarely agree.

Commentators see what they want to see

In-game commentary routinely highlights patterns that have zero statistical backing. "This team always plays well on Tuesdays after a loss." BlatBlat leans into this subjectivity on purpose -it is a feature, not a bug.

Cascading API failures are the norm

Third-party sports APIs go down without warning. Rate limits change. Endpoints get deprecated overnight. Building a resilient data pipeline means always having a fallback source and never relying on a single provider.

Data normalization is the real work

Every source formats player names, team abbreviations, and dates differently. "PHX" vs "PHO" vs "Phoenix Suns". The unglamorous work of mapping and normalizing these inconsistencies is where most of the engineering effort goes.

Shooting percentages have a qualification threshold

NBA.com stat minimums

The NBA doesn't crown a league leader in shooting percentage until players hit a minimum number of made shots. The thresholds: 300 made field goals for FG%, 82 made three-pointers for 3PT%, and 125 made free throws for FT%. Early in the season, a bench player who goes 3-for-3 could technically "lead the league" at 100% — but the NBA doesn't count it. This means there's a dead zone in the first 30–40 games where commentators avoid talking about the best shooter in the league, because no one has qualified yet. Once enough volume players cross the threshold — usually around late December or January — the leaderboards start to mean something.