Skip to content

Add team baserunners/game trend #37

Description

@Mattsface

Goal

Add a Baserunners/Game trend page, matching the existing Hits, Batting Strikeouts, and Runs pages.

Definition

baserunners = hits + base_on_balls (walks) + hit_by_pitch

This is the standard OBP numerator (times reached base safely), excluding reached-on-error and fielder's choice.

Scope

  • Migration adding nullable base_on_balls and hit_by_pitch columns to team_game_batting_lines, following the same nullable-until-reimported precedent as the batting strikeouts backfill (migration 94dec6973c80)
  • app/services/team_game_logs.py parses base_on_balls and hit_by_pitch from the same gameLog hitting split already being fetched — no new MLB request
  • No new import script: the existing scripts/import_team_season.py / scripts/import_league_season.py backfill the new columns on re-import
  • New /baserunners page: rolling and season average, matching the Runs page's layout (raw + rolling + season average line, optional MLB average line when league coverage is COMPLETE)
  • A stored row imported before this migration has an unknown baserunners total (NULL), not zero — same 409/backfill-prompt handling as the existing batting strikeouts page
  • No OBP, no plate-appearance denominator, no significance testing

Keep this separate from the existing Hits, Strikeouts, Runs, Home/Away Split, and Comparison pages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions