Retrieving a single game and the teams associated with it

This commit is contained in:
2025-08-28 19:15:35 +00:00
parent a7782aaf82
commit 330c7445a6
2 changed files with 140 additions and 6 deletions

14
main.py
View File

@@ -1,8 +1,10 @@
import numpy as np # helps with the math
import matplotlib.pyplot as plt # to plot error during training
from data.get_data import pull_training_data
from data.db_connect import Database
from data.stats_importer import Importer
from data.build_weather import get_weather, get_sun_and_moon_phase
from data.stats_importer import Importer
# input data
inputs = np.array([[0, 0, 1, 0],
@@ -15,19 +17,23 @@ inputs = np.array([[0, 0, 1, 0],
outputs = np.array([[0], [0], [0], [1], [1], [1]])
if __name__ == '__main__':
db_file = "./database/baseball.db"
db_conn = Database(db_file)
pull_training_data(db_conn, "20240602", 0, "BAL12")
"""
build_db_path = "./data/sql/build_db.sql"
fill_parks_path = "./data/sql/prefill_parks.sql"
fill_teams_path = "./data/sql/prefill_teams.sql"
db_file = "./database/baseball.db"
db_conn = Database(db_file)
db_conn.run_sql_file(build_db_path)
db_conn.run_sql_file(fill_parks_path)
db_conn.run_sql_file(fill_teams_path)
imp = Importer(db_conn)
imp.parse_all_data("./data/stats/to_import", "./data/stats/imported/")
"""
"""
else: