nflverse / nflfastR

A Set of Functions to Efficiently Scrape NFL Play by Play Data
https://www.nflfastr.com/
Other
425 stars 52 forks source link

Rare usage of the phrase "lateral pass" confuses pass parser in `clean_pbp()` #473

Closed mrcaseb closed 2 months ago

mrcaseb commented 3 months ago

There are currently 26 plays where scorekeepers for some reason used random "lateral pass" strings. If the word "pass" is not enclosed by blank space, the parser won't count it as pass. That's why some of those plays have pass == 0. The pays with a passer were actual pass plays. Probably not very easy to handle.

This is not an actual reprex but code for me to reproduce

pbp_db %>% 
  filter(str_detect(tolower(desc), "lateral pass")) %>% 
  select(game_id, play_id, pass, home_team, passer, desc) %>% 
  collect()

# A tibble: 26 × 6
   game_id         play_id  pass home_team passer   desc                                                                                                                                                
   <chr>             <dbl> <dbl> <chr>     <chr>    <chr>                                                                                                                                               
 1 1999_01_NYG_TB     2044     1 TB        NA       (15:00) J.Green right end to TB 33 for 15 yards (S.Garnes). lateral pass from Dilfer                                                                
 2 1999_07_CHI_TB     3740     0 TB        NA       (8:28) C.Enis left end to TB 15 for 11 yards (R.Barber). Lateral pass                                                                               
 3 2000_11_SEA_JAX    2163     1 JAX       NA       (11:34) R.Watters left end to SEA 40 for 13 yards (K.Hardy). Play was a lateral pass to SS 32.                                                      
 4 2000_16_SD_CAR     1630     0 CAR       NA       (3:33) B.Hoover left end to CAR 30 for -2 yards (R.Harrison). Lateral pass                                                                          
 5 2001_14_TB_CHI      424     1 CHI       NA       (8:06) Lateral pass from J.Miller. 86-M.Booker right end pushed ob at TB 21 for 13 yards (34-D.Jackson).                                            
 6 2001_14_TB_CHI      672     1 CHI       NA       (4:17) Lateral pass from B.Johnson. 28-W.Dunn right end pushed ob at CHI 49 for 12 yards (53-W.Holdman).                                            
 7 2001_15_NYJ_IND    3088     1 IND       K.Dilger (10:08) 85-K.Dilger pass to 88-M.Harrison for 39 yards, TOUCHDOWN. Manning lateral pass to Dilger who passes to Harrison.                           
 8 2002_06_PIT_CIN     108     1 CIN       NA       (13:44) 80-P.Warrick pushed ob at PIT 47 for 7 yards (41-L.Flowers). Lateral pass to the left flat                                                  
 9 2002_11_CLE_CIN      59     0 CIN       NA       (14:54) 80-P.Warrick right end ran ob at CIN 28 for 4 yards (24-R.Griffith). {NOTE: Backwards lateral pass, Kitna (CIN #3) to Warrick (CIN #80)}    
10 2002_17_MIA_NE     4032     1 NE        D.Patten (15:00) 86-D.Patten pass incomplete to 80-T.Brown. Brady lateral pass to Patten who then passed to Brown.                                           
11 2003_01_DEN_CIN    1104     1 CIN       NA       (10:47) 80-P.Warrick to CIN 26 for -3 yards (35-L.Walls). {Lateral pass from Kitna to Warrick}                                                      
12 2003_03_JAX_IND    2943     0 IND       NA       (9:40) 8-M.Brunell FUMBLES (Aborted) at IND 22, ball out of bounds at IND 22. Lateral Pass.                                                         
13 2005_04_DET_TB      100     0 TB        NA       (13:31) 21-A.Pinner left end to DET 30 for 2 yards (95-C.Hovan). lateral pass                                                                       
14 2006_02_CLE_CIN    1573     0 CIN       NA       (6:34) 34-R.Droughns left end to CLE 47 for -1 yards (58-C.Miller; 20-T.James). {Lateral pass}                                                      
15 2006_16_CIN_DEN    1015     1 DEN       J.Cutler (15:00) Direct Snap to Smith.  Smith lateral pass back to Cutler. (Shotgun) 6-J.Cutler pass deep left to 15-B.Marshall ran ob at CIN 1 for 36 yards…
16 2006_18_KC_IND     2523     1 IND       NA       (4:14) 82-D.Hall right end to KC 46 for 6 yards (41-A.Bethea). Lateral pass from Green to Hall.                                                     
17 2008_17_JAX_BAL    3054     1 BAL       NA       (12:20) 85-D.Mason right end to JAX 47 for 3 yards (25-R.Nelson). Derrick Mason receives lateral pass from Joe Flacco.                              
18 2013_15_CIN_PIT    3181     1 PIT       NA       (14:08) 84-A.Brown right end pushed ob at PIT 21 for 1 yard (43-G.Iloka). Backward lateral pass from #7 Roethlisberger.                             
19 2014_04_TB_PIT       50     1 PIT       NA       (15:00) 46-Wi.Johnson right end to PIT 20 for no gain (51-D.Lansanah; 50-D.Fletcher). Lateral pass from #7 Roethlisberger.                          
20 2015_17_STL_SF     1012     1 SF        NA       (14:08) 11-T.Austin left end pushed ob at STL 48 for 7 yards (36-D.Johnson). 11 T.Austin took lateral pass from 17 C.Keenum                         
21 2015_18_PIT_CIN    4386     0 CIN       NA       (Pass formation) TWO-POINT CONVERSION ATTEMPT. 32-J.Hill rushes left end. ATTEMPT FAILS. Lateral Pass from McCarron to Hill                         
22 2016_04_DAL_SF     3219     1 SF        NA       (10:38) 11-C.Beasley right end pushed ob at DAL 41 for 7 yards (41-A.Bethea). Lateral pass from Z.Prescott to C.Beasley                             
23 2016_12_NYG_CLE    3031     1 CLE       NA       (:48) (Shotgun) 23-R.Jennings right end to NYG 36 for 6 yards (96-X.Cooper). 10 E Manning lateral pass to 23 R Jennings to the right                
24 2018_14_CAR_CLE    1696     1 CLE       J.Landry (2:00) 80-J.Landry pass incomplete deep left to 24-N.Chubb (26-D.Jackson). Lateral Pass from 6 B.Mayfield to 80 J.Landry                            
25 2019_01_TEN_CLE     104     0 CLE       NA       (14:12) (Shotgun) 80-J.Landry left end pushed ob at CLE 48 for 10 yards (54-R.Evans). Lateral Pass to 80 J.Laundry                                  
26 2019_05_CHI_OAK     343     1 LV        NA       (9:42) (Shotgun) 29-T.Cohen right end pushed ob at CHI 23 for 3 yards (59-T.Whitehead). Lateral pass from Daniels to Cohen.