Functions to scrape ice hockey data from eliteprospects
Project description
eliteprospect_scraper
Package to scrape hockey data from eliteprospect.
Please only use collected data for personal use - there are real APIs for professional usage of eliteprospects data.
Getting started
Package can be installed with pip
pip install eliteprospect_scraper
In python, import module with
import eliteprospect.eliteprospect_scraper as ep
See description of functions in package with
help(ep)
Functions can be used together and input and output is linked.
Functions
Description of functions contained in package. Ordered in
getPlayers(league, year)
Get all players for specific year and league; returns dataframe.
- League: valid league from eliteprospects
- year: valid combination of year in format 2015-16, 2016-17 etc.
Example:
getPlayers('shl', '2015-16')
getPlayerMetadata(dfplayers)
Create dataframe with metadata by players.
Input is dataframe created with function getPlayers
getPlayerStats(playerlinks)
Create dataframe with all statistics from playerpages.
Takes series of playerlinks as input. Playerlinks are also included in return output from getPlayerMetadata
ep.getPlayerStats(["https://eliteprospects.com/player/2050/mattias-ritola"])
dataprep_players(playerstats, league_mapping, players):
help(ep)
dataprep_players(playerstats, league_mapping, players)
Takes series of playerlinks to eliteprospect-profiles,
Return dataframe with stats by player and season
How to use
See this notebook for examples of how to use the package, and in what order you can run the functions.
eliteprospect_scraper
Package to scrape hockey data from eliteprospect
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file eliteprospect_scraper-0.8-py2.py3-none-any.whl
.
File metadata
- Download URL: eliteprospect_scraper-0.8-py2.py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c99916554fa9434583092089c421941c5f9a6ef9d2eb057ab49cea282340b91 |
|
MD5 | f6d9cb71b425571f9a5bf0a44312af6d |
|
BLAKE2b-256 | 5b37452be257d6d53c5adcc9548826b815626fc8a8f5715445c8309d744fd163 |