Adding initial weather lookup and populating the database from csvs

This commit is contained in:
2025-07-08 23:14:57 +00:00
parent 3f2568875f
commit f21032a1f0
5 changed files with 554 additions and 328 deletions

10
main.py
View File

@@ -1,7 +1,8 @@
import numpy as np # helps with the math
import matplotlib.pyplot as plt # to plot error during training
from data.db_connect import Database
from data.stats_importer import parse_csv
from data.stats_importer import Importer
from data.build_weather import Weather
# input data
inputs = np.array([[0, 0, 1, 0],
@@ -69,8 +70,13 @@ if __name__ == '__main__':
db_conn.run_sql_file(fill_parks_path)
db_conn.run_sql_file(fill_teams_path)
imp = Importer(db_conn)
test_csv = "./data/stats/gl2022.csv"
print(parse_csv(test_csv))
print(imp.parse_one_file(test_csv))
#we = Weather()
#print(we.get_weather(39.26733000, -76.79831000, "20250706", 12))
else:
# create neural network