TopDownHockey-Scraper 6.0.4__py3-none-any.whl → 6.0.6__py3-none-any.whl
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.
Potentially problematic release.
This version of TopDownHockey-Scraper might be problematic. Click here for more details.
- TopDownHockey_Scraper/TopDownHockey_NHL_Scraper.py +2 -12
- {topdownhockey_scraper-6.0.4.dist-info → topdownhockey_scraper-6.0.6.dist-info}/METADATA +1 -1
- topdownhockey_scraper-6.0.6.dist-info/RECORD +7 -0
- topdownhockey_scraper-6.0.4.dist-info/RECORD +0 -7
- {topdownhockey_scraper-6.0.4.dist-info → topdownhockey_scraper-6.0.6.dist-info}/WHEEL +0 -0
- {topdownhockey_scraper-6.0.4.dist-info → topdownhockey_scraper-6.0.6.dist-info}/licenses/LICENSE +0 -0
- {topdownhockey_scraper-6.0.4.dist-info → topdownhockey_scraper-6.0.6.dist-info}/top_level.txt +0 -0
|
@@ -834,8 +834,6 @@ def scrape_html_shifts(season, game_id, live = True):
|
|
|
834
834
|
|
|
835
835
|
home_shifts = alldf
|
|
836
836
|
|
|
837
|
-
home_shifts.to_csv('/Users/patrickbacon/compact_topdownhockey/home_shifts.csv', index = False)
|
|
838
|
-
|
|
839
837
|
if live == True:
|
|
840
838
|
|
|
841
839
|
home_shifts = home_shifts.assign(shift_number = home_shifts.shift_number.astype(int))
|
|
@@ -956,8 +954,6 @@ def scrape_html_shifts(season, game_id, live = True):
|
|
|
956
954
|
|
|
957
955
|
away_shifts = alldf
|
|
958
956
|
|
|
959
|
-
away_shifts.to_csv('/Users/patrickbacon/compact_topdownhockey/away_shifts.csv', index = False)
|
|
960
|
-
|
|
961
957
|
if live == True:
|
|
962
958
|
|
|
963
959
|
away_shifts = away_shifts.assign(shift_number = away_shifts.shift_number.astype(int))
|
|
@@ -1108,8 +1104,6 @@ def scrape_html_shifts(season, game_id, live = True):
|
|
|
1108
1104
|
global all_shifts
|
|
1109
1105
|
|
|
1110
1106
|
all_shifts = pd.concat([home_shifts, away_shifts])
|
|
1111
|
-
|
|
1112
|
-
#all_shifts.to_csv('/Users/patrickbacon/compact_topdownhockey/all_shifts.csv', index = False)
|
|
1113
1107
|
|
|
1114
1108
|
all_shifts = all_shifts.assign(start_time = all_shifts.shift_start.str.split('/').str[0])
|
|
1115
1109
|
|
|
@@ -1359,7 +1353,6 @@ def scrape_html_shifts(season, game_id, live = True):
|
|
|
1359
1353
|
global changes_on
|
|
1360
1354
|
global changes_off
|
|
1361
1355
|
myshifts = all_shifts
|
|
1362
|
-
#myshifts.to_csv('/Users/patrickbacon/compact_topdownhockey/tmp.csv', index = False)
|
|
1363
1356
|
#print('Printing my shifts')
|
|
1364
1357
|
|
|
1365
1358
|
#print(myshifts)
|
|
@@ -2080,8 +2073,6 @@ def merge_and_prepare(events, shifts):
|
|
|
2080
2073
|
np.where(merged.event.isin(['PGSTR', 'PGEND', 'PSTR', 'PEND', 'ANTHEM']), -1, 1))).sort_values(
|
|
2081
2074
|
by = ['game_seconds', 'period', 'event_index'])
|
|
2082
2075
|
|
|
2083
|
-
merged.to_csv('/Users/patrickbacon/compact_topdownhockey/first_merged.csv', index = False)
|
|
2084
|
-
|
|
2085
2076
|
merged = merged.assign(change_before_event = np.where(
|
|
2086
2077
|
(
|
|
2087
2078
|
(merged.away_on_ice!='') & (merged.event.shift()=='CHANGE') & (merged.away_on_ice!=merged.away_on_ice.shift()) |
|
|
@@ -2465,7 +2456,7 @@ def full_scrape_1by1(game_id_list, live = False, shift_to_espn = True):
|
|
|
2465
2456
|
# If all goes well with the HTML scrape:
|
|
2466
2457
|
|
|
2467
2458
|
try:
|
|
2468
|
-
event_coords = scrape_api_events(game_id, shift_to_espn =
|
|
2459
|
+
event_coords = scrape_api_events(game_id, shift_to_espn = True)
|
|
2469
2460
|
api_coords = event_coords
|
|
2470
2461
|
api_coords['coordinate_source'] = 'api'
|
|
2471
2462
|
if len(event_coords[(event_coords.event.isin(ewc)) & (pd.isna(event_coords.coords_x))]) > 0:
|
|
@@ -2528,7 +2519,7 @@ def full_scrape_1by1(game_id_list, live = False, shift_to_espn = True):
|
|
|
2528
2519
|
print('Scraping ESPN IDs')
|
|
2529
2520
|
espn_id = scrape_espn_ids_single_game(str(game_date.date()), espn_home_team, espn_away_team).espn_id.iloc[0]
|
|
2530
2521
|
print('Scraping ESPN Events')
|
|
2531
|
-
print('Here is the ESPN ID:' espn_id)
|
|
2522
|
+
print('Here is the ESPN ID:', espn_id)
|
|
2532
2523
|
event_coords = scrape_espn_events(int(espn_id))
|
|
2533
2524
|
event_coords['coordinate_source'] = 'espn'
|
|
2534
2525
|
events = single.merge(event_coords, on = ['event_player_1', 'game_seconds', 'period', 'version', 'event'], how = 'left').drop(columns = ['espn_id'])
|
|
@@ -2830,7 +2821,6 @@ def full_scrape(game_id_list, live = True, shift = False):
|
|
|
2830
2821
|
)
|
|
2831
2822
|
except Exception as e:
|
|
2832
2823
|
print(e)
|
|
2833
|
-
continue
|
|
2834
2824
|
|
|
2835
2825
|
# Don't even need this, we've had this problem with Stutzle for years, just let it be.
|
|
2836
2826
|
# df.event_description = df.event_description.str.replace('FEHÃ\x89RVÃ\x81RY', 'FEHERVARY').str.replace('BLÃMEL', 'BLAMEL')
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
TopDownHockey_Scraper/TopDownHockey_EliteProspects_Scraper.py,sha256=j-7gTk-cp_0LyZihNxm67xH9KdA3Fx4xrFKKu3-9-rU,42245
|
|
2
|
+
TopDownHockey_Scraper/TopDownHockey_NHL_Scraper.py,sha256=WjxE2YormwL9AEH1uLLu3QwlrRGJp71Dhm-E76QF-1w,163353
|
|
3
|
+
topdownhockey_scraper-6.0.6.dist-info/licenses/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
|
|
4
|
+
topdownhockey_scraper-6.0.6.dist-info/METADATA,sha256=SqmRjZmvdxf5K8edOZiQhYWf1wUHF6qaK-6P0bRf4wg,5670
|
|
5
|
+
topdownhockey_scraper-6.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
+
topdownhockey_scraper-6.0.6.dist-info/top_level.txt,sha256=PBd96GLGFq97ZDLd7_4ZCx8_ZFr_wdWKs5SIpGl5xCs,22
|
|
7
|
+
topdownhockey_scraper-6.0.6.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
TopDownHockey_Scraper/TopDownHockey_EliteProspects_Scraper.py,sha256=j-7gTk-cp_0LyZihNxm67xH9KdA3Fx4xrFKKu3-9-rU,42245
|
|
2
|
-
TopDownHockey_Scraper/TopDownHockey_NHL_Scraper.py,sha256=EZBcSXt9euNVky8pye_JDFk9asXGOfumcr1VUdsyXQs,163862
|
|
3
|
-
topdownhockey_scraper-6.0.4.dist-info/licenses/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
|
|
4
|
-
topdownhockey_scraper-6.0.4.dist-info/METADATA,sha256=-rdPw0MmjyxVL1TkkSnEnw2TDEKCn2ukUdej-Z7fdcA,5670
|
|
5
|
-
topdownhockey_scraper-6.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
-
topdownhockey_scraper-6.0.4.dist-info/top_level.txt,sha256=PBd96GLGFq97ZDLd7_4ZCx8_ZFr_wdWKs5SIpGl5xCs,22
|
|
7
|
-
topdownhockey_scraper-6.0.4.dist-info/RECORD,,
|
|
File without changes
|
{topdownhockey_scraper-6.0.4.dist-info → topdownhockey_scraper-6.0.6.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{topdownhockey_scraper-6.0.4.dist-info → topdownhockey_scraper-6.0.6.dist-info}/top_level.txt
RENAMED
|
File without changes
|