tomm3hgunn / Jayhawk-Go

0 stars 1 forks source link

Add trendlines to matches #49

Closed mrpete5 closed 1 year ago

mrpete5 commented 1 year ago

Not sure the possibility of this feature, but adding it for tracking purposes. If someone wants to research possible ways to implement this feature then let it be known here.

tomm3hgunn commented 1 year ago

This might be where the database comes in and stores every spread, total, and moneyline data every time the API is called. Then we can make a graph of the history.

mrpete5 commented 1 year ago

We will need to research how to implement the graphs. How big of a task would setting up the database for it be? If time is on our side to get higher priority features done, I think this could be a really cool feature to have.

tomm3hgunn commented 1 year ago

We can now see any historical data we capture from the API. As a simple example, say we visit the site at 1:00pm, and again at 2:00pm. We can graph a timeline with those two entries. The image is using raw SQL query as an example, but Django commands is needed to interact with the DB. Look in djangoHelp.txt under "Database Functions" for some examples.

Example where we could graph a specific matchup and sportsbook. With 5 entries, we can make it auto-gen a chart with them. Obviously there was no change here so it will be a straight line. Note that Django is timezone aware. database

Testing out queries in SQL like above can be done by getting the SQLite extension by alexcvzz. Connect to our local db.sqlite3 file and you can make a similar query as shown on the left.

tomm3hgunn commented 1 year ago

Todo