wsba-hockey 1.2.0__py3-none-any.whl → 1.2.1__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/wsba_main.py CHANGED
@@ -100,9 +100,7 @@ KNOWN_PROBS = {
100
100
  2009020885:'Missing shifts data for game between Sharks and Blue Jackets.',
101
101
  2010020124:'Game between Capitals and Hurricanes is sporadically missing player on-ice data',
102
102
  2012020018:'HTML events contain mislabeled events.',
103
- 2013020971:'On March 10th, 2014, Stars forward Rich Peverley suffered from a cardiac episode midgame and as a result, the remainder of the game was postponed. \nThe game resumed on April 9th, and the only goal scorer in the game, Blue Jackets forward Nathan Horton, did not appear in the resumed game due to injury. Interestingly, Horton would never play in the NHL again.',
104
103
  2018021133:'Game between Lightning and Capitals has incorrectly labeled event teams (i.e. WSH TAKEAWAY - #71 CIRELLI (Cirelli is a Tampa Bay skater in this game)).',
105
- 2019020876:'Due to the frightening collapse of Blues defensemen Jay Bouwmeester, a game on February 2nd, 2020 between the Ducks and Blues was postponed. \nWhen the game resumed, Ducks defensemen Hampus Lindholm, who assisted on a goal in the inital game, did not play in the resumed match.'
106
104
  }
107
105
 
108
106
  SHOT_TYPES = ['wrist','deflected','tip-in','slap','backhand','snap','wrap-around','poke','bat','cradle','between-legs']
@@ -1165,7 +1163,7 @@ def nhl_calculate_stats(pbp:pd.DataFrame, type:Literal['skater','goalie','team']
1165
1163
  'birthCountry':'Nationality'})
1166
1164
 
1167
1165
  #WSBA
1168
- complete['WSBA'] = complete['Goalie']+complete['Team']+complete['Season'].astype(str)
1166
+ complete['WSBA'] = complete['ID'].astype(str).str.replace('.0','')+complete['Team']+complete['Season'].astype(str)
1169
1167
 
1170
1168
  #Add player age
1171
1169
  complete['Birthday'] = pd.to_datetime(complete['Birthday'])
@@ -1306,7 +1304,7 @@ def nhl_calculate_stats(pbp:pd.DataFrame, type:Literal['skater','goalie','team']
1306
1304
  #Remove goalies that occasionally appear in a set
1307
1305
  complete = complete.loc[complete['Position']!='G']
1308
1306
  #Add WSBA ID
1309
- complete['WSBA'] = complete['Player']+complete['Season'].astype(str)+complete['Team']
1307
+ complete['WSBA'] = complete['ID'].astype(str).str.replace('.0','')+complete['Season'].astype(str)+complete['Team']
1310
1308
 
1311
1309
  #Add per 60 stats
1312
1310
  for stat in PER_SIXTY:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wsba_hockey
3
- Version: 1.2.0
3
+ Version: 1.2.1
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,5 +1,5 @@
1
1
  wsba_hockey/__init__.py,sha256=rXczecTEm4W8F9RbFmIttxpX9aqiq7PF5KNDLQVY35w,539
2
- wsba_hockey/wsba_main.py,sha256=ELWCYcXCKtKb8Ha_kKQ9_sBJsgk4_M2Y3pw45ZQJjsM,73567
2
+ wsba_hockey/wsba_main.py,sha256=ImOIOiN7Pa1P9nvBOyRlDfvMNZKA6pQcVlwaLRn0uJU,72946
3
3
  wsba_hockey/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  wsba_hockey/tools/agg.py,sha256=OkIYd-ApvGVYe2JJLOI21jnDIN5LH8nkeH7eo0reWFI,23364
5
5
  wsba_hockey/tools/plotting.py,sha256=81hBaM7tcwUNB4-tovPn7QreOUz6B2NuI_SR4-djVSk,6029
@@ -8,8 +8,8 @@ wsba_hockey/tools/xg_model.py,sha256=OqSvr1Er3zGaY6ZTBnuulBTPLO6CPhNk97SwpnkRD6M
8
8
  wsba_hockey/tools/archive/old_scraping.py,sha256=hEjMI1RtfeZnf0RBiJFI38oXkLZ3WofeH5xqcF4pzgM,49585
9
9
  wsba_hockey/tools/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  wsba_hockey/tools/utils/shared.py,sha256=KxeQVttGem73yncAlnuZvTclqpJpoerTKtLusRh5zsk,2472
11
- wsba_hockey-1.2.0.dist-info/licenses/LICENSE,sha256=Nr_Um1Pd5FQJTWWgm7maZArdtYMbDhzXYSwyJIZDGik,1114
12
- wsba_hockey-1.2.0.dist-info/METADATA,sha256=isZ9jsdKaJ0fSgtFNy65TUIyKeNbWX6pjekjzsYEgPk,3592
13
- wsba_hockey-1.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
- wsba_hockey-1.2.0.dist-info/top_level.txt,sha256=acU7s3x-RZC1zGiqCOmO0g267iqCg34lzIfdmYxxGmQ,12
15
- wsba_hockey-1.2.0.dist-info/RECORD,,
11
+ wsba_hockey-1.2.1.dist-info/licenses/LICENSE,sha256=Nr_Um1Pd5FQJTWWgm7maZArdtYMbDhzXYSwyJIZDGik,1114
12
+ wsba_hockey-1.2.1.dist-info/METADATA,sha256=FqPgksWmo2rfRSJlyvxn71SkaalXSAxBBT9p2l2L72s,3592
13
+ wsba_hockey-1.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
+ wsba_hockey-1.2.1.dist-info/top_level.txt,sha256=acU7s3x-RZC1zGiqCOmO0g267iqCg34lzIfdmYxxGmQ,12
15
+ wsba_hockey-1.2.1.dist-info/RECORD,,