Skip to content

rosszm/hashmarks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hashmarks

Web application that allows users to search active NHL players and view visualizations for individual player statistics. See system architecture for more detailed design and implementation details.

View Demo

Dependencies

  • Python >= 3.10
  • Node >= v16.11.1
  • PostgreSQL >= 12.9

Local Installation (dev)

It is highly recommended you use a virtual environment for installing and running the separate projects. See Creating Virtual Environments.

Note: the database service and API are configured to use the root user. Use sudo bash to run the setup in a root user shell. Alternatively, instances of "root" can be replace with the current user.

Clone the repository and open directory

git clone https://github.com/rosszm/hashmarks.git
cd hashmarks

Set up the database

It is required that a PostgreSQL database named hockey and the user root exist prior to the following steps.

Use the create_tables.py script to generate the database tables:

pip install -r db/requirements.txt
python3 db/hockey_db/create_tables.py

Use update_service.py to pull the data from the past 24 hours to the database:

python3 db/hockey_db/update_service.py

To pull data from > 24 hours ago, use the hockey_db.update_service.update() function.

Install Python dependencies and start API

pip install -r api/requirements.txt
uvicorn api/nhlapi.api:app --reload --port 8000

This will start the API at http://localhost:8000.

Install Node dependencies and start app (yarn)

cd app
yarn install
yarn start

By default, the web app will run at http://localhost:3000.

Acknowledgements

Drew Hynes - for his NHL API documentation.

War on Ice - for their ice rink visualization.

About

Data visualization for hockey statistics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published