← All work
Case study · Data + AI · Personal research project

bsbl.io

Baseball has more public data than anyone can read. bsbl.io ranks it into one plain-English feed (the milestone, the breakout, the mismatch) so the story finds you.

Role
Sole designer and developer
Timeline
March 2026 → today, about 1,280 commits
Stack
React, Supabase, Python on GitHub Actions, Netlify, Claude
Links
bsbl.io ↗
bsbl.io
bsbl.io home page: the headline The whole game, decoded, beside a top-ranked signal card and a ticker of milestones
Home: the top-ranked signal of the day, a milestone ticker, and a way into each part of the product.
bsbl.io on a phone, with a bottom tab bar for Today, Intel, Games, Scores and More
Designed to be used on a phone, with a native-style tab bar.
01

The problem

Baseball is the most measured sport there is. Every pitch is tracked by Statcast, every minor-league game has a box score, and sites like Baseball Savant and FanGraphs publish more numbers than any fan can keep up with. The data isn't the hard part. Knowing what's worth looking at is.

Most stats sites give you a table and expect you to find the story yourself. I wanted the opposite: "answers, not homework." One feed that watches all of it, ranks what's genuinely unusual, says it in plain English, and lets you ask follow-up questions in your own words.

bsbl.io is a personal research project. It isn't advertised or monetized, and it's where I work through ideas about data pipelines, ranking and applied AI on a dataset I care about.

02

My role

Everything, end to end: the product, the data model, the ingest pipeline, the signal and scoring logic, the front end, the AI features, and the copy, including a plain-English glossary of every stat the site uses.

It's built across two repositories, a React front end and a Python back end, with about 1,280 commits between March and October 2026. I built it with Claude Code as my pair programmer: I set the direction and reviewed the changes, and the work is backed by more than 3,400 automated tests.

03

Stack

Front end

React 18ViteTailwindRechartsvisxd3

A JavaScript single-page app with 61 pages, tested with Vitest.

Data pipeline

PythonpybaseballGitHub Actions

26 scheduled jobs pull from the MLB Stats API, Baseball Savant, FanGraphs, Open-Meteo weather and MLB.com news.

Database

SupabasePostgrespg_cron

More than 100 SQL migrations, plus precomputed tables so pages load fast.

AI

Claude Haiku 4.5Claude Sonnet 5

Ask AI plans with Haiku and writes its analysis with Sonnet. The pipeline also uses Claude to write daily facts, under strict number checks.

Hosting

NetlifyFunctionsEdge functions

23 functions (Ask AI, an allowlisted data layer, 17 social-card renderers) and 10 edge functions for link previews.

04

Architecture

Claude never writes database queries. It chooses from fixed, tested data sources and chart types, and every answer is built from rows the system actually fetched. Each question's outcome is logged without any user, session or IP data and deleted after 90 days.

05

Key features

bsbl.io/intel
Intel briefing: a spotlight signal card showing rarity percentile, confidence, the metric and the evidence behind the flag, with latest news below
Intel: every signal shows why it was flagged, with its rarity percentile, confidence, the metric and source, and the evidence against the threshold.
bsbl.io/prospects
Prospect board: a stats-first top 500 across every affiliated level, filterable by level and organization
A stats-first top-500 prospect board across every affiliated level.
bsbl.io/pitch-search
Pitch search with presets such as Barrels and Elite Contact, and filters for exit velocity, launch angle, pitch type and outcome
Pitch-level Statcast search with presets, filters and CSV export.
bsbl.io/draft
MLB Draft results table with picks, schools, college stats and signing bonuses, selectable back to 2015
Draft results, a pre-draft board and a live tracker, back to 2015.
bsbl.io/parks
Ballparks grid with photos of every MLB park
Every MLB park, with park factors, dimensions and hit maps.
  • Ask AIAsk any baseball question in plain English. Claude picks the data source and the chart, and the answer comes from real rows.
  • Ranked signalsBreakouts, regressions, streaks, splits, matchups, milestones and anomalies, scored and ranked into one feed.
  • Org developmentAll 30 farm systems graded on farm development and MLB outcomes, plotted against each other.
  • Two daily gamesSpray (guess the hitter from his spray chart) and Beat the Signal (pick a hitter to get a hit, then build a streak).
  • Matchup Lab and CompareScout any batter against any pitcher, or line up four players head to head and get a verdict, not just a table.
  • A 243-term glossaryEvery stat code in the app links to a plain-English definition, with formulas and typical ranges where they apply.
