Skip to content

PR #563: Wire pitcher_arm_angles + bat-tracking-swing-path + refresh batter statcast data#432

Merged
jaayslaughter-cpu merged 1 commit into
mainfrom
pr-563-statcast-new-signals
May 15, 2026
Merged

PR #563: Wire pitcher_arm_angles + bat-tracking-swing-path + refresh batter statcast data#432
jaayslaughter-cpu merged 1 commit into
mainfrom
pr-563-statcast-new-signals

Conversation

@jaayslaughter-cpu
Copy link
Copy Markdown
Owner

@jaayslaughter-cpu jaayslaughter-cpu commented May 15, 2026

PR #563 — Wire Two Unwired Statcast Files + Fresh Batter Data

Both pitcher_arm_angles.csv and bat-tracking-swing-path.csv have been sitting in data/statcast/ since upload but were never loaded by statcast_static_layer.py. This PR wires them in and refreshes batter statcast data.

Changes

statcast_static_layer.py (+62 lines, 911 → 973)

  • New _pitcher_arm_angles dict{pitcher_id: {ball_angle, pitch_hand, release_z, shoulder_z, n_pitches}}
  • New loader for pitcher_arm_angles.csv — 306 pitchers; keyed by pitcher (MLBAM ID)
  • New loader for bat-tracking-swing-path.csv — supplements _batter_tracking with swing_tilt, attack_angle, ideal_attack_rate, attack_direction for ~222 batters
  • New get_pitcher_arm_angle(player_id) public function

data/statcast/statcast_batters_2026.csv

  • Refreshed with latest upload (178 → 179 batters)

New Signal Availability

Signal Source Usage
ball_angle pitcher_arm_angles.csv Arm angle deception signal
swing_tilt bat-tracking-swing-path.csv K susceptibility
attack_angle bat-tracking-swing-path.csv Contact quality
ideal_attack_rate bat-tracking-swing-path.csv Contact consistency

Summary by cubic

Wired pitcher arm angles and bat swing path data into the Statcast static layer to expose new pitcher/batter signals. Also refreshed batter Statcast data.

  • New Features
    • Load pitcher_arm_angles.csv into _pitcher_arm_angles.
    • Add get_pitcher_arm_angle(player_id) to fetch arm slot metrics.
    • Load bat-tracking-swing-path.csv to augment _batter_tracking with swing_tilt, attack_angle, ideal_attack_rate, attack_direction.
    • Refresh statcast_batters_2026.csv to latest.

Written for commit 86dfe23. Summary will update on new commits.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Warning

Rate limit exceeded

@jaayslaughter-cpu has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 42 minutes and 29 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c0d77f76-36f5-4764-80c2-fd5655fc41df

📥 Commits

Reviewing files that changed from the base of the PR and between ad4c14d and 86dfe23.

📒 Files selected for processing (1)
  • statcast_static_layer.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pr-563-statcast-new-signals

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@deepsource-io
Copy link
Copy Markdown

deepsource-io Bot commented May 15, 2026

DeepSource Code Review

We reviewed changes in ad4c14d...86dfe23 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Docker May 15, 2026 2:23a.m. Review ↗
JavaScript May 15, 2026 2:23a.m. Review ↗
Python May 15, 2026 2:23a.m. Review ↗
SQL May 15, 2026 2:23a.m. Review ↗
Secrets May 15, 2026 2:23a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@jaayslaughter-cpu jaayslaughter-cpu merged commit 58c74d8 into main May 15, 2026
7 of 9 checks passed
@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for pitcher arm angles and bat tracking swing path data. It updates the _load function to parse pitcher_arm_angles.csv and bat-tracking-swing-path.csv, populating a new _pitcher_arm_angles dictionary and supplementing existing batter tracking data with metrics like swing tilt and attack angle. A new helper function, get_pitcher_arm_angle, was also added to retrieve pitcher-specific arm angle information. I have no feedback to provide as there were no review comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant