-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added functionality to scrape NWHL data
- Loading branch information
1 parent
2f81359
commit 8c74c95
Showing
41 changed files
with
1,678 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
License | ||
======= | ||
.. include:: ../../LICENSE.txt |
4 changes: 2 additions & 2 deletions
4
...ld/html/_sources/scrape_functions.rst.txt → ...tml/_sources/nhl_scrape_functions.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Scraping Functions | ||
================== | ||
NHL Scraping Functions | ||
====================== | ||
|
||
Scraping | ||
-------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
NWHL Scraping Functions | ||
======================= | ||
|
||
Scraping | ||
-------- | ||
|
||
There are three ways to scrape games: | ||
|
||
\1. *Scrape by Season*: | ||
|
||
Scrape games on a season by season level (Note: A given season is referred to by the first of the two years it spans. | ||
So you would refer to the 2016-2017 season as 2016). | ||
:: | ||
|
||
import hockey_scraper | ||
|
||
# Scrapes the 2015 & 2016 season and stores the data in a Csv file (both are equivalent!!!) | ||
hockey_scraper.nwhl.scrape_seasons([2015, 2016]) | ||
hockey_scraper.nwhl.scrape_seasons([2015, 2016], data_format='Csv') | ||
|
||
# Scrapes the 2008 season and returns a Pandas DataFrame | ||
scraped_data = hockey_scraper.nwhl.scrape_seasons([2017], data_format='Pandas') | ||
|
||
|
||
\2. *Scrape by Game*: | ||
|
||
Scrape a list of games provided. | ||
:: | ||
|
||
import hockey_scraper | ||
|
||
# Scrapes games and store in a Csv file | ||
hockey_scraper.nwhl.scrape_games([14694271, 14814946, 14689491], True) | ||
|
||
# Scrapes games and return DataFrame with data | ||
scraped_data = hockey_scraper.nwhl.scrape_games([14689624, 18507470, 20575219, 22207005], data_format='Pandas') | ||
|
||
\3. *Scrape by Date Range*: | ||
|
||
Scrape all games between a specified date range. All dates must be written in a "yyyy-mm-dd" format. | ||
:: | ||
|
||
import hockey_scraper | ||
|
||
# Scrapes all games between 2016-10-10 and 2017-01-01 and returns a Pandas DataFrame containing the pbp | ||
hockey_scraper.nwhl.scrape_date_range('2016-10-10', '2017-01-01', data_format='pandas') | ||
|
||
|
||
Scrape Functions | ||
~~~~~~~~~~~~~~~~ | ||
.. automodule:: hockey_scraper.nwhl.scrape_functions | ||
:members: | ||
|
||
Html Schedule | ||
~~~~~~~~~~~~~ | ||
.. automodule:: hockey_scraper.nwhl.html_schedule | ||
:members: | ||
|
||
Json PBP | ||
~~~~~~~~ | ||
.. automodule:: hockey_scraper.nwhl.json_pbp | ||
:members: |
Oops, something went wrong.