wsba-hockey 1.1.8__tar.gz → 1.1.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wsba_hockey-1.1.8/src/wsba_hockey.egg-info → wsba_hockey-1.1.9}/PKG-INFO +1 -1
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/pyproject.toml +1 -1
- wsba_hockey-1.1.9/src/wsba_hockey/__init__.py +22 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/data_pipelines.py +2 -2
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/tools/scraping.py +20 -20
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/workspace.py +0 -3
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/wsba_main.py +290 -15
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9/src/wsba_hockey.egg-info}/PKG-INFO +1 -1
- wsba_hockey-1.1.9/tests/tests.py +20 -0
- wsba_hockey-1.1.8/src/wsba_hockey/__init__.py +0 -1
- wsba_hockey-1.1.8/tests/tests.py +0 -23
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/LICENSE +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/README.md +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/setup.cfg +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/api/api/index.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/duckdb/vendor.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/flatted/python/flatted.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/flatted/python/test.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/gyp_main.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/common.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/input.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/test_gyp.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/tools/graphviz.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/tools/pretty_gyp.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/tools/pretty_sln.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/gyp/tools/pretty_vcproj.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/test/fixtures/test-charmap.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/node-gyp/update-gyp.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/gyp_main.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/common.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/input.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/setup.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/test_gyp.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/tools/graphviz.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/tools/pretty_gyp.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/tools/pretty_sln.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/gyp/tools/pretty_vcproj.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/test/fixtures/test-charmap.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/node_modules/sqlite3/node_modules/node-gyp/update-gyp.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/duos/app.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/duos/calc.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/game_stats/app.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/game_stats/name_fix.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/goalie/app.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/goalie/plot.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/goalie/rink_plot.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/heatmaps/app.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/heatmaps/plot.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/heatmaps/rink_plot.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/line-combos/app.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/line-combos/plot.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/line-combos/rink_plot.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/matchups/app.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/matchups/plot.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/matchups/rink_plot.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/pbp/app.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/pbp/plot.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/pbp/rink_plot.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/skater/app.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/skater/plot.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/skater/rink_plot.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/team_heatmaps/app.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/team_heatmaps/plot.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/evidence/weakside-breakout/wsba_nhl_apps/wsba_nhl_apps/team_heatmaps/rink_plot.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/flask/app.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/tools/__init__.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/tools/agg.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/tools/archive/old_scraping.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/tools/plotting.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/tools/utils/__init__.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/tools/utils/config.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/tools/utils/save_pages.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/tools/utils/shared.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey/tools/xg_model.py +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey.egg-info/SOURCES.txt +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey.egg-info/dependency_links.txt +0 -0
- {wsba_hockey-1.1.8 → wsba_hockey-1.1.9}/src/wsba_hockey.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: wsba_hockey
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.9
|
4
4
|
Summary: WeakSide Breakout's complete Python package of access to hockey data, primairly including the scraping of National Hockey League schedule, play-by-play, and shifts information.
|
5
5
|
Author-email: Owen Singh <owenbksingh@gmail.com>
|
6
6
|
Project-URL: Homepage, https://github.com/owensingh38/wsba_hockey/
|
@@ -0,0 +1,22 @@
|
|
1
|
+
from wsba_hockey.wsba_main import (
|
2
|
+
nhl_scrape_game,
|
3
|
+
nhl_scrape_schedule,
|
4
|
+
nhl_scrape_season,
|
5
|
+
nhl_scrape_seasons_info,
|
6
|
+
nhl_scrape_standings,
|
7
|
+
nhl_scrape_roster,
|
8
|
+
nhl_scrape_draft_rankings,
|
9
|
+
nhl_scrape_prospects,
|
10
|
+
nhl_scrape_game_info,
|
11
|
+
nhl_calculate_stats,
|
12
|
+
nhl_apply_xG,
|
13
|
+
nhl_plot_skaters_shots,
|
14
|
+
nhl_plot_games,
|
15
|
+
repo_load_rosters,
|
16
|
+
repo_load_schedule,
|
17
|
+
repo_load_teaminfo,
|
18
|
+
repo_load_pbp,
|
19
|
+
repo_load_seasons
|
20
|
+
)
|
21
|
+
|
22
|
+
from wsba_hockey.wsba_main import NHL_Database
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import os
|
2
2
|
import numpy as np
|
3
3
|
import pandas as pd
|
4
|
-
import wsba_main as wsba
|
4
|
+
import wsba_hockey.wsba_main as wsba
|
5
5
|
import numpy as np
|
6
6
|
from datetime import datetime
|
7
7
|
from gspread_pandas import Spread
|
@@ -14,7 +14,7 @@ def pbp(seasons):
|
|
14
14
|
for season in seasons:
|
15
15
|
errors=[]
|
16
16
|
for season in seasons:
|
17
|
-
data = wsba.nhl_scrape_season(season,remove=[],local=
|
17
|
+
data = wsba.nhl_scrape_season(season,remove=[],local=False,sources=True,errors=True)
|
18
18
|
errors.append(data['errors'])
|
19
19
|
data['pbp'].to_csv('temp.csv',index=False)
|
20
20
|
pd.read_csv('temp.csv').to_parquet(f'pbp/parquet/nhl_pbp_{season}.parquet',index=False)
|
@@ -509,26 +509,26 @@ async def parse_html(info):
|
|
509
509
|
|
510
510
|
data = pd.concat(event_log)
|
511
511
|
data['event_type'] = data['event_type'].replace({
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
512
|
+
"PGSTR": "pre-game-start",
|
513
|
+
"PGEND": "pre-game-end",
|
514
|
+
'GSTR':"game-start",
|
515
|
+
"ANTHEM":"anthem",
|
516
|
+
"PSTR":"period-start",
|
517
|
+
"FAC":"faceoff",
|
518
|
+
"SHOT":"shot-on-goal",
|
519
|
+
"BLOCK":"blocked-shot",
|
520
|
+
"STOP":"stoppage",
|
521
|
+
"MISS":"missed-shot",
|
522
|
+
"HIT":"hit",
|
523
|
+
"GOAL":"goal",
|
524
|
+
"GIVE":"giveaway",
|
525
|
+
"TAKE":"takeaway",
|
526
|
+
"DELPEN":"delayed-penalty",
|
527
|
+
"PENL":"penalty",
|
528
|
+
"CHL":"challenge",
|
529
|
+
"SOC":'shootout-complete',
|
530
|
+
"PEND":"period-end",
|
531
|
+
"GEND":"game-end"
|
532
532
|
})
|
533
533
|
|
534
534
|
#Return: parsed HTML pbp
|
@@ -5,11 +5,8 @@ import wsba_hockey.data_pipelines as data
|
|
5
5
|
import numpy as np
|
6
6
|
|
7
7
|
season_load = wsba.repo_load_seasons()
|
8
|
-
|
9
8
|
select = season_load[0:3]
|
10
9
|
|
11
|
-
data.pbp(select)
|
12
|
-
|
13
10
|
#pbp = data.load_pbp_db(select)
|
14
11
|
|
15
12
|
#wsba.wsba_xG(pbp,hypertune=True,train=True,train_runs=30,cv_runs=30)
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import random
|
2
2
|
import os
|
3
|
-
import requests as rs
|
4
|
-
import pandas as pd
|
5
3
|
import asyncio
|
6
4
|
import time
|
5
|
+
import requests as rs
|
6
|
+
import pandas as pd
|
7
|
+
import matplotlib.pyplot as plt
|
7
8
|
from typing import Literal, Union
|
8
9
|
from datetime import datetime, timedelta, date
|
9
10
|
from wsba_hockey.tools.scraping import *
|
@@ -323,7 +324,7 @@ def nhl_scrape_season(season:int, split_shifts:bool = False, season_types:list[i
|
|
323
324
|
split_shifts (bool, optional):
|
324
325
|
If True, returns a dict with separate 'pbp' and 'shifts' DataFrames. Default is False.
|
325
326
|
season_types (List[int], optional):
|
326
|
-
List of season_types to include in scraping process. Default is all regular season and playoff games which are 2 and 3
|
327
|
+
List of season_types to include in scraping process. Default is all regular season and playoff games which are 2 and 3 respectively.
|
327
328
|
remove (List[str], optional):
|
328
329
|
List of event types to remove from the result. Default is an empty list.
|
329
330
|
start (str, optional):
|
@@ -632,6 +633,41 @@ def nhl_scrape_draft_rankings(arg:str = 'now', category:int = 0):
|
|
632
633
|
#Return: prospect rankings
|
633
634
|
return data
|
634
635
|
|
636
|
+
def nhl_scrape_game_info(game_ids:list[int]):
|
637
|
+
"""
|
638
|
+
Given a set of game_ids (NHL API), return information for each game.
|
639
|
+
|
640
|
+
Args:
|
641
|
+
game_ids (List[int] or ['random', int, int, int]):
|
642
|
+
List of NHL game IDs to scrape or use ['random', n, start_year, end_year] to fetch n random games.
|
643
|
+
|
644
|
+
Returns:
|
645
|
+
pd.DataFrame:
|
646
|
+
An DataFrame containing information for each game.
|
647
|
+
"""
|
648
|
+
|
649
|
+
print(f'Finding game information for games: {game_ids}')
|
650
|
+
|
651
|
+
link = 'https://api-web.nhle.com/v1/gamecenter'
|
652
|
+
|
653
|
+
#Scrape information
|
654
|
+
df = pd.concat([pd.json_normalize(rs.get(f'{link}/{game_id}/landing').json()) for game_id in game_ids])
|
655
|
+
|
656
|
+
#Add extra info
|
657
|
+
df['date'] = df['gameDate']
|
658
|
+
df['season_type'] = df['gameType']
|
659
|
+
df['away_team_abbr'] = df['awayTeam.abbrev']
|
660
|
+
df['home_team_abbr'] = df['homeTeam.abbrev']
|
661
|
+
df['game_title'] = df['away_team_abbr'] + " @ " + df['home_team_abbr'] + " - " + df['date']
|
662
|
+
df['estStartTime'] = pd.to_datetime(df['startTimeUTC']).dt.tz_convert('US/Eastern').dt.strftime("%I:%M %p")
|
663
|
+
|
664
|
+
front_col = ['id','season','date','season_type','game_title','away_team_abbr','home_team_abbr','estStartTime']
|
665
|
+
df = df[front_col+[col for col in df.columns.to_list() if col not in front_col]]
|
666
|
+
|
667
|
+
#Return: game information
|
668
|
+
return df
|
669
|
+
|
670
|
+
|
635
671
|
def nhl_apply_xG(pbp: pd.DataFrame):
|
636
672
|
"""
|
637
673
|
Given play-by-play data, return this data with xG-related columns
|
@@ -1023,7 +1059,7 @@ def nhl_calculate_stats(pbp:pd.DataFrame, type:Literal['skater','goalie','team']
|
|
1023
1059
|
season (int):
|
1024
1060
|
The NHL season formatted such as "20242025".
|
1025
1061
|
season_types (List[int], optional):
|
1026
|
-
List of season_types to include in scraping process. Default is all regular season and playoff games which are 2 and 3
|
1062
|
+
List of season_types to include in scraping process. Default is all regular season and playoff games which are 2 and 3 respectively.
|
1027
1063
|
game_strength (str or list[str]):
|
1028
1064
|
List of game strength states to include (e.g., ['5v5','5v4','4v5']).
|
1029
1065
|
split_game (bool, optional):
|
@@ -1363,19 +1399,37 @@ def nhl_plot_games(pbp:pd.DataFrame, events:list[str], strengths:Union[Literal['
|
|
1363
1399
|
#Return: list of plotted game events
|
1364
1400
|
return game_plots
|
1365
1401
|
|
1366
|
-
def repo_load_rosters(seasons = []):
|
1367
|
-
|
1368
|
-
|
1402
|
+
def repo_load_rosters(seasons:list[int] = []):
|
1403
|
+
"""
|
1404
|
+
Returns roster data from repository
|
1405
|
+
|
1406
|
+
Args:
|
1407
|
+
seasons (list[int], optional):
|
1408
|
+
A DataFrame containing play-by-play event data.
|
1409
|
+
|
1410
|
+
Returns:
|
1411
|
+
pd.DataFrame:
|
1412
|
+
A DataFrame containing roster data for supplied seasons.
|
1413
|
+
"""
|
1369
1414
|
|
1370
1415
|
data = pd.read_csv(DEFAULT_ROSTER)
|
1371
|
-
if
|
1416
|
+
if not seasons:
|
1372
1417
|
data = data.loc[data['season'].isin(seasons)]
|
1373
1418
|
|
1374
1419
|
return data
|
1375
1420
|
|
1376
|
-
def repo_load_schedule(seasons = []):
|
1377
|
-
|
1378
|
-
|
1421
|
+
def repo_load_schedule(seasons:list[int] = []):
|
1422
|
+
"""
|
1423
|
+
Returns schedule data from repository
|
1424
|
+
|
1425
|
+
Args:
|
1426
|
+
seasons (list[int], optional):
|
1427
|
+
A DataFrame containing play-by-play event data.
|
1428
|
+
|
1429
|
+
Returns:
|
1430
|
+
pd.DataFrame:
|
1431
|
+
A DataFrame containing the schedule data for the specified season and date range.
|
1432
|
+
"""
|
1379
1433
|
|
1380
1434
|
data = pd.read_csv(SCHEDULE_PATH)
|
1381
1435
|
if len(seasons)>0:
|
@@ -1384,12 +1438,30 @@ def repo_load_schedule(seasons = []):
|
|
1384
1438
|
return data
|
1385
1439
|
|
1386
1440
|
def repo_load_teaminfo():
|
1387
|
-
|
1441
|
+
"""
|
1442
|
+
Returns team data from repository
|
1443
|
+
|
1444
|
+
Args:
|
1445
|
+
|
1446
|
+
Returns:
|
1447
|
+
pd.DataFrame:
|
1448
|
+
A DataFrame containing general team information.
|
1449
|
+
"""
|
1388
1450
|
|
1389
1451
|
return pd.read_csv(INFO_PATH)
|
1390
1452
|
|
1391
|
-
def repo_load_pbp(seasons = []):
|
1392
|
-
|
1453
|
+
def repo_load_pbp(seasons:list = []):
|
1454
|
+
"""
|
1455
|
+
Returns play-by-play data from repository
|
1456
|
+
|
1457
|
+
Args:
|
1458
|
+
seasons (List[int], optional):
|
1459
|
+
The NHL season formatted such as "20242025".
|
1460
|
+
Returns:
|
1461
|
+
pd.DataFrame:
|
1462
|
+
A DataFrame containing full play-by-play data for the selected season.
|
1463
|
+
"""
|
1464
|
+
#
|
1393
1465
|
# param 'seasons' - list of seasons to include
|
1394
1466
|
|
1395
1467
|
#Add parquet to total
|
@@ -1399,6 +1471,209 @@ def repo_load_pbp(seasons = []):
|
|
1399
1471
|
return pd.concat(dfs)
|
1400
1472
|
|
1401
1473
|
def repo_load_seasons():
|
1402
|
-
|
1474
|
+
"""
|
1475
|
+
Returns list of available seasons
|
1476
|
+
|
1477
|
+
Args:
|
1478
|
+
|
1479
|
+
Returns:
|
1480
|
+
pd.DataFrame:
|
1481
|
+
A DataFrame containing a list of seasons available in the WSBA Hockey package.
|
1482
|
+
"""
|
1403
1483
|
|
1404
1484
|
return SEASONS
|
1485
|
+
|
1486
|
+
## CLASSES ##
|
1487
|
+
class NHL_Database:
|
1488
|
+
"""
|
1489
|
+
A class for managing and analyzing NHL play-by-play data.
|
1490
|
+
|
1491
|
+
This class supports game scraping, filtering, stat calculation, and plotting.
|
1492
|
+
It initializes with either a provided list of game IDs or a default/random set.
|
1493
|
+
|
1494
|
+
Attributes:
|
1495
|
+
name (str):
|
1496
|
+
Designated name of the database.
|
1497
|
+
pbp (pd.DataFrame):
|
1498
|
+
Combined play-by-play data for selected games.
|
1499
|
+
games (list[int]):
|
1500
|
+
Unique game IDs currently in the dataset.
|
1501
|
+
stats (dict[str, dict[str, pd.DataFrame]]):
|
1502
|
+
Dictionary storing calculated stats by type and name.
|
1503
|
+
plots (dict[int, matplotlib.figure.Figure]):
|
1504
|
+
Dictionary storing plot outputs keyed by game or event.
|
1505
|
+
|
1506
|
+
Args:
|
1507
|
+
game_ids (list[int], optional):
|
1508
|
+
List of game IDs to scrape initially.
|
1509
|
+
pbp (pd.DataFrame, optional):
|
1510
|
+
Existing PBP DataFrame to load instead of scraping.
|
1511
|
+
"""
|
1512
|
+
|
1513
|
+
def __init__(self, name:str, game_ids:list[int] = [], pbp:pd.DataFrame = pd.DataFrame()):
|
1514
|
+
"""
|
1515
|
+
Initialize the WSBA_Database with scraped or preloaded PBP data.
|
1516
|
+
|
1517
|
+
If no `pbp` is provided and `game_ids` is empty, a random set of games will be scraped.
|
1518
|
+
|
1519
|
+
Args:
|
1520
|
+
name (str):
|
1521
|
+
Name of database.
|
1522
|
+
game_ids (list[int], optional):
|
1523
|
+
List of NHL game IDs to scrape in initialization.
|
1524
|
+
pbp (pd.DataFrame, optional):
|
1525
|
+
Existing play-by-play data to initialization.
|
1526
|
+
|
1527
|
+
Returns:
|
1528
|
+
pd.DataFrame:
|
1529
|
+
The initialized play-by-play dataset.
|
1530
|
+
"""
|
1531
|
+
|
1532
|
+
print('Initializing database...')
|
1533
|
+
self.name = name
|
1534
|
+
|
1535
|
+
if game_ids:
|
1536
|
+
self.pbp = nhl_scrape_game(game_ids)
|
1537
|
+
else:
|
1538
|
+
self.pbp = nhl_scrape_game(['random',3,2010,2024]) if pbp.empty else pbp
|
1539
|
+
|
1540
|
+
self.games = self.pbp['game_id'].drop_duplicates().to_list()
|
1541
|
+
self.stats = {}
|
1542
|
+
self.plots = {}
|
1543
|
+
|
1544
|
+
def add_games(self, game_ids:list[int]):
|
1545
|
+
"""
|
1546
|
+
Add additional games to the existing play-by-play dataset.
|
1547
|
+
|
1548
|
+
Args:
|
1549
|
+
game_ids (list[int]):
|
1550
|
+
List of game IDs to scrape and append.
|
1551
|
+
|
1552
|
+
Returns:
|
1553
|
+
pd.DataFrame:
|
1554
|
+
The updated play-by-play dataset.
|
1555
|
+
"""
|
1556
|
+
|
1557
|
+
print('Adding games...')
|
1558
|
+
self.pbp = pd.concat([self.pbp,wsba.nhl_scrape_game(game_ids)])
|
1559
|
+
|
1560
|
+
return self.pbp
|
1561
|
+
|
1562
|
+
def select_games(self, game_ids:list[int]):
|
1563
|
+
"""
|
1564
|
+
Return a filtered subset of the PBP data for specific games.
|
1565
|
+
|
1566
|
+
Args:
|
1567
|
+
game_ids (list[int]):
|
1568
|
+
List of game IDs to include.
|
1569
|
+
|
1570
|
+
Returns:
|
1571
|
+
pd.DataFrame:
|
1572
|
+
Filtered PBP data matching the selected games.
|
1573
|
+
"""
|
1574
|
+
|
1575
|
+
print('Selecting games...')
|
1576
|
+
|
1577
|
+
df = self.pbp
|
1578
|
+
return df.loc[df['game_id'].isin(game_ids)]
|
1579
|
+
|
1580
|
+
def add_stats(self, name:str, type:Literal['skater','goalie','team'], season_types:list[int], game_strength: Union[Literal['all'], list[str]], split_game:bool = False, roster_path:str = DEFAULT_ROSTER, shot_impact:bool = False):
|
1581
|
+
"""
|
1582
|
+
Calculate and store statistics for the given play-by-play data.
|
1583
|
+
|
1584
|
+
Args:
|
1585
|
+
name (str):
|
1586
|
+
Key name to store the results under.
|
1587
|
+
type (Literal['skater', 'goalie', 'team']):
|
1588
|
+
Type of statistics to calculate. Must be one of 'skater', 'goalie', or 'team'.
|
1589
|
+
season (int):
|
1590
|
+
The NHL season formatted such as "20242025".
|
1591
|
+
season_types (List[int], optional):
|
1592
|
+
List of season_types to include in scraping process. Default is all regular season and playoff games which are 2 and 3 respectively.
|
1593
|
+
game_strength (str or list[str]):
|
1594
|
+
List of game strength states to include (e.g., ['5v5','5v4','4v5']).
|
1595
|
+
split_game (bool, optional):
|
1596
|
+
If True, aggregates stats separately for each game; otherwise, stats are aggregated across all games. Default is False.
|
1597
|
+
roster_path (str, optional):
|
1598
|
+
File path to the roster data used for mapping players and teams.
|
1599
|
+
shot_impact (bool, optional):
|
1600
|
+
If True, applies shot impact metrics to the stats DataFrame. Default is False.
|
1601
|
+
|
1602
|
+
Returns:
|
1603
|
+
pd.DataFrame:
|
1604
|
+
The calculated statistics.
|
1605
|
+
"""
|
1606
|
+
|
1607
|
+
df = wsba.nhl_calculate_stats(self.pbp, type, season_types, game_strength, split_game, roster_path, shot_impact)
|
1608
|
+
self.stats.update({type:{name:df}})
|
1609
|
+
|
1610
|
+
return df
|
1611
|
+
|
1612
|
+
def add_game_plots(self, events:list[str], strengths:Union[Literal['all'], list[str]], game_ids: Union[Literal['all'], list[int]] = 'all', marker_dict:dict = event_markers, team_colors:dict = {'away':'primary','home':'primary'}, legend:bool = False):
|
1613
|
+
"""
|
1614
|
+
Generate visualizations of game events based on play-by-play data.
|
1615
|
+
|
1616
|
+
Args:
|
1617
|
+
events (list[str]):
|
1618
|
+
List of event types to include in the plot (e.g., ['shot-on-goal', 'goal']).
|
1619
|
+
strengths (str or list[str]):
|
1620
|
+
List of game strength states to include (e.g., ['5v5','5v4','4v5']).
|
1621
|
+
game_ids (str or list[int]):
|
1622
|
+
List of game IDs to plot. If set to 'all', plots will be generated for all games in the DataFrame.
|
1623
|
+
marker_dict (dict[str, dict]):
|
1624
|
+
Dictionary mapping event types to marker styles and/or colors used in plotting.
|
1625
|
+
legend (bool):
|
1626
|
+
Whether to include a legend on the plots.
|
1627
|
+
|
1628
|
+
Returns:
|
1629
|
+
dict[int, matplotlib.figure.Figure]:
|
1630
|
+
A dictionary mapping each game ID to its corresponding matplotlib event plot figure.
|
1631
|
+
"""
|
1632
|
+
|
1633
|
+
self.plots.update(nhl_plot_games(self.pbp, events, strengths, game_ids, marker_dict, team_colors, legend))
|
1634
|
+
|
1635
|
+
return self.plots
|
1636
|
+
|
1637
|
+
def export_data(self, path:str = ''):
|
1638
|
+
"""
|
1639
|
+
Export the data within the object to a specified directory.
|
1640
|
+
|
1641
|
+
The method writes:
|
1642
|
+
- The full play-by-play DataFrame to a CSV file.
|
1643
|
+
- All calculated statistics by type and name to CSV files in subfolders.
|
1644
|
+
- All stored plots to PNG files.
|
1645
|
+
|
1646
|
+
If no path is provided, exports to a folder named after the database (`self.name/`).
|
1647
|
+
|
1648
|
+
Args:
|
1649
|
+
path (str, optional):
|
1650
|
+
Root folder to export data into. Defaults to `self.name/`.
|
1651
|
+
"""
|
1652
|
+
|
1653
|
+
print('Exporting data...')
|
1654
|
+
start = time.perf_counter()
|
1655
|
+
|
1656
|
+
# Use default path if none provided
|
1657
|
+
path = f'{self.name}/' if path == '' else os.path.join(path,f'{self.name}')
|
1658
|
+
os.makedirs(path, exist_ok=True)
|
1659
|
+
|
1660
|
+
# Export master PBP
|
1661
|
+
self.pbp.to_csv(os.path.join(path, 'pbp.csv'), index=False)
|
1662
|
+
|
1663
|
+
# Export stats
|
1664
|
+
for stat_type in self.stats.keys():
|
1665
|
+
for name, df in self.stats[stat_type].items():
|
1666
|
+
stat_path = os.path.join(path, 'stats', stat_type)
|
1667
|
+
os.makedirs(stat_path, exist_ok=True)
|
1668
|
+
df.to_csv(os.path.join(stat_path, f'{name}.csv'), index=False)
|
1669
|
+
|
1670
|
+
# Export plots
|
1671
|
+
plot_path = os.path.join(path, 'plots')
|
1672
|
+
os.makedirs(plot_path, exist_ok=True)
|
1673
|
+
for game_id, plot in self.plots.items():
|
1674
|
+
plot[0].savefig(os.path.join(plot_path, f'{game_id}.png'))
|
1675
|
+
|
1676
|
+
# Completion message
|
1677
|
+
end = time.perf_counter()
|
1678
|
+
length = end - start
|
1679
|
+
print(f"...finished in {length:.2f} {'seconds' if length < 60 else 'minutes'}.")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: wsba_hockey
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.9
|
4
4
|
Summary: WeakSide Breakout's complete Python package of access to hockey data, primairly including the scraping of National Hockey League schedule, play-by-play, and shifts information.
|
5
5
|
Author-email: Owen Singh <owenbksingh@gmail.com>
|
6
6
|
Project-URL: Homepage, https://github.com/owensingh38/wsba_hockey/
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import pandas as pd
|
2
|
+
import matplotlib.pyplot as plt
|
3
|
+
import wsba_hockey as wsba
|
4
|
+
|
5
|
+
### WSBA HOCKEY ###
|
6
|
+
## Provided below are some tests of package capabilities
|
7
|
+
|
8
|
+
#Standings Scraping
|
9
|
+
wsba.nhl_scrape_standings(20222023).to_csv('tests/samples/sample_standings.csv',index=False)
|
10
|
+
|
11
|
+
#WSBA_Database Testing
|
12
|
+
# Play-by-Play Scraping
|
13
|
+
# Sample skater stats for game
|
14
|
+
# Plot shots in games from test data
|
15
|
+
|
16
|
+
db = wsba.NHL_Database('sample_db')
|
17
|
+
db.add_games([2021020045])
|
18
|
+
db.add_stats('sample_skater_stats','skater',[2,3],['5v5'])
|
19
|
+
db.add_game_plots(['missed-shot','shot-on-goal','goal'],['5v5'])
|
20
|
+
db.export_data('tests/samples/')
|
@@ -1 +0,0 @@
|
|
1
|
-
from wsba_hockey.wsba_main import nhl_scrape_game,nhl_scrape_schedule,nhl_scrape_season,nhl_scrape_seasons_info,nhl_scrape_standings,nhl_scrape_roster,nhl_scrape_draft_rankings,nhl_scrape_prospects,nhl_calculate_stats,nhl_apply_xG,nhl_plot_skaters_shots,nhl_plot_games,repo_load_rosters,repo_load_schedule,repo_load_teaminfo,repo_load_pbp,repo_load_seasons
|
wsba_hockey-1.1.8/tests/tests.py
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
import pandas as pd
|
2
|
-
import matplotlib.pyplot as plt
|
3
|
-
import wsba_hockey as wsba
|
4
|
-
|
5
|
-
### WSBA HOCKEY ###
|
6
|
-
## Provided below are some tests of package capabilities
|
7
|
-
|
8
|
-
#Standings Scraping
|
9
|
-
wsba.nhl_scrape_standings(20222023).to_csv('samples/sample_standings.csv',index=False)
|
10
|
-
|
11
|
-
#Play-by-Play Scraping
|
12
|
-
pbp = wsba.nhl_scrape_game(['random',3,2010,2024],remove=[])
|
13
|
-
pbp.to_csv('tests/samples/sample_pbp.csv',index=False)
|
14
|
-
|
15
|
-
#Sample skater stats for game
|
16
|
-
wsba.nhl_calculate_stats(pbp,type='skater',season_types=[2],game_strength=['5v5']).to_csv('tests/samples/sample_stats.csv',index=False)
|
17
|
-
|
18
|
-
#Plot shots in games from test data
|
19
|
-
plots = wsba.nhl_plot_games(pbp,['shot-on-goal','missed-shot','goal'],['5v5'])
|
20
|
-
|
21
|
-
for game_id,plot in plots.items():
|
22
|
-
plot[0].savefig(f'tests/samples/plots/{game_id}.png')
|
23
|
-
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|