patrickramos commited on
Commit
aea1a40
·
1 Parent(s): 332152c

Add both types of HR/FB (/FB, /OFFB)

Browse files
pitch_leaderboard.py CHANGED
@@ -41,7 +41,7 @@ def create_pitch_leaderboard(player_team_type):
41
  prefix_cols = [col for col in prefix_cols if col not in ('Pitcher', 'Throws')]
42
  theme_to_cols = {
43
  'Plate Discipline': ['Swing%', 'Z-Swing%', 'Chase%', 'Contact%', 'Z-Con%', 'O-Con%', 'SwStr%', 'Whiff%', 'CSW%', 'Strike%', 'Ball%', 'F-Str%', 'PAR%', 'PLUS%'],
44
- 'Batted Ball': ['GB%', 'FB%', 'LD%', 'OFFB%', 'IFFB%', 'AIR%', 'HR/FB'],
45
  'Approach': ['Zone%', 'Arm%', 'Glove%', 'High%', 'Low%', 'MM%', 'Behind%']
46
  }
47
 
@@ -51,7 +51,7 @@ def create_pitch_leaderboard(player_team_type):
51
  prefix_cols = [col for col in prefix_cols if col not in ('Batter', 'Bats')]
52
  theme_to_cols = {
53
  'Plate Discipline': ['Swing%', 'Z-Swing%', 'Chase%', 'Contact%', 'Z-Con%', 'O-Con%', 'SwStr%', 'Whiff%', 'CSW%', 'PLUS%'],
54
- 'Batted Ball': ['GB%', 'FB%', 'LD%', 'OFFB%', 'IFFB%', 'AIR%', 'HR/OFFB']
55
  }
56
 
57
  all_cols = prefix_cols + sum(list(theme_to_cols.values()), [])
 
41
  prefix_cols = [col for col in prefix_cols if col not in ('Pitcher', 'Throws')]
42
  theme_to_cols = {
43
  'Plate Discipline': ['Swing%', 'Z-Swing%', 'Chase%', 'Contact%', 'Z-Con%', 'O-Con%', 'SwStr%', 'Whiff%', 'CSW%', 'Strike%', 'Ball%', 'F-Str%', 'PAR%', 'PLUS%'],
44
+ 'Batted Ball': ['GB%', 'FB%', 'LD%', 'OFFB%', 'IFFB%', 'AIR%', 'HR/FB', 'HR/OFFB'],
45
  'Approach': ['Zone%', 'Arm%', 'Glove%', 'High%', 'Low%', 'MM%', 'Behind%']
46
  }
47
 
 
51
  prefix_cols = [col for col in prefix_cols if col not in ('Batter', 'Bats')]
52
  theme_to_cols = {
53
  'Plate Discipline': ['Swing%', 'Z-Swing%', 'Chase%', 'Contact%', 'Z-Con%', 'O-Con%', 'SwStr%', 'Whiff%', 'CSW%', 'PLUS%'],
54
+ 'Batted Ball': ['GB%', 'FB%', 'LD%', 'OFFB%', 'IFFB%', 'AIR%', 'HR/FB', 'HR/OFFB']
55
  }
56
 
57
  all_cols = prefix_cols + sum(list(theme_to_cols.values()), [])
player_team_leaderboard.py CHANGED
@@ -33,7 +33,7 @@ def create_player_team_leaderboard_app(player_team_type):
33
  prefix_cols = [col for col in prefix_cols if col not in ('Pitcher', 'Throws')]
34
  theme_to_cols = {
35
  'Plate Discipline': ['Swing%', 'Z-Swing%', 'Chase%', 'Contact%', 'Z-Con%', 'O-Con%', 'SwStr%', 'Whiff%', 'CSW%', 'Strike%', 'Ball%', 'F-Str%', 'PAR%', 'PLUS%'],
36
- 'Batted Ball': ['GB%', 'FB%', 'LD%', 'OFFB%', 'IFFB%', 'AIR%', 'HR%', 'HR/FB'],
37
  'Approach': ['Zone%', 'Arm%', 'Glove%', 'High%', 'Low%', 'MM%', 'Behind%', 'Sec%']
38
  }
39
  all_cols = prefix_cols + sum(list(theme_to_cols.values()), [])
@@ -46,7 +46,7 @@ def create_player_team_leaderboard_app(player_team_type):
46
  prefix_cols = [col for col in prefix_cols if col not in ('Batter', 'Bats')]
47
  theme_to_cols = {
48
  'Plate Discipline': ['Swing%', 'Z-Swing%', 'Chase%', 'Contact%', 'Z-Con%', 'O-Con%', 'SwStr%', 'Whiff%', 'CSW%', 'PLUS%'],
49
- 'Batted Ball': ['GB%', 'FB%', 'LD%', 'OFFB%', 'IFFB%', 'AIR%', 'HR%', 'HR/OFFB']
50
  }
51
  all_cols = prefix_cols + sum(list(theme_to_cols.values()), [])
52
  for theme, cols in theme_to_cols.items():
 
33
  prefix_cols = [col for col in prefix_cols if col not in ('Pitcher', 'Throws')]
34
  theme_to_cols = {
35
  'Plate Discipline': ['Swing%', 'Z-Swing%', 'Chase%', 'Contact%', 'Z-Con%', 'O-Con%', 'SwStr%', 'Whiff%', 'CSW%', 'Strike%', 'Ball%', 'F-Str%', 'PAR%', 'PLUS%'],
36
+ 'Batted Ball': ['GB%', 'FB%', 'LD%', 'OFFB%', 'IFFB%', 'AIR%', 'HR%', 'HR/FB', 'HR/OFFB'],
37
  'Approach': ['Zone%', 'Arm%', 'Glove%', 'High%', 'Low%', 'MM%', 'Behind%', 'Sec%']
38
  }
39
  all_cols = prefix_cols + sum(list(theme_to_cols.values()), [])
 
46
  prefix_cols = [col for col in prefix_cols if col not in ('Batter', 'Bats')]
47
  theme_to_cols = {
48
  'Plate Discipline': ['Swing%', 'Z-Swing%', 'Chase%', 'Contact%', 'Z-Con%', 'O-Con%', 'SwStr%', 'Whiff%', 'CSW%', 'PLUS%'],
49
+ 'Batted Ball': ['GB%', 'FB%', 'LD%', 'OFFB%', 'IFFB%', 'AIR%', 'HR%', 'HR/FB', 'HR/OFFB']
50
  }
51
  all_cols = prefix_cols + sum(list(theme_to_cols.values()), [])
52
  for theme, cols in theme_to_cols.items():