Contains scripts for building and updating a MiLB play-by-play database
Users should first ensure that they have a database environment set up with credentials to write to. The scripts here assume a PostGreSQL database with a table 'milb_pbp', but that can all be customized within the script based on the user.
Users should set their working directory to ~/milb_pbp_data/building_milb_pbp_db
. From there, open the build_milb_pbp_db.R
script.
Here is a key for non-MLB levels and their corresponding code
1 = MLB
11 = Triple-A
12 = Double-A
13 = Class A Advanced
14 = Class A
15 = Class A Short Season
5442 = Rookie Advanced
16 = Rookie
17 = Winter League