wsba-hockey 1.2.3__tar.gz → 1.2.4__tar.gz

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.
Files changed (22) hide show
  1. {wsba_hockey-1.2.3/src/wsba_hockey.egg-info → wsba_hockey-1.2.4}/PKG-INFO +1 -1
  2. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/pyproject.toml +1 -1
  3. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/src/wsba_hockey/tools/columns.py +31 -1
  4. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/src/wsba_hockey/wsba_main.py +8 -1
  5. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4/src/wsba_hockey.egg-info}/PKG-INFO +1 -1
  6. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/LICENSE +0 -0
  7. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/README.md +0 -0
  8. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/setup.cfg +0 -0
  9. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/src/wsba_hockey/__init__.py +0 -0
  10. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/src/wsba_hockey/tools/__init__.py +0 -0
  11. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/src/wsba_hockey/tools/agg.py +0 -0
  12. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/src/wsba_hockey/tools/archive/old_scraping.py +0 -0
  13. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/src/wsba_hockey/tools/game_pred.py +0 -0
  14. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/src/wsba_hockey/tools/plotting.py +0 -0
  15. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/src/wsba_hockey/tools/scraping.py +0 -0
  16. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/src/wsba_hockey/tools/utils/__init__.py +0 -0
  17. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/src/wsba_hockey/tools/utils/shared.py +0 -0
  18. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/src/wsba_hockey/tools/xg_model.py +0 -0
  19. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/src/wsba_hockey.egg-info/SOURCES.txt +0 -0
  20. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/src/wsba_hockey.egg-info/dependency_links.txt +0 -0
  21. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/src/wsba_hockey.egg-info/top_level.txt +0 -0
  22. {wsba_hockey-1.2.3 → wsba_hockey-1.2.4}/tests/tests.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wsba_hockey
3
- Version: 1.2.3
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,6 +1,6 @@
1
1
  [project]
2
2
  name = "wsba_hockey"
3
- version = "1.2.3"
3
+ version = "1.2.4"
4
4
  authors = [
5
5
  { name="Owen Singh", email="owenbksingh@gmail.com" },
6
6
  ]
@@ -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",
@@ -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 pd.concat(dfs)
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
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/
File without changes
File without changes
File without changes
File without changes