Skip to content
Scripts to download and analyze MLB game data
Python HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Scripts to download and analyze MLB game data.

Setting Up the Database

Create the PostgreSQL database:

createdb breakingball

Create the database tables:

./ init

To drop all application tables and recreate them from scratch (this will destory all previously loaded data):

./ reset

Downloading Game Data

Start celery workers (with optional concurrency)

celery -A gameloader worker --loglevel=info --concurrency=4 will first scrape game listings from a given date (or range of dates) and then delegate the download and extraction process to celery workers to be performed asynchronously. To load game data from a single date:

./ --start-date 2015-05-13

To load game data from a date range:

./ --start-date 2015-05-13 --end-date 2015-05-20

By default, the loader will skip games that exist in the database with a status of 'final'. To force a download and refresh of all game data, including those marked as final:

./ --start-date 2015-05-13 --refresh
You can’t perform that action at this time.