Moving around csvs and better handling of duplicate data. Pulling all relevant data

This commit is contained in:
2025-09-15 18:46:37 +00:00
parent 3950e99151
commit 125d133af5
9 changed files with 2450 additions and 33 deletions

12
main.py
View File

@@ -17,12 +17,14 @@ 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)
db_file = "./database/baseball.db"
db_conn = Database(db_file)
#pull_training_data(db_conn, "20240602", 0, "BAL12")
query = "SELECT game_date, game_number, park_id FROM games ORDER BY game_date"
all_games = db_conn.selectall(query)
print(get_sun_and_moon_phase(39.283889, -76.621667, "20240602"))
for game in all_games:
game_result, training_data = pull_training_data(db_conn, str(game[0]), game[1], game[2])
"""
build_db_path = "./data/sql/build_db.sql"
@@ -34,7 +36,7 @@ if __name__ == '__main__':
db_conn.run_sql_file(fill_teams_path)
imp = Importer(db_conn)
imp.parse_all_data("./data/stats/to_import", "./data/stats/imported/")
imp.parse_all_data("./data/stats/", "./data/stats/imported/")
"""
"""