Skip to main content

A menu-driven console-based application for analyzing NHL hockey games.

Project description

hockeyjockey

A menu-driven console-based application for analyzing NHL hockey games.

Purpose

This app was created to assist with making hockey pics for a so-called 'confidence pool' (such as this NHL Pick 'Em Pool), where a pool participant must pick the outcome of several games and rank them in order of how confident they are that the chosen team in each matchup will win.

Requirements:

  • Python >= 3.6
  • decorest
  • ansicolors

Installation:

pip install hockeyjockey

Usage

from hockeyjockey import Jockey

# hockeyjockey will automatically download stats and games from the internet
jockey = Jockey()
jockey.menu_main.display_menu()

# you can choose to load the cached copy of games and stats data from disk
# by answering the prompts
jockey = Jockey(suppress_prompt=False)
jockey.menu_main.display_menu()

Documentation

When hockeyjockey first loads, you will be given the option to load NHL statistics and games which have been cached to disk. If the local cache does not exist, or you elect not to use cached data, new data will be fetched from the internet.

The default is to fetch hockey games for the closest Friday and Saturday.

Games Menu

  1. Load Today's Games - Loads the NHL games that are taking place today into memory.
  2. Load Upcoming Friday/Saturday - If today is a Friday or Saturday, loads the current Friday/Saturday's games, otherwise loads next weekend's Friday/Saturday games.
  3. Load Custom Date Range - Prompts for a start and end date and loads the games between those dates inclusive.
  4. Print Games - Echoes the currently loaded games to the console.

Teams Menu

  1. Print Teams - Prints a list of the NHL teams in alphabetical order.

Stats Menu

  1. Reload Stats - Fetches a fresh copy of the latest NHL statistics for all teams and stores it in memory. The stats stored in memory are the basis for hockeyjockey's ranking analysis.
  2. Rank Games by Single Statistic - Requires that a set of NHL games and statistics have been loaded. This option provides the main purpose for hockeyjockey - ranking a set of NHL games by a single stat which is chosen from the stats provided. For example, if the user of the program chooses 'wins', hockey jockey will output a list of games with the team with the most wins in each matchup highlighted green. The amplitude difference between the team with the greater number of wins and the team with the lesser number of wins is the key on which the games are ranked.
  3. Rank Games by All Statistics - The same as the above option, but will rank the games by every statistic in memory.
  4. Print Stats - Echoes the currently loaded NHL statistics for all teams to the console.

Statistics

Special thanks to Drew Hynes for documenting the NHL Stats API, here.

License

GNU GPLv3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hockeyjockey-1.2.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hockeyjockey-1.2-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

Details for the file hockeyjockey-1.2.tar.gz.

File metadata

  • Download URL: hockeyjockey-1.2.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.8

File hashes

Hashes for hockeyjockey-1.2.tar.gz
Algorithm Hash digest
SHA256 a50cdc2966974ab93dcc7d14dd43769d82eb072c65d160b28491c5508813d51f
MD5 c40df5fefaa8efb3d62a158d17dca996
BLAKE2b-256 6567452739fee9751f3e42433fd02ddb9c9aee8fb24b861877c1ad1af8900854

See more details on using hashes here.

File details

Details for the file hockeyjockey-1.2-py3-none-any.whl.

File metadata

  • Download URL: hockeyjockey-1.2-py3-none-any.whl
  • Upload date:
  • Size: 32.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.8

File hashes

Hashes for hockeyjockey-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3c71143a95785a698c76f37601f001ec38241daaae71bb1725cf2cad06fef1e8
MD5 23218cc9b6171d1c509ae8de263bb876
BLAKE2b-256 6a96ced51719a10421a143c3c0e740ab86e7f80a307ea0e49114324c8b859899

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page