bb_analytics

A simple baseball analytics tool built on top of the GLI platform, which mean it follows the standard CLI pattern of taking commands (like git).

Install

$ gem install bb_analytics

bb_analytics requires sqlite3, so you'll have to meet the prerquisites for that install.

How-to

Typing $ bb_analytics help will render a list of commands and options:

NAME
    bb_analytics - A simple baseball analytics tool

SYNOPSIS
    bb_analytics [global options] command [command options] [arguments...]

VERSION
    0.0.1

GLOBAL OPTIONS
    --help    - Show this message
    --version - Display the program version

COMMANDS
    clear                    - Clear all imported data
    help                     - Shows a list of commands or help for one command
    import                   - Import a data file
    most_improved            - List the most improved players for a supplied time period
    team_slugging_percentage - Team slugging percentage
    triple_crown_winner      - Find the tripple crown winner for a given year

Before querying for analytics, you'll have to import data from csv. The import command tolerates csv files that define player identities and files that define yearly statistics.

For help with any command, just type bb_analytics help <command name>.