wsba-hockey


Namewsba-hockey JSON
Version 1.1.9 PyPI version JSON
download
home_pageNone
SummaryWeakSide 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.
upload_time2025-07-17 21:35:55
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords wsba hockey scraping nhl analytics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # WSBA HOCKEY
![WSBA128](https://github.com/user-attachments/assets/4f349728-b99d-4e03-9d77-95cd177fefe2)

### A Python package for scraping and analyzing hockey data under the motto: ***Evaluating, analyzing, and understanding the game of hockey through the lens of different analytical methods, including incorporation of analytics.***

## INSTALLATION AND USAGE
```bash
pip install wsba_hockey
```

```python
import wsba_hockey as wsba
```

## ALL FEATURES
### Note: Features yet included are marked with *


## SCRAPING
### NHL Play-by-Play (of any game frame up to a full season)
#### Functions:

```python
wsba.nhl_scrape_game(['2024020918'],split_shifts=False,remove=['game-end'])
wsba.nhl_scrape_season('20242025',split_shifts=False,remove=['game-end'],local=True)
```

### NHL Season Information

```python
wsba.nhl_scrape_schedule('20242025')
wsba.nhl_scrape_seasons_info(seasons=['20212022','20222023','20232024','20242025'])
wsba.nhl_scrape_standings(arg = '2024-03-20')
```

### NHL Rosters and Player Information

```python
wsba.nhl_scrape_roster('20242025')
wsba.nhl_scrape_team_info()
```

### NHL Draft Rankings and Prospects

```python
wsba.nhl_scrape_draft_rankings()
wsba.nhl_scrape_prospects('BOS')
```


## DATA ANALYTICS
### Expected Goals
```python
pbp = wsba.nhl_scrape_game(['2024020918'],split_shifts=False,remove=['game-end'])
pbp = wsba.nhl_apply_xG(pbp)
```

### Goal Impacts and Shot Analysis

### Stat Aggregation
```python
pbp = wsba.nhl_scrape_season('20232024',remove=[], local = True)
wsba.nhl_calculate_stats(pbp,'skater',[2],['5v5','4v4','3v3'],shot_impact = True)
```
### Shot Plotting (Plots, Heatmaps, etc.)
```python
skater_dict = {
    'Patrice Bergeron':['20212022','BOS']
}
pbp = wsba.nhl_scrape_season('20212022',remove=[], local = True)

wsba.nhl_plot_skaters_shots(pbp,skater_dict,['5v5'],onice='for',legend=True)
wsba.nhl_plot_games(pbp,legend=True)
```

## REPOSITORY 
### Past Season Play-by-Play
```python
wsba.repo_load_pbp(seasons=['20212022','20222023','20232024','20242025'])
```
### Team Information
```python
wsba.repo_load_teaminfo()
wsba.repo_load_rosters(seasons=['20212022','20222023','20232024','20242025'])
```
### Schedule
```python
wsba.repo_load_schedule(seasons=['20212022','20222023','20232024','20242025'])
```

## ACKNOWLEDGEMENTS AND CREDITS 
### Huge thanks to the following:
Harry Shomer - Creator of the hockey_scraper package, which contains select utils functions within this package and otherwise inspires the creation of this package.

Dan Morse - Creator of the hockeyR package; another important inspiration and model for developing an NHL scraper.

Patrick Bacon - Creator of TopDownHockey package

Anyone in the NHL Public Analytics community who has stuck around and supported WeakSide Breakout Analysis hockey.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "wsba-hockey",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "wsba, hockey, scraping, NHL, analytics",
    "author": null,
    "author_email": "Owen Singh <owenbksingh@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/59/9e/d4efce84708dba7bb1349c2c0c5b4c4fe13cab3909d02e7c75ca0f8538d4/wsba_hockey-1.1.9.tar.gz",
    "platform": null,
    "description": "# WSBA HOCKEY\r\n![WSBA128](https://github.com/user-attachments/assets/4f349728-b99d-4e03-9d77-95cd177fefe2)\r\n\r\n### A Python package for scraping and analyzing hockey data under the motto: ***Evaluating, analyzing, and understanding the game of hockey through the lens of different analytical methods, including incorporation of analytics.***\r\n\r\n## INSTALLATION AND USAGE\r\n```bash\r\npip install wsba_hockey\r\n```\r\n\r\n```python\r\nimport wsba_hockey as wsba\r\n```\r\n\r\n## ALL FEATURES\r\n### Note: Features yet included are marked with *\r\n\r\n\r\n## SCRAPING\r\n### NHL Play-by-Play (of any game frame up to a full season)\r\n#### Functions:\r\n\r\n```python\r\nwsba.nhl_scrape_game(['2024020918'],split_shifts=False,remove=['game-end'])\r\nwsba.nhl_scrape_season('20242025',split_shifts=False,remove=['game-end'],local=True)\r\n```\r\n\r\n### NHL Season Information\r\n\r\n```python\r\nwsba.nhl_scrape_schedule('20242025')\r\nwsba.nhl_scrape_seasons_info(seasons=['20212022','20222023','20232024','20242025'])\r\nwsba.nhl_scrape_standings(arg = '2024-03-20')\r\n```\r\n\r\n### NHL Rosters and Player Information\r\n\r\n```python\r\nwsba.nhl_scrape_roster('20242025')\r\nwsba.nhl_scrape_team_info()\r\n```\r\n\r\n### NHL Draft Rankings and Prospects\r\n\r\n```python\r\nwsba.nhl_scrape_draft_rankings()\r\nwsba.nhl_scrape_prospects('BOS')\r\n```\r\n\r\n\r\n## DATA ANALYTICS\r\n### Expected Goals\r\n```python\r\npbp = wsba.nhl_scrape_game(['2024020918'],split_shifts=False,remove=['game-end'])\r\npbp = wsba.nhl_apply_xG(pbp)\r\n```\r\n\r\n### Goal Impacts and Shot Analysis\r\n\r\n### Stat Aggregation\r\n```python\r\npbp = wsba.nhl_scrape_season('20232024',remove=[], local = True)\r\nwsba.nhl_calculate_stats(pbp,'skater',[2],['5v5','4v4','3v3'],shot_impact = True)\r\n```\r\n### Shot Plotting (Plots, Heatmaps, etc.)\r\n```python\r\nskater_dict = {\r\n    'Patrice Bergeron':['20212022','BOS']\r\n}\r\npbp = wsba.nhl_scrape_season('20212022',remove=[], local = True)\r\n\r\nwsba.nhl_plot_skaters_shots(pbp,skater_dict,['5v5'],onice='for',legend=True)\r\nwsba.nhl_plot_games(pbp,legend=True)\r\n```\r\n\r\n## REPOSITORY \r\n### Past Season Play-by-Play\r\n```python\r\nwsba.repo_load_pbp(seasons=['20212022','20222023','20232024','20242025'])\r\n```\r\n### Team Information\r\n```python\r\nwsba.repo_load_teaminfo()\r\nwsba.repo_load_rosters(seasons=['20212022','20222023','20232024','20242025'])\r\n```\r\n### Schedule\r\n```python\r\nwsba.repo_load_schedule(seasons=['20212022','20222023','20232024','20242025'])\r\n```\r\n\r\n## ACKNOWLEDGEMENTS AND CREDITS \r\n### Huge thanks to the following:\r\nHarry Shomer - Creator of the hockey_scraper package, which contains select utils functions within this package and otherwise inspires the creation of this package.\r\n\r\nDan Morse - Creator of the hockeyR package; another important inspiration and model for developing an NHL scraper.\r\n\r\nPatrick Bacon - Creator of TopDownHockey package\r\n\r\nAnyone in the NHL Public Analytics community who has stuck around and supported WeakSide Breakout Analysis hockey.\r\n",
    "bugtrack_url": null,
    "license": null,
    "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.",
    "version": "1.1.9",
    "project_urls": {
        "Homepage": "https://github.com/owensingh38/wsba_hockey/"
    },
    "split_keywords": [
        "wsba",
        " hockey",
        " scraping",
        " nhl",
        " analytics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1d5f557a1d0d2439adfdc5e5ac937a18ef7787c5a91f7097ca529c76fc211a32",
                "md5": "f133f725847c6343b56963a156bb9ee4",
                "sha256": "fee19c583ca2e505071873e532bd32b885542555d29a344fbcf383e2cbb2d9c5"
            },
            "downloads": -1,
            "filename": "wsba_hockey-1.1.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f133f725847c6343b56963a156bb9ee4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 832035,
            "upload_time": "2025-07-17T21:35:53",
            "upload_time_iso_8601": "2025-07-17T21:35:53.989113Z",
            "url": "https://files.pythonhosted.org/packages/1d/5f/557a1d0d2439adfdc5e5ac937a18ef7787c5a91f7097ca529c76fc211a32/wsba_hockey-1.1.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "599ed4efce84708dba7bb1349c2c0c5b4c4fe13cab3909d02e7c75ca0f8538d4",
                "md5": "d0c29a1b53b9ef0585b4fabc802d5a88",
                "sha256": "8ab8b94dde756dae2855171573c0c50461cbf0e719b6b3714e8cbd133c026e68"
            },
            "downloads": -1,
            "filename": "wsba_hockey-1.1.9.tar.gz",
            "has_sig": false,
            "md5_digest": "d0c29a1b53b9ef0585b4fabc802d5a88",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 739952,
            "upload_time": "2025-07-17T21:35:55",
            "upload_time_iso_8601": "2025-07-17T21:35:55.961915Z",
            "url": "https://files.pythonhosted.org/packages/59/9e/d4efce84708dba7bb1349c2c0c5b4c4fe13cab3909d02e7c75ca0f8538d4/wsba_hockey-1.1.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-17 21:35:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "owensingh38",
    "github_project": "wsba_hockey",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "wsba-hockey"
}
        
Elapsed time: 0.72611s