Jon Solow commited on
Commit
fc4508d
·
1 Parent(s): 11a7309

Fix merge on game id and add additional column for grouping

Browse files
src/pages/9_Team_Formations.py CHANGED
@@ -35,6 +35,12 @@ def get_page():
35
  ]
36
  group_options = [
37
  "week",
 
 
 
 
 
 
38
  "possession_team",
39
  "offense_formation",
40
  "offense_personnel",
 
35
  ]
36
  group_options = [
37
  "week",
38
+ "down",
39
+ "qtr",
40
+ "ydstogo",
41
+ "play_type",
42
+ "pass_length",
43
+ "pass_location",
44
  "possession_team",
45
  "offense_formation",
46
  "offense_personnel",
src/queries/nflverse/github_data.py CHANGED
@@ -46,9 +46,16 @@ def get_pbp_participation(season_int: int) -> pd.DataFrame:
46
  SELECT
47
  a.*
48
  , b.week
 
 
 
 
 
 
49
  from pbp_participation_pbp_participation_{season_int} a
50
  left join pbp_play_by_play_{season_int} b
51
  on a.play_id = b.play_id
 
52
  """
53
  ).df()
54
  return df
 
46
  SELECT
47
  a.*
48
  , b.week
49
+ , b.down
50
+ , b.qtr
51
+ , b.ydstogo
52
+ , b.play_type
53
+ , b.pass_length
54
+ , b.pass_location
55
  from pbp_participation_pbp_participation_{season_int} a
56
  left join pbp_play_by_play_{season_int} b
57
  on a.play_id = b.play_id
58
+ and a.nflverse_game_id = b.game_id
59
  """
60
  ).df()
61
  return df