wsba-hockey 1.2.3__py3-none-any.whl → 1.2.4__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.
- wsba_hockey/tools/columns.py +31 -1
- wsba_hockey/wsba_main.py +8 -1
- {wsba_hockey-1.2.3.dist-info → wsba_hockey-1.2.4.dist-info}/METADATA +1 -1
- {wsba_hockey-1.2.3.dist-info → wsba_hockey-1.2.4.dist-info}/RECORD +7 -7
- {wsba_hockey-1.2.3.dist-info → wsba_hockey-1.2.4.dist-info}/WHEEL +0 -0
- {wsba_hockey-1.2.3.dist-info → wsba_hockey-1.2.4.dist-info}/licenses/LICENSE +0 -0
- {wsba_hockey-1.2.3.dist-info → wsba_hockey-1.2.4.dist-info}/top_level.txt +0 -0
wsba_hockey/tools/columns.py
CHANGED
@@ -4,7 +4,9 @@
|
|
4
4
|
def col_map():
|
5
5
|
return {
|
6
6
|
'schedule':{
|
7
|
+
'season':'season',
|
7
8
|
'id':'game_id',
|
9
|
+
'game_title':'game_title',
|
8
10
|
'game_date':'game_date',
|
9
11
|
'gameType':'season_type',
|
10
12
|
'neutralSite':'neutral_site',
|
@@ -155,7 +157,35 @@ def col_map():
|
|
155
157
|
"placeName.default": "place_name",
|
156
158
|
"teamName.default": "team_name",
|
157
159
|
"teamCommonName.default": "team_common_name",
|
158
|
-
"teamAbbrev.default": "team_abbr"
|
160
|
+
"teamAbbrev.default": "team_abbr",
|
161
|
+
"seriesUrl": "series_url",
|
162
|
+
"seriesTitle": "series_title",
|
163
|
+
"seriesAbbrev": "series_abbrev",
|
164
|
+
"seriesLetter": "series_letter",
|
165
|
+
"playoffRound": "playoff_round",
|
166
|
+
"topSeedRank": "top_seed_rank",
|
167
|
+
"topSeedRankAbbrev": "top_seed_rank_abbr",
|
168
|
+
"topSeedWins": "top_seed_wins",
|
169
|
+
"bottomSeedRank": "bottom_seed_rank",
|
170
|
+
"bottomSeedRankAbbrev": "bottom_seed_rank_abbr",
|
171
|
+
"bottomSeedWins": "bottom_seed_wins",
|
172
|
+
"winningTeamId": "winning_team_id",
|
173
|
+
"losingTeamId": "losing_team_id",
|
174
|
+
"topSeedTeam.id": "top_seed_team_id",
|
175
|
+
"topSeedTeam.abbrev": "top_seed_team_abbr",
|
176
|
+
"topSeedTeam.name.default": "top_seed_team_name",
|
177
|
+
"topSeedTeam.commonName.default": "top_seed_team_common_name",
|
178
|
+
"topSeedTeam.placeNameWithPreposition.default": "top_seed_team_place_name",
|
179
|
+
"topSeedTeam.logo": "top_seed_team_logo",
|
180
|
+
"topSeedTeam.darkLogo": "top_seed_team_dark_logo",
|
181
|
+
"bottomSeedTeam.id": "bottom_seed_team_id",
|
182
|
+
"bottomSeedTeam.abbrev": "bottom_seed_team_abbr",
|
183
|
+
"bottomSeedTeam.name.default": "bottom_seed_team_name",
|
184
|
+
"bottomSeedTeam.commonName.default": "bottom_seed_team_common_name",
|
185
|
+
"bottomSeedTeam.placeNameWithPreposition.default": "bottom_seed_team_place_name",
|
186
|
+
"bottomSeedTeam.logo": "bottom_seed_team_logo",
|
187
|
+
"bottomSeedTeam.darkLogo": "bottom_seed_team_dark_logo",
|
188
|
+
"seriesLogo": "series_logo",
|
159
189
|
},
|
160
190
|
'roster':{
|
161
191
|
"id": "player_id",
|
wsba_hockey/wsba_main.py
CHANGED
@@ -504,8 +504,11 @@ def nhl_scrape_standings(arg:int | list[int] | Literal['now'] = 'now', season_ty
|
|
504
504
|
data = rs.get(api).json()['series']
|
505
505
|
dfs.append(pd.json_normalize(data))
|
506
506
|
|
507
|
+
#Combine and standardize columns
|
508
|
+
df = pd.concat(dfs).rename(columns=COL_MAP['standings'])
|
509
|
+
|
507
510
|
#Return: playoff bracket
|
508
|
-
return
|
511
|
+
return df[[col for col in COL_MAP['standings'].values() if col in df.columns]]
|
509
512
|
|
510
513
|
else:
|
511
514
|
if arg == "now":
|
@@ -664,6 +667,10 @@ def nhl_scrape_player_info(player_ids:list[int]):
|
|
664
667
|
"""
|
665
668
|
|
666
669
|
print(f'Retreiving player information for {player_ids}...')
|
670
|
+
|
671
|
+
#Wrap game_id in a list if only a single game_id is provided
|
672
|
+
player_ids = [player_ids] if type(player_ids) != list else player_ids
|
673
|
+
|
667
674
|
infos = []
|
668
675
|
for player_id in player_ids:
|
669
676
|
player_id = int(player_id)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: wsba_hockey
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.4
|
4
4
|
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.
|
5
5
|
Author-email: Owen Singh <owenbksingh@gmail.com>
|
6
6
|
Project-URL: Homepage, https://github.com/owensingh38/wsba_hockey/
|
@@ -1,8 +1,8 @@
|
|
1
1
|
wsba_hockey/__init__.py,sha256=DozjAXICrGwXBCF1ej2rgRZw6BtYtNimLqddD0gO4gM,595
|
2
|
-
wsba_hockey/wsba_main.py,sha256=
|
2
|
+
wsba_hockey/wsba_main.py,sha256=BvDcMv3SwlvCbuJgsAf2qo0naZ8v27ErPyDP09DIylU,76187
|
3
3
|
wsba_hockey/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
wsba_hockey/tools/agg.py,sha256=OkIYd-ApvGVYe2JJLOI21jnDIN5LH8nkeH7eo0reWFI,23364
|
5
|
-
wsba_hockey/tools/columns.py,sha256=
|
5
|
+
wsba_hockey/tools/columns.py,sha256=S3956AVFGMyXdk86ssQqJrwQC-N7tWT3PQ_884W33w8,14020
|
6
6
|
wsba_hockey/tools/game_pred.py,sha256=OGh6o1vIcyLUixU80hOO0RPGNmDSY1cvvCNZFcP0wL4,1308
|
7
7
|
wsba_hockey/tools/plotting.py,sha256=Ix-Kj-FEP4_uwSwyb5lIRj3tOFdO1z7XUjWManAkY24,6013
|
8
8
|
wsba_hockey/tools/scraping.py,sha256=6_GyF8o56fuijTosm4x4OSrvpL61ZygluK2A26XajqU,52246
|
@@ -10,8 +10,8 @@ wsba_hockey/tools/xg_model.py,sha256=rY6D1YMuSZkORqHd8ZCp-2gBmH9KUG0DoyHEiXpzWlg
|
|
10
10
|
wsba_hockey/tools/archive/old_scraping.py,sha256=hEjMI1RtfeZnf0RBiJFI38oXkLZ3WofeH5xqcF4pzgM,49585
|
11
11
|
wsba_hockey/tools/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
12
|
wsba_hockey/tools/utils/shared.py,sha256=KxeQVttGem73yncAlnuZvTclqpJpoerTKtLusRh5zsk,2472
|
13
|
-
wsba_hockey-1.2.
|
14
|
-
wsba_hockey-1.2.
|
15
|
-
wsba_hockey-1.2.
|
16
|
-
wsba_hockey-1.2.
|
17
|
-
wsba_hockey-1.2.
|
13
|
+
wsba_hockey-1.2.4.dist-info/licenses/LICENSE,sha256=Nr_Um1Pd5FQJTWWgm7maZArdtYMbDhzXYSwyJIZDGik,1114
|
14
|
+
wsba_hockey-1.2.4.dist-info/METADATA,sha256=ObmBmiBvwQ3KIk17J0ydi5D2j-ovatxGbj51ksY47qw,3592
|
15
|
+
wsba_hockey-1.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
16
|
+
wsba_hockey-1.2.4.dist-info/top_level.txt,sha256=acU7s3x-RZC1zGiqCOmO0g267iqCg34lzIfdmYxxGmQ,12
|
17
|
+
wsba_hockey-1.2.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|