Skip to main content

Analysis of different batting orders given a lineup

Project description

Description

Simulates every possible batting order for a given lineup and displays summary statistics of the average runs (over a number of games) of the orders, and specific information about the top and bottom 5 orders. The user may choose how many games each order is simulated for, which players are in the lineup, or what each player's PA outcomes are in a single game (see sample files).

Data Source

Baseball Savant Custom Data

Major TODOs

  1. Determine the accurate likelihoods of sacrifices and double plays for different out types
  2. Enable some sort of pinch hitting scheme (right now, each player hits the entire game)
  3. Enable some sort of pitcher dependent hitting results (even as simple as right-y/left-y; right now hitting stats are full season aggregates)
  4. Include edge cases like stealing, wild pitches, etc.
  5. More detailed data (i.e. did a double go to right or left field?)
  6. Player specific data (i.e. how often does a player try to steal?)

Installation

pip install batting-order-analysis

View on PyPI

Usage

driver.py and driver.ipynb supply a basic interface, check them out

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

batting_order_analysis-0.0.52.tar.gz (37.7 kB view hashes)

Uploaded Source

Built Distribution

batting_order_analysis-0.0.52-py3-none-any.whl (38.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page