{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# An Exploration Into Punt Rush HAVOC","metadata":{}},{"cell_type":"markdown","source":"I will venture into the unknown, where very few have gone, and will go - the dissection of punt pressure down to its core. I'm confident that some of the tactics/findings presented here will be useful for any special teams coordinator that commonly faces the spread punt formation.","metadata":{}},{"cell_type":"markdown","source":"# Stunt / Combo Rush  \n\nStunts/Twists are commonly referenced when talking about defensive line play - when two or more defensive rushers cross paths, or loop around each other to confuse the offensive line. These combination rush moves have made their way into punt block, with some leading to perfectly executed blocked punts.\n\n### How to locate in the data\n\nGiven the nature of this data supplied by NGS - it may be hard to wrap your head around how stunts/combos can be identified in the data. Detection could be done with computer vision techniques, but we have no stunt rush labels - so unless you manually labeled plays, that task would be incredibly difficult. Instead, what I did was essentially create a sneak preview for each rusher in the first 1.5 seconds when the ball is snapped - I observed the path that the rusher took and compared it with their closest teammates. If the slope of the rushers' path crossed a teammates’ path - it is assumed that it was a designed combo rush. \n\nFor clarification, not everyone is trying to rush the punt - in most cases, the player rushes only to slow down their blocker from going downfield to tackle the punt returner. Non-rushers can be counted as a participant in the rush combo – however, when measuring HAVOC, we will only evaluate the punt rushers identified by PFF.\n\n\n![Stunt_example.png](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Stunt_example.png?raw=true)\n\nHere we see the Punt Linebacker intersect both slopes of the 2 defensive linemen - so this will be classified as a 3-man combo rush. Observe the animation below and see how the 2 Defensive Linemen open the lane for the PLB.","metadata":{}},{"cell_type":"code","source":"import numpy as np \nimport pandas as pd \n\n%matplotlib nbagg\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as animation\nimport pandas as pd\nfrom IPython.display import HTML\n\nfrom matplotlib.patches import Polygon\n\nimport pytz\nfrom IPython.display import HTML\nfrom matplotlib import animation, rc\nfrom matplotlib.patches import Rectangle, Arrow, FancyArrow\nfrom matplotlib.patches import Polygon\nimport matplotlib.patheffects as pe\nimport gc\n\n\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as patches\nimport matplotlib._color_data as mcd\nimport matplotlib.patches as mpatch\nimport random\nfrom scipy.spatial import ConvexHull\n\nfrom tqdm import tqdm\nfrom datetime import date\nfrom datetime import datetime\nimport io\nimport time\nimport io\nimport re\n\nfrom shapely.geometry import Point, Polygon, GeometryCollection,MultiPoint\nfrom shapely.validation import make_valid\n\nimport matplotlib as mpl\nmpl.rcParams.update(mpl.rcParamsDefault)\n\npd.options.mode.chained_assignment = None \npd.set_option('display.max_columns', None)\nfrom scipy.spatial import ConvexHull\nimport math\n\nimport warnings \nwarnings.filterwarnings(\"ignore\")\n\nimport numpy as np \nimport pandas as pd\npd.options.mode.chained_assignment = None \npd.set_option('display.max_columns', None)\n\nimport warnings \nwarnings.filterwarnings(\"ignore\")\n\nuse = pd.read_csv('https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/Havoc_Gray.csv.gz?raw=true', compression='gzip', low_memory=False)\nuse['influence_blend_cont'] = use['influence_blend_cont'].fillna(use.groupby(['nflId'])['influence_blend_cont'].transform('last'))\n\nylim= (-18, 5.5)\nxlim=(-12, 12)\n# fig = plt.figure(figsize=(20,10))\n#ylim=(40,85)\n#xlim=(0,50)\nfig = plt.figure(figsize=(16,10))\nax = plt.axes(xlim=xlim, ylim=ylim)\n\n\n\n# plt.ylim([-3, 22])\n# plt.xlim([-23.3, 23.3])\npoints0, = ax.plot([], [],'.',alpha = .85, markersize =65,color='red')\npoints1, = ax.plot([], [],'.',alpha = .80, markersize =65,color='#2F4F4F')\npoints2, = ax.plot([], [],'.',alpha = .80, markersize =65,color='#C0C0C0')\npoints3, = ax.plot([], [],'d',alpha = 1, markersize =25,color='brown')\nframe_text = ax.text(16, -5, '', horizontalalignment = 'center', verticalalignment = 'center', c = 'white',fontweight='bold',fontsize='larger')\n\n\na_or_list = []\nname_list = []\nscat_number_list = []\nblock = []\nBlock_Prob_list = []\n\nfor _ in range(len(use['displayName'].drop_duplicates())):\n    a_or_list.append(ax.add_patch(Arrow(0, 0, 0, 0, color = 'k')))\n    block.append(ax.add_patch(Arrow(0, 0, 0, 0, color = 'green')))\n    name_list.append(ax.text(0, 0, '', horizontalalignment = 'center', verticalalignment = 'center', c = 'black',fontweight='bold',fontsize=13,path_effects=[pe.withStroke(linewidth=3, foreground=\"gold\")]))\n    scat_number_list.append(ax.text(0, 0, '', horizontalalignment = 'center', verticalalignment = 'center', c = 'black',fontweight='bold',fontsize=15,path_effects=[pe.withStroke(linewidth=3, foreground=\"white\")]))\n    Block_Prob_list.append(ax.text(0, 0, '', horizontalalignment = 'center', verticalalignment = 'top', c = 'black',fontweight='bold',fontsize=15,path_effects=[pe.withStroke(linewidth=3, foreground=\"gold\")]))\n\n#use = puntview.query(' gameId == 2018123013 & playId == 502 & X_diff < 25 ').reset_index(drop=True)\nplt.axhline(y=0, color='black', linestyle='-',linewidth=6,alpha=.5)\n\n\n\nto_be_deleted = []\n\nplt.axis('off')\n\n\ndef animate(i):\n    time = use['frameId'].unique()[i]\n\n    trim = use.loc[use['frameId'] == time].drop_duplicates()\n\n    rusher_x = trim.loc[(trim['frameId'] == time) & (trim['displayName'] == \"J.T. Gray\")]['LOS_X_diff']\n    rusher_y = trim.loc[(trim['frameId'] == time) & (trim['displayName'] == \"J.T. Gray\")]['LOS_Y_diff']\n\n    home_x = trim.loc[(trim['frameId'] == time) & (trim['punt_team'] == \"Returning_Team\") & (trim['displayName'] != \"J.T. Gray\")]['LOS_X_diff']\n    home_y = trim.loc[(trim['frameId'] == time) & (trim['punt_team'] == \"Returning_Team\") & (trim['displayName'] != \"J.T. Gray\")]['LOS_Y_diff']\n\n    away_x = trim.loc[(use['frameId'] == time) & (trim['punt_team'] == \"Punting_Team\")]['LOS_X_diff']\n    away_y = trim.loc[(use['frameId'] == time) & (trim['punt_team'] == \"Punting_Team\")]['LOS_Y_diff']\n    \n    ball_x = trim.loc[(trim['frameId'] == time) & (trim['displayName'] == \"football\")]['LOS_X_diff']\n    ball_y = trim.loc[(trim['frameId'] == time) & (trim['displayName'] == \"football\")]['LOS_Y_diff']\n    \n    rusher_coordinate = pd.DataFrame({'x':rusher_x,'y':rusher_y})\n\n    home_player_coordinate = pd.DataFrame({'x':home_x,'y':home_y})\n    \n    away_player_coordinate = pd.DataFrame({'x':away_x,'y':away_y})\n\n    frame_text.set_text('frame ' + str(trim.frameId.iloc[0]) + \" \" + str(trim.event.iloc[0]))\n    \n    points0.set_data((rusher_coordinate['y']),(rusher_coordinate['x']))\n    points1.set_data((home_player_coordinate['y']),(home_player_coordinate['x']))\n    points2.set_data((away_player_coordinate['y']),(away_player_coordinate['x']))\n    points3.set_data((ball_y),(ball_x))\n\n\n    for (index, row) in trim[trim.displayName.notnull()].reset_index().iterrows():\n      if (row.displayName != \"football\") & (row.punt_team == \"Returning_Team\"):\n        scat_number_list[index].set_text(\"\")\n        scat_number_list[index].set_position((row.LOS_Y_diff, row.LOS_X_diff))\n        scat_number_list[index].set_text(row['jerseyNumber'])\n      else:\n        scat_number_list[index].set_text(\"\")\n        pass\n\n\n    for (index, row) in trim[trim.displayName.notnull()].reset_index().iterrows():\n      if row.punt_team == \"Returning_Team\" and row.frameId <= (row.snap_frame + 10) and row.IsRusher == 0:\n        a_or_list[index].remove()\n        a_or_list[index] = ax.add_patch(Arrow(row.LOS_Y_diff, row.LOS_X_diff, (row.LOS_Y_diff_path_diff*-1), (row.LOS_X_diff_path_diff*-1)/2, color = 'black', width = .5))\n\n      elif row.IsRusher == 1 and row.frameId <= (row.snap_frame + 10):\n        a_or_list[index].remove()\n        a_or_list[index] = ax.add_patch(Arrow(row.LOS_Y_diff, row.LOS_X_diff, (row.LOS_Y_diff_path_diff*-1), (row.LOS_X_diff_path_diff*-1)/2, color = 'red', width = .5))\n      else:\n        a_or_list[index].remove()\n        a_or_list[index] = ax.add_patch(ax.add_patch(Arrow(0, 0, 0, 0, color = 'white', width = .001)))\n        pass\n\n    for (index, row) in trim[trim.displayName.notnull()].reset_index().iterrows():\n      if row.punt_team == \"Returning_Team\" and row.frameId <= (row.snap_frame + 10) and row.displayName == \"J.T. Gray\":\n        name_list[index].set_text(row.displayName.split()[-1])\n        name_list[index].set_position((row.LOS_Y_diff, row.LOS_X_diff+1))\n\n      else:\n        name_list[index].set_text(\"\")\n        name_list[index].set_position((row.LOS_Y_diff, row.LOS_X_diff+1))\n        pass\n\n      for (index, row) in trim[trim.displayName.notnull()].reset_index().iterrows():\n        if row.displayName == \"J.T. Gray\":\n          Block_Prob_list[index].set_text(str(round(float(row.influence_blend_cont),2)))\n      #    Block_Prob_list[index].set_text((row['max']*1000)*(row['max']*1000))\n          Block_Prob_list[index].set_position((row.LOS_Y_diff, row.LOS_X_diff+2))\n          ax.plot(row.LOS_Y_diff, row.LOS_X_diff, \"ro-\", markersize=round(float(row.influence_blend_cont),2) /2 )\n\n        else:\n          Block_Prob_list[index].set_text(\"\")\n          Block_Prob_list[index].set_position((row.LOS_Y_diff, row.LOS_X_diff+2))\n          pass\n      \n    return points1,points2,points3,points0\n\n\nanim = animation.FuncAnimation(fig, animate,\n                               frames=len(use['frameId'].unique()))\n\nHTML(anim.to_jshtml())","metadata":{"execution":{"iopub.status.busy":"2022-01-03T21:00:29.634589Z","iopub.execute_input":"2022-01-03T21:00:29.634867Z","iopub.status.idle":"2022-01-03T21:00:41.836996Z","shell.execute_reply.started":"2022-01-03T21:00:29.634815Z","shell.execute_reply":"2022-01-03T21:00:41.836125Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"2\"></a> <br>\n## No Sunt vs. 2-Man Stunt vs. 3-Man Stunt\n\nNot every team designs extravagant, complicated punt rush schemes - most of the time the rusher just runs straight and tries to beat the man in front of them. Let's compare these 3 groups:","metadata":{}},{"cell_type":"markdown","source":"![Stunt Group Means.png](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Stunt%20group%20means.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"The combo rushes seem to outperform rushers that were not assigned in a stunt group - while less prevalent, the groups that performed a stunt had higher punt block frequencies and average HAVOC.","metadata":{}},{"cell_type":"markdown","source":"## One-Way Anova\n\nTo determine if there is a significant difference in groups, we can perform a one-way ANOVA test. There is a notable difference in sample sizes between the 3 groups, however, you can still run ANOVA due to all groups having similar distributions. After removing tail events, like extremely high HAVOC and low HAVOC - here are the results.","metadata":{}},{"cell_type":"markdown","source":"![Stunt Groups - No Outliers.png](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Stunt%20Groups%20-%20No%20Outliers.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:blue;font-size:16px;font-weight:bold;\">Analysis: </span> There is a significant difference among group means. There is a decrease in HAVOC by -1.35 on average when not performing a stunt combination - while those that ended up using 3-Man combos increased HAVOC by 5.19 on average. Some of the highest HAVOC scores have come from combo rushes - with those removed, we still see a significant advantage in using a combination rush.","metadata":{}},{"cell_type":"markdown","source":"### Tukey Test\n\nAll groups are statistically different from each other.","metadata":{}},{"cell_type":"markdown","source":"![Stunt Groups - Tukey.png](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Stunt%20Groups%20-%20Tukey.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"### QQ-plot\n\nResiduals meet assumptions - showing normality.","metadata":{}},{"cell_type":"markdown","source":"![Stunt Groups QQ.png](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Stunt%20Groups%20QQ.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:blue;font-size:16px;font-weight:bold;\">Analysis: </span> Even with limited sample sizes, it appears that applying some sort of combination rush will increase HAVOC. This also tells us that 3-man combinations may produce the most HAVOC on average, compared to 2-man and No stunt groups. With more data, I'm interested in where this study will go, but there appears to be a significant advantage in applying more advanced schemes to your punt block portfolio.","metadata":{}},{"cell_type":"markdown","source":"-----------------","metadata":{}},{"cell_type":"markdown","source":"# Deep Dive Into Rush Combo Groups","metadata":{}},{"cell_type":"markdown","source":"As we dive into rush combinations, I first want to address the nomenclature of the punt rush positions:\n\n- **Side of the Ball** - Players will have L or R signaling whether they were on the left or right side of the ball at the snap, from the punter’s point of view.\n- **Base Punt Position** - Players will be Defensive Line (DL), Punt Linebackers (PLB), or Vises (V).\n- **Numbering Inside Out** - Players will be numbered in increasing order starting from closest to the ball, based on their side of the ball, and their position. \n\nFor example: The defensive lineman closest to the ball on the left side will be called \"LDL1\".\n\n**Note:** I believe it is common practice for special teams’ coordinators to number the players outside-to-inside, but I didn't discover this until it was too late. I also believe they refer to Punt Linebackers as \"Safeties\", but I will continue to refer to them as Linebackers for this study.","metadata":{}},{"cell_type":"markdown","source":"![Position ref.png](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Position%20ref.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<a id=\"3\"></a> <br>\n# Top 2-Man Combo - Base Groups\n\nA Base Group is referred to as the generic version of the combination group - the side of the ball is left out, and we only focus on position and numbering. The **Rusher Position** is the observed player in the Stunt/combination group. Here are the top 2-man combinations:","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Base%202man.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:blue;font-size:16px;font-weight:bold;\">Analysis: </span> When the inside most PLB is the rusher and is paired with the inside most DL - it has generated the most HAVOC on average, as well as 3 total punt blocks from 2018-2021. The #5 ranked combo, in terms of Avg. HAVOC, is the same grouping of PLB1, DL1, except the observed rusher is the DL1 - this tells us that this technique could be effective for both the PLB and the DL.","metadata":{}},{"cell_type":"markdown","source":"<a id=\"4\"></a> <br>\n# Top 2-Man Combo - Specific Groups\n\nSpecific groups consider the actual side of the rusher and their partner - this will help us get more granular in our study.","metadata":{}},{"cell_type":"markdown","source":"## **Top 5**","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Top2man.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:blue;font-size:16px;font-weight:bold;\">Analysis: </span> Just like in our 2-Man Base Groups, the top specific group is a PLB1, DL1 pairing - except we've narrowed it down to the RPLB1 rusher paired with the LDL1. The right PLB crashes down through the left A-Gap right behind the LDL1 attempting to block the punt. The #3 top-specific combo is essentially the same thing, except it is the PLB is on the left side with the DL1 - this further confirms that the utilization of both a PLB1 and DL1 will improve HAVOC.","metadata":{}},{"cell_type":"markdown","source":"### The Remaining 2-Man Combos","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Remaining%202man.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"### RPLB1 + LDL1 Tukey\nThe RPLB1 rusher paired with the LDL1 has shown to be statistically significant over 7 different 2-Man combo pairs - in terms of generating more HAVOC on average.","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/2-man%20Tukey.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<a id=\"5\"></a> <br>\n# PLB1 + DL1: Data ➔ Film","metadata":{}},{"cell_type":"markdown","source":"**Exhibit A**","metadata":{}},{"cell_type":"markdown","source":"![](https://media.giphy.com/media/DZ7qsUNLF4m2jcdZCy/giphy.gif)","metadata":{}},{"cell_type":"markdown","source":"**Exhibit B**","metadata":{}},{"cell_type":"markdown","source":"![](https://media.giphy.com/media/qryz46HOxyp8Ms5S2L/giphy.gif)","metadata":{}},{"cell_type":"markdown","source":"**Exhibit C**","metadata":{}},{"cell_type":"markdown","source":"![](https://media.giphy.com/media/ATd70g9mJadcIhh9zJ/giphy.gif)","metadata":{}},{"cell_type":"markdown","source":"**Exhibit D**","metadata":{}},{"cell_type":"markdown","source":"![](https://media.giphy.com/media/C5ZifiCTISp7ZfuygN/giphy.gif)","metadata":{}},{"cell_type":"markdown","source":"**Exhibit E**","metadata":{}},{"cell_type":"markdown","source":"![](https://media.giphy.com/media/DOwP62FcqOQ0aWlqGf/giphy.gif)","metadata":{}},{"cell_type":"markdown","source":"**Exhibit F**","metadata":{}},{"cell_type":"markdown","source":"![](https://media.giphy.com/media/xL29DZx9ePC7VUGSwH/giphy.gif)","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:blue;font-size:18px;font-weight:bold;\">Note: </span> Spamming examples was a necessary step to prove a point, and there could have honestly been more. There’s nothing more beautiful than when data analysis matches up with the film – something the nerds, and the football gurus can agree upon. In all examples, the rusher barely missed the block or blocked the punt - yet it is only the blocked punts that get recognized on the stat sheet, HAVOC looks to change this behavior.","metadata":{}},{"cell_type":"markdown","source":"-----------------","metadata":{}},{"cell_type":"markdown","source":"<a id=\"6\"></a> <br>\n# Optimizing RPLB1 + LDL1 & LPLB1 + LDL1\n\nWe've found that RPLB1 + LDL1, and LPLB1 + LDL1 both appear to be effective in generating HAVOC, and punt blocks - interestingly, they are both near similar concepts with slight variations. Let's explore these concepts further to see if we can improve beyond that.","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:red;font-size:24px;font-weight:bold;\">DL Outside The Wings</span>\n\nThe number of Defensive Linemen lined up outside the wings showed a positive correlation when combined with combos: RPLB1 + LDL1 & LPLB1 + LDL1","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/O_Wings%20PLB,DL1%20means.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"Above you will see the number of DL outside of the wings in the left-hand column, as that number grows - the effectiveness of the inside PLB1, DL1 combo appears to generate more HAVOC.","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/O_Wings%20PLB,DL1%20ANova.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:blue;font-size:16px;font-weight:bold;\">Analysis: </span> Having 4 or more Defensive Linemen outside the wings appears to be statistically significant.","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:red;font-size:24px;font-weight:bold;\">DL Opposite Punt Protection Side</span>\n\nAnother positively correlated variable in this group was the number of Defensive Linemen lined up on the opposite side of the punt protector.","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Opp_PuntPro%20PLB,DL1%20means.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"In the left-hand column, we see the number of Defensive Linemen lined up opposite the punt protector, as that number increases - so does the average HAVOC generated. There were no examples of the usage of 5 DL, that's why it jumps from 4 to 6.","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Opp_PuntPro%20PLB,DL1%20ANOVA.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:blue;font-size:16px;font-weight:bold;\">Analysis: </span> Having 4 Defensive Linemen opposite the punt protector side appears to be statistically significant.","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:red;font-size:24px;font-weight:bold;\">DL Outside Wings and Opposite Punt Protection</span>\n\nWhat if we combined these two situations? Let's see if there is an optimal alignment that sticks out.","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/O_W_OppPro_means.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"In the left-hand column, you will see the number of DL outside the wings on the left side of the variable, with the number of DL opposite the punt protector on the right side of the variable. When these situations are combined, it appears that increasing both generally leads to higher HAVOC.","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/O_W_OppPro_ANOVA.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:blue;font-size:16px;font-weight:bold;\">Analysis: </span> Here are the statistically significant groups\n\n- 4 DL Outside Wings / 3 DL Opposite Punt Protector\n- 4 DL Outside Wings / 4 DL Opposite Punt Protector\n- 5 DL Outside Wings / 4 DL Opposite Punt Protector\n\nSo, coaches if you are wanting to implement this scheme, make sure to place at least 4 Defensive Linemen outside of the wings, along with an emphasis on more DL players aligned on the opposite side of the Punt Protector.","metadata":{}},{"cell_type":"markdown","source":"## Why Outside The Wings\n\nMy simple logic for why this works:  The more pressure you add on the outside, the more it draws attention away from the stunt on the inside.","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/InkedOutside%20W_LI.jpg?raw=true)","metadata":{}},{"cell_type":"markdown","source":"-----------------","metadata":{}},{"cell_type":"markdown","source":"<a id=\"7\"></a> <br>\n# Top 3-Man Combo - Base Groups\n\nJust like before with 2-Man Base Groups, we will introduce 3-Man Base Groups.","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Base%203man.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:blue;font-size:16px;font-weight:bold;\">Analysis: </span> With 3-Man groups, the sample sizes drastically decrease, but we do see a significant advantage in HAVOC. The #1 group was only attempted 3 times, yet it produced a maximum HAVOC of 125.418 and a blocked punt. The #2 group was attempted 18 times and contributed to 2 blocked punts and the largest HAVOC recorded.","metadata":{}},{"cell_type":"markdown","source":"<a id=\"8\"></a> <br>\n# Top 3-Man Combo - Specific Groups\n","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Top3man.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:blue;font-size:16px;font-weight:bold;\">Analysis: </span> The #1 and #2 scenarios are both similar concepts, except the RPLB1 is swapped with an RDL2 - with the main rusher being the LPLB1 for both.","metadata":{}},{"cell_type":"markdown","source":"### The Remaining 3-Man Combos","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Remaining%203man.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"### LPLB1, RDL1, RDL2 Tukey Test\n\nLet’s focus on LPLB1, RDL1, RDL2 - because maintaining that high efficiency with 9 samples is worth looking at.","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Tukey_LPLB1_RDL1_RDL2_All.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:blue;font-size:16px;font-weight:bold;\">Analysis: </span> Looking at 2-Man combos and 3-Man combos with at least 5 attempts, LPLB1, RDL1, RDL2 stand out above the rest - it is significantly better than 35 other combination pairings.","metadata":{}},{"cell_type":"markdown","source":"<a id=\"9\"></a> <br>\n# LPLB1, RDL1, RDL2: Data ➔ Film","metadata":{}},{"cell_type":"markdown","source":"**Exhibit A**","metadata":{}},{"cell_type":"markdown","source":"![](https://media1.giphy.com/media/B7J9lxAszy1i32gGV6/giphy.gif?cid=790b7611b1041db66b0545a99bca6cdac66803c0c385ab9a&rid=giphy.gif&ct=g)","metadata":{}},{"cell_type":"markdown","source":"**Exhibit B**","metadata":{}},{"cell_type":"markdown","source":"![](https://media2.giphy.com/media/GBhNUZ2vS0WfSC4pF4/giphy.gif?cid=790b761145cd9f6e3bebdfbeb9394c670bd3119bc4a82f70&rid=giphy.gif&ct=g)","metadata":{}},{"cell_type":"markdown","source":"**Exhibit C**","metadata":{}},{"cell_type":"markdown","source":"![](https://media2.giphy.com/media/kXM3b64oP9KCZ50RQf/giphy.gif?cid=790b76116cb9ba73c31a2cbf8e9eaaedf5d607d138e35885&rid=giphy.gif&ct=g)","metadata":{}},{"cell_type":"markdown","source":"**Exhibit D**","metadata":{}},{"cell_type":"markdown","source":"![](https://media2.giphy.com/media/m325AAJUW67jxro2Em/giphy.gif?cid=790b76118052b890be3e9bba667cdee62a12d62a1c3ef22d&rid=giphy.gif&ct=g)","metadata":{}},{"cell_type":"markdown","source":"The LPLB1, RDL1, RDL2 combination has only been run 9 times from 2018-2020 - twice by the Patriots, and they narrowly missed the block both times. This combination has produced 1 punt block, and the highest recorded HAVOC ever recorded.","metadata":{}},{"cell_type":"markdown","source":"## LPLB1, RDL1, RDL2 working indirectly\n\nSomething very interesting to note - this combination indirectly helped produce a blocked punt. The rusher that blocked it was not a part of the 3-Man combination – however, the stunt caused the right punt tackle to shift out of position, and this allowed for the RDL3 to block the punt. This was one of the 9 LPLB1 + LPLB1, RDL1, RDL2 combinations, and it generated a poor HAVOC from the combination perspective - but it opened the door for a non-stunt assigned rusher.","metadata":{}},{"cell_type":"markdown","source":"![](https://media2.giphy.com/media/419vDApKBfXJ6NAGpR/giphy.gif)","metadata":{}},{"cell_type":"markdown","source":"---------------------------------------","metadata":{}},{"cell_type":"markdown","source":"<a id=\"10\"></a> <br>\n# Optimizing LPLB1, RDL1, RDL2\n\nThe sample size of specific 3-man groups is extremely small - so we will only look at group means.","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:red;font-size:24px;font-weight:bold;\">DL Outside The Wings</span>\n\nEven with small sample sizes, the number of Defensive Linemen lined up outside the wings showed a positive correlation.","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/LPLB1_RDL1_RDL2_O_W_means.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"HAVOC does appear to increase as the number of DL outside the wings increases - with only 9 attempts, it's tough to jump to conclusions, but it looks promising.","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:red;font-size:24px;font-weight:bold;\">DL Opposite Punt Protection Side</span>","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/LPLB1_RDL1_RDL2_Opp_PuntPro_means.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"The two largest HAVOCs produced had 4 and 5 DL on the opposite side of the punt protector.","metadata":{}},{"cell_type":"markdown","source":"--------------------------------------------------------","metadata":{}},{"cell_type":"markdown","source":"# Need For Speed","metadata":{}},{"cell_type":"markdown","source":"I think it's pretty clear that the best strategy to block a punt is a loop-around technique - with a punt linebacker coming around the opposite side. In order for this to work, he needs to get from point A to point B very fast. Let's look at a scatter plot of Punt Linebackers and their average 3 top recorded speeds in tracking data and compare it with each HAVOC score they produced.","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/PLB%20Speed%20Scatter.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:blue;font-size:16px;font-weight:bold;\">Analysis: </span> There are extremely high HAVOC scores skewing the results, but they can't be ignored. For teams to maximize pressure when running punt rush combos, they need to put some of their fastest players at PLB to rush the punt. ","metadata":{}},{"cell_type":"markdown","source":"### Grouping Speed\n\nPunt Linebackers that had a top 3 average MPH of over 18+ MPH did significantly better at generating HAVOC.","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/PLB%20speed%20tukey.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:blue;font-size:16px;font-weight:bold;\">Analysis: </span> Teams should utilize a fast-skill position player as a Punt Linebacker to execute Punt Rush combos - like a Wide Receiver or Defensive Back.","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Dallas%20Punt%20block%20WRs.jpg?raw=true)","metadata":{}},{"cell_type":"markdown","source":"During this 2021 season, Dallas has utilized 2 Wide Receivers: Noah Brown, and Malik Turner as Punt Linebackers. They currently lead the NFL with 3 blocked punts.","metadata":{}},{"cell_type":"markdown","source":"--------------------------------------------------------","metadata":{}},{"cell_type":"markdown","source":"# Find Weak Links - Learn From Hackers\n\nSome of the best criminal hackers in the world have orchestrated successful attacks on their victims, not with their computer skills, but by social engineering techniques. A common tactic is to find weak links in a company, mainly targeting low-level employees to gain access to the companies database. They can do this by unleashing a variety of phishing emails, phone calls or sometimes even meeting them in person pretending to be an executive in the company. Generally, these low-level employees aren't very experienced, and that is why they are the perfect target.\n\nSpecial teams’ coaches should have a full scouting report of their opponents' personnel, with how many snaps they've played at each specific position in punt protection. If a team is projected to start an inexperienced player in punt protection, you need to factor this into your game plan. Punt Protection is extremely difficult, everyone involved must be actively monitoring every shift the defense makes – and their technique needs to be flawless. ","metadata":{}},{"cell_type":"markdown","source":"## Differences In Experience Matter\n\nExpected block probabilities for all players in punt protection are incorporated into the expected HAVOC model, for each rusher. Then we can compare total cumulative special teams’ snap counts at the time of the snap. There are no publicly available snap counts for specific special teams’ positions, only general snaps - so we take these to standardize the snaps, based on position and game week. Multiply the expected block probabilities with the snap counts for all players in punt protection and take the difference from the rushers’ snaps.\n\n### Here's a video to help you understand this logic","metadata":{}},{"cell_type":"code","source":"from IPython.display import HTML\nfrom base64 import b64encode\nimport numpy as np\nimport pandas as pd\n\ndef play(filename):\n    html = ''\n    video = open(filename,'rb').read()\n    src = 'data:video/mp4;base64,' + b64encode(video).decode()\n    html += '<video width=800 controls autoplay loop><source src=\"%s\" type=\"video/mp4\"></video>' % src \n    return HTML(html)\n\nplay('../input/experience-mismatch/Experience mismatch.mp4')","metadata":{"execution":{"iopub.status.busy":"2022-01-05T14:54:15.336381Z","iopub.execute_input":"2022-01-05T14:54:15.336698Z","iopub.status.idle":"2022-01-05T14:54:15.862572Z","shell.execute_reply.started":"2022-01-05T14:54:15.336667Z","shell.execute_reply":"2022-01-05T14:54:15.861594Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Max Rusher Snap Difference vs. Max HAVOC Produced","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/Snap%20Difference.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:blue;font-size:16px;font-weight:bold;\">Analysis: </span> There appears to be a positive correlation when teams lineup more experienced rushers, against an inexperienced player in punt protection.","metadata":{}},{"cell_type":"markdown","source":"------------------------------------","metadata":{}},{"cell_type":"markdown","source":"# Raise Hell on The Long Snapper\n\nThe punt team long snapper is probably one of the most difficult positions in football, you must accurately snap the ball around 15-18 yards, then immediately block a player that comes barreling down your right or left shoulder - or even across your face, or a combination of all those moves. There's a reason why some of the best 2 and 3-Man rush combinations generally used some form of attack on the long snapper, and even just a straight-up bull rush right through the A-gap seems to work.","metadata":{}},{"cell_type":"markdown","source":"## The Most Difficult Block\n\nLining a DL up right in the A-gap and just plowing straight through is the most difficult block any long snapper can make. Here is Pat O'Connor blocking a punt against a snapper that had only played 16 regular season snaps before this play - it is not even fair.","metadata":{}},{"cell_type":"markdown","source":"![](https://media1.giphy.com/media/SuMhsVLzXlRwTuVW6t/giphy.gif?cid=790b7611532a82e1f8dbc7675f91144f92a3d2f620c1edbd&rid=giphy.gif&ct=g)","metadata":{}},{"cell_type":"markdown","source":"## Experience Does Not Matter - No One Is Safe\n\nIn 2018, Shea McClellin of the Patriots blocked 2 punts in the same game by going right through the same long snapper both times. The thing is this wasn't some young buck long snapper - it was 14-year veteran John Denney.","metadata":{}},{"cell_type":"markdown","source":"**Block 1**","metadata":{}},{"cell_type":"markdown","source":"![](https://media4.giphy.com/media/ICTciqRNokYwdTBAGq/giphy.gif)","metadata":{}},{"cell_type":"markdown","source":"**Block 2**","metadata":{}},{"cell_type":"markdown","source":"![](https://media0.giphy.com/media/6sdGgU4w6cgoQ9RIMC/giphy.gif?cid=790b7611707c7371dd644407c5a9dd650029ec2275b3d7be&rid=giphy.gif&ct=g)","metadata":{}},{"cell_type":"markdown","source":"## Total Sum Of Long Snapper Block Assignment Probabilities - Rushers Only\n\nWe sum up the expected block probabilities for long snappers of all the rushers, for each play. This will tell us how much pressure special teams’ units are scheming up on the long snapper. ","metadata":{}},{"cell_type":"markdown","source":"![](https://github.com/jdruzzi/BDB22/blob/main/Punt%20Rush%20Havoc/HAVOC%20Improvement%20Images/LS%20Block%20Probabilities.png?raw=true)","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:blue;font-size:16px;font-weight:bold;\">Analysis: </span> There appears to be a positive correlation between putting more pressure on the Long Snapper and increasing HAVOC. ","metadata":{}},{"cell_type":"markdown","source":"-----------","metadata":{}},{"cell_type":"markdown","source":"<span style=\"color:black;font-size:16px;font-weight:bold;\">Final Words: </span> Hopefully you enjoyed my analysis, and I hope a special teams coordinator comes across this write-up with an open mind.","metadata":{}},{"cell_type":"markdown","source":"-------------------------------------------------------------\n## More 2022 Big Data Bowl Content\n\n### [ ⭐ HAVOC: Decoding the Punt Rush ⭐ ](https://www.kaggle.com/jdruzzi/havoc-decoding-the-punt-rush)\n\n- [Quantifying Punt Rush Ability with HAVOC](https://www.kaggle.com/jdruzzi/quantifying-punt-rush-ability-with-havoc)\n\n- [Extended: How to Improve HAVOC & Block Punts 📝](https://www.kaggle.com/jdruzzi/extended-how-to-improve-havoc-block-punts)\n\n- [Alternate Outcomes WIth Punt Pressure & HAVOC](https://www.kaggle.com/jdruzzi/alternate-outcomes-with-punt-pressure-havoc)\n\n\n#### Alternative Punt / Punt Rush\n\n- [Evaluating Punt/Punt Rush Units with Convex Hulls](https://www.kaggle.com/jdruzzi/evaluate-punt-punt-return-units-with-convex-hulls)\n\n#### Punt Protection\n\n- [Estimating Punt Protection Assignments](https://www.kaggle.com/jdruzzi/estimating-punt-protection-blocking-assignments)\n\n#### Misc / Additional Data\n- [Generating Detailed Punt Positions](https://www.kaggle.com/jdruzzi/generating-detailed-punt-positions)\n\n- [Combine, Snap Counts, & Left Footed Kicker Data](https://www.kaggle.com/jdruzzi/combine-snap-counts-left-footed-kicker-data)\n\n------------------------------------------------------------\n#### Socials\n- [Twitter](https://twitter.com/j_druzzi)\n- [LinkedIn](https://www.linkedin.com/in/joe-andruzzi-27b3a7149/)\n\n------------------------------------------------------------","metadata":{}}]}