Install the following python modules: mysql-connector-python
, pandas
, numpy
, python-dotenv
, argparse
- Create a
.env
file with your local MySQL db's login info and place it in thebaseball-app/setupdb
directory, for example:
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=password
- Download
lahman_1871-2023_csv
folder fromhttps://www.dropbox.com/scl/fi/hy0sxw6gaai7ghemrshi8/lahman_1871-2023_csv.7z?e=5&file_subpath=%2Flahman_1871-2023_csv&rlkey=edw1u63zzxg48gvpcmr3qpnhz&dl=0
- Unzip the downloaded zip file
- Move
lahman_1871-2023_csv/lahman_1871-2023_csv
intobaseball-app/setupdb
- Run
make configure_imported_production_csv_files
to configure the downloaded data - Run
make create_and_populate_tables_with_sample_data
ormake create_and_populate_tables_with_production_data
to create the database tables and populate them with either the sample or production data