06

Hard problems

Ranking "interesting" without crying wolf

A feed that flags everything is as useless as one that flags nothing. Every candidate, from a milestone to a slump signal, is scored on a transparent weighted blend, and only rows above a threshold publish.

A type that keeps showing up day after day is damped a little each day, so the top of the feed stays genuinely unusual, and every item keeps the evidence behind it so it can be checked.

etl/insights/scoring.py
WEIGHTS = {
    "rarity_score": 0.25,
    "relevance_score": 0.20,
    "recency_score": 0.15,
    "magnitude_score": 0.15,
    "weirdness_score": 0.15,
    "narrative_score": 0.10,
}

AI that can't make numbers up

An LLM will happily write a confident, wrong number. When Claude writes a daily fact, every number in its headline and context is checked against the stats it was given. One number that isn't in the source and the row is held back instead of published.

Ask AI follows the same rule: Claude plans from fixed data sources and chart types, and anything it gets wrong is repaired or refused. Logging every outcome is how a silent failure surfaced: structured output had been dropped on every query for weeks because the schema had grown past the API's limits. The fix was to restructure how parameters are sent.

etl/insights/enrich.py
# Guardrail: reject AI-introduced numbers.
for field in ("headline", "short_context", "why_it_matters"):
    bad = _ungrounded_number(out.get(field, ""), grounded)
    if bad is not None:
        row["do_not_publish_reason"] = (
            f"AI introduced ungrounded number {bad} in {field}")
        row["status"] = "candidate"
        return row

Millions of pitch rows without timeouts

As the pitch table grew past eight million rows, offset paging got slower with every page and jobs started hitting their time limits. Reads now go one day at a time, in a stable order, with retries.

The public sources rate-limit and fail. Each host gets backoff with jitter and a circuit breaker that pauses for 30 minutes after five blocked requests in a row, and the history backfill runs one season at a time.

etl/pitch_aggregates.py
rows = (supabase.table("statcast_pitches")
        .select(cols_str)
        .gte("game_date", day.isoformat())
        .lt("game_date", next_day.isoformat())
        .order("game_date")
        .order("id")
        .range(offset, offset + page_size - 1)
        .execute()
        .data or [])

The January 1st bug

On New Year's Day the nightly sync started loading "the 2027 season", found nothing, and reported success. Nothing looked broken, but nothing was updating. The season now comes from a real season calendar, and an off-season policy throttles about 15 daily jobs in winter so empty runs don't hide real failures.

etl/phase.py
as_of = as_of or date.today()
by_calendar = as_of.year if season_has_started(as_of) else as_of.year - 1
07

By the numbers

8.34M
Statcast pitches stored, 2015–2026
26
Scheduled data jobs
72
Insight types defined, 47 live
3,450
Automated tests across front and back end

bsbl.io is live and updates through the season, including the postseason: 61 pages, a 500-player prospect board, draft classes back to 2015 and a 243-term glossary. It's the project where I push hardest on the things clients ask me about most: pulling messy public data into one reliable model, ranking it so people see what matters, and putting AI on top in a way that stays honest about the numbers.

Sitting on data nobody has time to read?

I build pipelines, rankings and AI features that turn raw data into answers your team can act on.

Let's talk →Visit bsbl.io ↗
← Previous case studyBandogram Next case study →GOAR Photography