Adding moon and sun phases
This commit is contained in:
24
main.py
24
main.py
@@ -2,7 +2,7 @@ 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 Importer
|
||||
from data.build_weather import get_weather
|
||||
from data.build_weather import get_weather, get_sun_and_moon_phase
|
||||
|
||||
# input data
|
||||
inputs = np.array([[0, 0, 1, 0],
|
||||
@@ -59,25 +59,27 @@ class NeuralNetwork:
|
||||
return prediction
|
||||
|
||||
if __name__ == '__main__':
|
||||
#build_db_path = "./data/sql/build_db.sql"
|
||||
#fill_parks_path = "./data/sql/prefill_parks.sql"
|
||||
#fill_teams_path = "./data/sql/prefill_teams.sql"
|
||||
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)
|
||||
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/")
|
||||
imp = Importer(db_conn)
|
||||
imp.parse_all_data("./data/stats/to_import", "./data/stats/imported/")
|
||||
|
||||
#we = Weather()
|
||||
#print(we.get_weather(39.26733000, -76.79831000, "20250706", 12))
|
||||
|
||||
park_data = db_conn.select("SELECT latitude, longitude FROM parks WHERE park_id = ? OR park_id = ?", ("ATL03","KAN06",))
|
||||
print(park_data[0])
|
||||
#park_data = db_conn.select("SELECT latitude, longitude FROM parks WHERE park_id = ?", ("ATL03",))
|
||||
#print(get_sun_and_moon_phase(park_data[0], park_data[1], "20250709"))
|
||||
#historic_weather = get_weather(park_data[0], park_data[1], game_stats["date"], hour)
|
||||
|
||||
|
||||
else:
|
||||
# create neural network
|
||||
|
||||
Reference in New Issue
Block a user