Skip to main content

A comprehensive Python package for scraping hockey data

Project description

Hockey Scraper 🏒

A comprehensive Python package for scraping NHL hockey data with built-in analytics capabilities.

Features

  • Complete Game Data: Scrape play-by-play, shifts, rosters, and team statistics
  • Advanced Analytics: Built-in functions for Corsi, Fenwick, TOI analysis, and more
  • Multiple Data Sources: Support for NHL API and HTML sources
  • Flexible Output: Export to pandas, polars, JSON, or CSV formats
  • Async Support: Fast concurrent data collection
  • Easy to Use: Simple API with powerful customization options

Installation

pip install hockey-scraper

Quick Start

import hockey_scraper as hs

# Scrape team data
teams = hs.scrape_teams()

# Get game data with shifts
df, shifts = await hs.scrape_game_(2024020920, include_shifts=True)

# Build analytics matrix
matrix_df = hs.seconds_matrix(df, shifts)
strengths_df = hs.strengths_by_second(matrix_df)

# Get TOI analysis
toi_stats = hs.toi_by_strength_all(matrix_df, strengths_df)

License

MIT License - see LICENSE file for details.

LICENSE

MIT License

Copyright (c) 2024 Max Tixador

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Made with ❤️ for hockey analytics

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

hockey_scraper_by_max-0.0.1.dev89.tar.gz (16.3 MB view details)

Uploaded Source

Built Distribution

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

hockey_scraper_by_max-0.0.1.dev89-py3-none-any.whl (51.2 kB view details)

Uploaded Python 3

File details

Details for the file hockey_scraper_by_max-0.0.1.dev89.tar.gz.

File metadata

File hashes

Hashes for hockey_scraper_by_max-0.0.1.dev89.tar.gz
Algorithm Hash digest
SHA256 3f8b7695b7a8a7553e66a2ff2f0414b16fcb7769d12708f9e0b3f2eb09bb3a73
MD5 10979635895eff181f1411b69ef4c012
BLAKE2b-256 8629e54e5a0fd556d60a88011723036ec68f4e5b4d550b841abd22ba0fdd8f5e

See more details on using hashes here.

File details

Details for the file hockey_scraper_by_max-0.0.1.dev89-py3-none-any.whl.

File metadata

File hashes

Hashes for hockey_scraper_by_max-0.0.1.dev89-py3-none-any.whl
Algorithm Hash digest
SHA256 41f238101299f20d14d3b865d549e3f85072eb70e46b47ca39180b440867a6d0
MD5 f14b96a58147ff9319b69688241d171f
BLAKE2b-256 f1ab19ed87769dd012979a202acbdad724928ee6fe2332eebd9a6839cc42ce13

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