Skip to content

Tools for acquiring and analyzing baseball data from sources such as Statcast, Fangraphs, and Baseball-Reference.

License

Notifications You must be signed in to change notification settings

hedgertronic/pastime

Repository files navigation

Pastime for Python

Tools for acquiring and analyzing baseball data from sources such as Statcast, Fangraphs, and Baseball-Reference.

Installation

pastime can be installed via pip:

pip install pastime

Getting Started

Due to the large file size, the Chadwick Bureau lookup table is not installed by default. To download it, follow these steps:

1. Determine installation location of pastime

pip show pastime

This should print something like this to the screen:

Name: pastime
...
Location: <INSTALLATION_LOCATION>

2. Create data directory

mkdir "<INSTALLATION_LOCATION>/pastime/data"

3. Download table into data directory

python -m pastime.lookup --table --refresh -o "<INSTALLATION_LOCATION>/pastime/data/lookup_table.csv"

If you ever believe that the table is out of date and want to update it, re-run the command from step 3.

About

Tools for acquiring and analyzing baseball data from sources such as Statcast, Fangraphs, and Baseball-Reference.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages