NBA-Betting / NBA_Betting

Using data analytics and machine learning to create a comprehensive and profitable system for predicting the outcomes of NBA games.
155 stars 17 forks source link

Documentation to run #51

Open PranayRaman opened 1 year ago

PranayRaman commented 1 year ago

please include docs to run

MarKaliGG commented 1 year ago

we need your help!!

MarKaliGG commented 1 year ago

Im stuck whit the installation too

Jonesdane commented 1 year ago

same here

jeffjohannsen commented 1 year ago

The updated Readme does a better job of explaining the workflow of the project. In general though, this isn't a piece of software to be installed. The project focuses on approaching the goal of better predicting the outcomes of NBA games. If you have any specific questions, please let me know.

ard033 commented 1 year ago

permission denied when running src/deployment - why is that?

jeffjohannsen commented 1 year ago

Hmm, let me look at that when I get home tonight. I probably didn't update the Flask login info.

ard033 commented 12 months ago

Any update on this? Is there somewhere we need to login to?

jeffjohannsen commented 12 months ago

I made some updates to src/deployment/web_app.py. Hopefully, this fixes the problem. If you are running the web app for testing and debugging you can use python web_app.py. Otherwise, if you have gunicorn setup, you can run the app using gunicorn nba_app_wsgi:app. Either way, the web app and incorporated dashboards require DB_ENDPOINT, DB_PASSWORD, WEB_APP_USERNAME, WEB_APP_PASSWORD, and WEB_APP_SECRET_KEY from your .env file. Since .env is private and not shown in the public GitHub repo, here is an blank setup of mine:

# DATABASE
DB_ENDPOINT = <>
DB_PASSWORD = <>

# WEB APP
WEB_APP_USERNAME = <>
WEB_APP_PASSWORD = <>
WEB_APP_SECRET_KEY = <>  # Session Management

# AIRFLOW
EMAIL_ADDRESS = <>  # Error Reporting

# DATA COLLECTION
ZYTE_API_KEY = <>  # Scrapy Data Collection
ODDS_API_KEY = <>  # On Demand Lines from https://the-odds-api.com/

# PROJECT BASE DIRECTORY - Example: /home/username/documents/NBA_Betting
NBA_BETTING_BASE_DIR = <>  # Local
# NBA_BETTING_BASE_DIR = <> # AWS EC2
jasonnan1 commented 5 days ago

When I run the python web_app.py command, I get the following error: Traceback (most recent call last): File "/home/nan/NBA_Betting-main/src/deployment/web_app/nba_app.py", line 486, in private_app = init_private_dashboard(app) File "/home/nan/NBA_Betting-main/src/deployment/dashboard/private_dashboard.py", line 43, in init_private_dashboard df = get_dashboard_data(connection) File "/home/nan/NBA_Betting-main/src/deployment/dashboard/private_dashboard.py", line 265, in get_dashboard_data df["game_datetime"] File "/home/nan/miniconda3/envs/nba/lib/python3.9/site-packages/pandas/core/generic.py", line 5902, in getattr return object.getattribute(self, name) File "/home/nan/miniconda3/envs/nba/lib/python3.9/site-packages/pandas/core/accessor.py", line 182, in get accessor_obj = self._accessor(obj) File "/home/nan/miniconda3/envs/nba/lib/python3.9/site-packages/pandas/core/indexes/accessors.py", line 512, in new raise AttributeError("Can only use .dt accessor with datetimelike values") AttributeError: Can only use .dt accessor with datetimelike values Why is this happening, my .env file is already configured correctly