{"cells":[{"metadata":{"_uuid":"bcb717e9a9f08c493a2cce36420beb373622affc"},"cell_type":"markdown","source":"**Initial Analysis**\n\n*Please note, the data used in this kernel were created using Stata. The primary files including the analysis are avaiable upon request. All data that is used is directly created from the provided data sets. This kernel is intended to illuminate some of the analysis included in my submission*\n\nAs mentioned in the description for this project, the NFL has instituted more than 50 rule changes since 2002 targeted at reducing player injuries. These studies have focused on the mechanics of how concussions occur (Ocwieja et al. 2012) and how to limit contact on special teams plays such as kickoffs and punts to reduce player injuries. (Adelson 2012, Johnson 2012, Ruestow et al. 2015) The rules that the NFL has implemented have already encompassed and addressed some of the suggested rule changes with respect to: formation, tackling techniques or blocking rules. Since these changes have already been implemented but concussions for punts are still an issue, I suggest examining punts themselves to determine where the risk factor for the play comes from and what can be done to influence punt results to directly impact injury likelihood. My proposed rule change would be to move the starting location of a touchback for punts. \n\nIn my recent working paper (currently under submission to academic journals), we examine the impact of the 2011 NFL kickoff rule change on player injuries. (Richardson and Lindrooth 2018) I use the findings and methods from this study to form my proposed rule change. Moving the touchback location on punts is intended to induce the punting team to more frequently attempt punts that result in a touchback which reduces the exposure for players. "},{"metadata":{"_uuid":"3c68ea7750d04081ac2454b713af4fcbe8213fe6"},"cell_type":"markdown","source":"**Debunking Common Theories**\n\nOne theory that seems to be thrown out quite a bit is that players who play outside or off the line of scrimmage are more likely than those who play at the line of scrimmage to be injured. To assess if this is true or not, we need to look at the positions for those that were injured and the injurers on each of the given concussion plays. Using the known concussion plays and the diagram provided we can then begin to look at the specific data of player positions.\n\nTo understand where this idea comes from, I create the below plot that looks at the point of impact for all 33 concussions where we know the point (or at least have assumed knowledge of the point) where the concussion event occurred at."},{"metadata":{"trusted":true,"_uuid":"a3396b66e53b6e1b1a8293ebddf26fc387fef6cb"},"cell_type":"code","source":"# Plot Collision Point\ndist.df <- read.csv(\"../input/analysis-data/NSG_Data_Collision_XY_Long2.csv\")\n  dist.df$ydlabel <- round(dist.df$collision_from_puntstart,2)\n# --------------------------------------------\nlibrary(ggplot2)\nlibrary(maps)\nlibrary(ggthemes)\nlibrary(ggrepel)\n# --------------------------------------------\np <- ggplot(dist.df, aes(x = player_x, y = player_y, color = dot_type)) +\n       geom_point(size = 3)\n  \n  p + geom_label_repel(data = dist.df,\n                       aes(label = dist.df$ydlabel, x = player_x, y = player_y, \n                           fill = factor(dot_type)), \n                       min.segment.length = 0, segment.size = 0.8, \n                       show.legend = FALSE, color = 'black') +\n    scale_x_continuous(breaks = seq(0,100,10),\n                       labels = c(\"G\",\"10\",\"20\",\"30\",\"40\",\"50\",\"40\",\"30\",\n                                  \"20\",\"10\",\"G\")) + ylim(0,53.33) + \n    expand_limits(x = c(0,100)) +\n      labs(title = \"Collision Point - NFL Punts\", x =\"Yard-Line\", \n           y = \"\", color = \"Injured/Partner\") +\n              theme(legend.title = element_text(size = 14, face = \"bold\"),\n              legend.text = element_text(size = 12),\n              legend.background = element_rect(fill=\"gray80\", size=0.5, \n                                               linetype=\"solid\"),\n              plot.title = element_text(hjust = .5, size = 24, face = \"bold\",\n                                        color = \"white\"),\n              plot.background = element_rect(fill = \"black\", color = \"black\"),\n              panel.background = element_rect(fill = \"chartreuse4\", \n                                              colour = \"chartreuse4\", \n                                              size = 0.5),\n              panel.grid.major.y = element_blank(),\n              panel.grid.minor.y = element_blank(),\n              panel.grid.minor.x = element_blank(),\n              axis.text.x = element_text(size = 12, face = \"bold\", \n                                         colour = \"white\"),\n              axis.title.x = element_text(size = 12, face = \"bold\", \n                                         colour = \"white\"),\n              axis.text.y = element_blank(),\n              axis.ticks=element_blank(),\n              legend.position = c(0.08, 0.09))","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"07091ebd405e322f05b2998cc709e1ba2999bf1f"},"cell_type":"markdown","source":"In my own analysis changing the formation was an easy starting point. Graphs like this that show both the location of the collision point but also the total distance that the two players travel prior to colliding reinforces the notion that a formation change is a good solution to preventing injuries. One problem with such a graph is that it assumes that these collisions all share outside or wide positions. That's simply not the case, when you amend the plot to instead use the player positions, we begin to see that it's a wide distribution of positions that are involved in these hits."},{"metadata":{"trusted":true,"_uuid":"29f369a5c75d2d1e456054b4e23c0c95b610804c"},"cell_type":"code","source":"  p + geom_label_repel(data = dist.df,\n                       aes(label = dist.df$player_pos, x = player_x, y = player_y, \n                           fill = factor(dot_type)), \n                       min.segment.length = 0, segment.size = 0.8, \n                       show.legend = FALSE, color = 'black') +\n    scale_x_continuous(breaks = seq(0,100,10),\n                       labels = c(\"G\",\"10\",\"20\",\"30\",\"40\",\"50\",\"40\",\"30\",\n                                  \"20\",\"10\",\"G\")) + ylim(0,53.33) + \n    expand_limits(x = c(0,100)) +\n      labs(title = \"Collision Point - NFL Punts\", x =\"Yard-Line\", \n           y = \"\", color = \"Injured/Partner\") +\n              theme(legend.title = element_text(size = 14, face = \"bold\"),\n              legend.text = element_text(size = 12),\n              legend.background = element_rect(fill=\"gray80\", size=0.5, \n                                               linetype=\"solid\"),\n              plot.title = element_text(hjust = .5, size = 24, face = \"bold\",\n                                        color = \"white\"),\n              plot.background = element_rect(fill = \"black\", color = \"black\"),\n              panel.background = element_rect(fill = \"chartreuse4\", \n                                              colour = \"chartreuse4\", \n                                              size = 0.5),\n              panel.grid.major.y = element_blank(),\n              panel.grid.minor.y = element_blank(),\n              panel.grid.minor.x = element_blank(),\n              axis.text.x = element_text(size = 12, face = \"bold\", \n                                         colour = \"white\"),\n              axis.title.x = element_text(size = 12, face = \"bold\", \n                                         colour = \"white\"),\n              axis.text.y = element_blank(),\n              axis.ticks=element_blank(),\n              legend.position = c(0.08, 0.09))","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"1af638d5e471d5aeb0ea8ec641592ca7f1caed9c"},"cell_type":"markdown","source":"***Further Exploring the Red Herring of Formation Changes***\n\nTo better understand if changing the formation would be effective, I classify players as either lining up on the line of scrimmage or not on the line of scrimmage (this includes all players who lineup outside the numbers traditionally). For not on the line of scrimmage players I use two different measures. *The difference in the two measures comes from whether we consider players designated as the wing players (i.e. PRW, PLW…) and return linebackers (PLL, PLM, …) to be considered ‘off the line of scrimmage’ or not. The latter statistic reflects when these players are included versus the former not including these players.*\n\nAfter examining the positional data for each player (injured or injurer) I find that 56.76 – 75.68 percent of all concussions involved at least one player that lined up not on the line of scrimmage.  In comparison, 67.57 percent of the plays involved at least one player that was lined up on the line of scrimmage."},{"metadata":{"_uuid":"aec26b9ab717cb33ca3f82d82e76ed8312eb43d7","trusted":true},"cell_type":"code","source":"library(fBasics)\n\npos.df <- read.csv(\"../input/analysis-data/allconc_addpositions.csv\") \n  pos.df.small <- subset(pos.df, select = c(nonlos_injplayer, nonlos_injprtnr, nolos_eitherplayer,\n                                            nonlos_injplayer2, nonlos_injprtnr2, nolos_eitherplayer2,\n                                            line_injury, line_injurer, line_eitherinjury))\n\nbasicStats(pos.df.small)[c(\"nobs\",\"Mean\"),]   \n","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"c19927ab361011f7712275bc0692cd1b4a2ed7d5"},"cell_type":"markdown","source":"These results initially suggest that a formation change would have some impact on concussion likelihood. However, when I examine the two-way frequencies between the No LOS injuries and the LOS injuries, we see that targeting a formation change is more likely a red herring than effective solution. Of the 37 concussion events, 17 involved only players who were both lined up on the line of scrimmage. 8 of the 37 concussion plays involved only players both not lined up on the line of scrimmage, while 8 of the 37 concussion plays involved at least one player lined up on the line of scrimmage and one player lined up not on the line of scrimmage. Based on these results I argue that a rule that would only be effective in targeting 8 of the 37 events would be ineffective."},{"metadata":{"trusted":true,"_uuid":"386d81a6516e1a76dc7361ea6cbbd6316c65b98f"},"cell_type":"code","source":"library(expss)\n  pos.df.small <- apply_labels(pos.df.small,\n                               nonlos_injplayer = \"Not LOS - Injured Player\", \n                               nonlos_injprtnr = \"Not LOS - Injured Partner\", \n                               nolos_eitherplayer = \"Not LOS - Either Player\", \n                               nonlos_injplayer2 = \"Not LOS (All)- Injured Player\", \n                               nonlos_injprtnr2 = \"Not LOS (All) - Injured Partner\", \n                               nolos_eitherplayer2 = \"Not LOS (All) - Either Player\", \n                               line_injury = \"LOS - Injured Player\", \n                               line_injurer = \"LOS - Injured Partner\", \n                               line_eitherinjury = \"LOS - Either Player\")\n\ncro(pos.df.small$nolos_eitherplayer2, pos.df.small$line_eitherinjury)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"6aa193e9ac9a5a889df9ae0eb8c7a83975ad5f83"},"cell_type":"markdown","source":"9 of 37 concussion plays involved only players who were both lined up on the line of scrimmage. 12 of the 37 concussion plays involved only players both not lined up on the line of scrimmage or not lined up near the boundary. 16 of 37 concussion plays involved at least one player lined up inside and on the line of scrimmage and one player lined up either off the line of scrimmage or outside near the sidelines.  Based on these results, a rule change targeted at narrowing the punting formation would only be effective for 9 of the 37 concussions plays which I suggest is largely ineffective relative to other possible rule changes.\n\nOne final set of tests is to look at the number of other collisions that occur during the plays in question and then to look at the velocity of contact of the players at the point of contact depending on if a player had any other collisions prior to the concussion event."},{"metadata":{"trusted":true,"_uuid":"5a884e94b6c03b127a85e0fa919be6122d109385","scrolled":true},"cell_type":"code","source":"othcol.df <- read.csv(\"../input/analysis-data/other_collisions.csv\")\n\n  othcol.df <- apply_labels(othcol.df,\n                            tot_injured_dis = \"Injured Distance\", \n                            injured_velocity = \"Injured Velocity (yds/s)\", \n                            injured_velocity_mph = \"Injured Velocity (mph)\", \n                            tot_injpartner_dis = \"Partner Distance\", \n                            injurer_velocity = \"Partner Velocity (yds/s)\", \n                            injurer_velocity_mph = \"Partner Velocity (mph)\", \n                            avg_cmbne_velocity_mph = \"Average Combined Velocity (mph)\", \n                            num_oth_collision_injplayer = \"Number of Other Collisions (Injured)\", \n                            num_oth_collision_injpartner = \"Number of Other Collisions (Partner)\")\n\n  fre(othcol.df$num_oth_collision_injplayer)\n  fre(othcol.df$num_oth_collision_injpartner)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"788bea013bb889ef80523df42f9ceb08903b3482"},"cell_type":"markdown","source":"For the 33 concussion plays where we know where the concussion collision event occurs, 3 injured players had one other possible collision event, 3 injured partners had one other possible collision event, and 1 injured partner had two other possible collision events. None of the other collisions occurred on the same play, i.e. only the injured or injured partner had more than one possible other collision for the 33 punts.\n\nWhen we examine the total distance that is covered and velocity at impact for players who did and did not experience another collision prior to the concussion event; we find little evidence that the average speed of the combined two players at impact is affected. Though the average speed of a player is reduced when they experience the impact, the resultant average collision impact is essentially equal at the contact point. The only exception is for the one punt where the injured partner had two collisions. Given the small sample size, there is no statistical evidence that more initial collisions slow or impedes the collision speed at the concussion point."},{"metadata":{"trusted":true,"scrolled":true,"_uuid":"c1bd0ed102257dc8b8b12a2790c12b5301de242b"},"cell_type":"code","source":"  othcol.df %>%\n    tab_cells(tot_injured_dis, injured_velocity, injured_velocity_mph, tot_injpartner_dis, \n              injurer_velocity, injurer_velocity_mph, avg_cmbne_velocity_mph) %>%\n    tab_cols(num_oth_collision_injplayer, num_oth_collision_injpartner) %>%\n    tab_stat_fun(Mean = w_mean, \"Std. dev.\" = w_sd) %>%\n    tab_pivot()","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"b1eb09b55dc738053e8de84d7daf4ba9e96da62c"},"cell_type":"markdown","source":"**Rule Change Suggestion**\n\n***Move the starting location of touchbacks on punts from the 20 yard-line to either the 10- or 15- yard line.***\n\nUsing previous research, I have completed (https://mpra.ub.uni-muenchen.de/90314/) my co-author and I find that the best way to prevent injuries is to reduce kickoff returns. The goal then for moving the location of a touchback to the 10- or 15-yard line would be to then incentivize more touchbacks as a guaranteed way to reduce player injuries. My proposed rule change directly stems from the results we find in our paper: to reduce the risk of injury, the number of returns on punts must decrease.\n\nUsing the provided play information data, I use the play text to search every punt to determine if a return occurred or not. Of the 6,681 punt plays, there were 3,971 that were returns and 2,700 that were not returns. (10 plays could not be identified as they involved either a declined penalty or some other play that fell out of the scope of a return occurring.) I further extend this text search to look for other injuries that occurred and were reported in the play information that were not known concussion plays. I classify these as other injuries as it does not specifically state what type of injury occurred, only that a player was injured on the play. This leaves us with injuries occurring on a total of 123 of 6,681 punts, 37 of these were concussions (or known concussions) and 86 were identified ‘other’ injuries. (*See the punt_analysis_data for this analysis data prepared data set*). \n\nThe initial justification of my proposed rule change stems from the frequency of concussions and other injuries occurring more frequently on plays where a return occurs than on any other outcome.  Of the 123 total injuries, 90 (73.1%) occurred when a return occurred. The next highest play type that resulted in a player injury was muffed catches with 8 (6.5%), followed by downed and out of bounds punts with 7 (5.67%) each. Of the 37 concussions, 29 (78.38%) occurred during a punt return."},{"metadata":{"trusted":true,"_uuid":"895b771ff9ea214ae7d11519350dab3693190734"},"cell_type":"code","source":"analysis.df <- read.csv(\"../input/analysis-data/punt_analysis_data.csv\")\n    analysis.df2 <- analysis.df[!is.na(analysis.df$punt_totalyards), ]\n    analysis.df2 <- analysis.df2[!is.na(analysis.df2$time_left), ] \n  \n    analysis.df2 <- apply_labels(analysis.df2,\n                                 any_inj = \"Any Injury\", \n                                 conc_inj = \"Concussion\",\n                                 oth_inj = \"Other Injury\",\n                                 returns = \"Punt Return\",\n                                 punt_totalyards = \"Punt Total Yards\",\n                                 team_game_state = \"Punt Team Point Differential\",\n                                 time_left = \"Time Remaining in Game\",\n                                 home_game = \"Home Game\",\n                                 seasonality = \"Game Month\",\n                                 touchback = \"Touchback\",\n                                 downed = \"Downed\",\n                                 faircatch = \"Fair Catch\",\n                                 outofbounds = \"Out-of-Bounds\",\n                                 blocked = \"Blocked\",\n                                 noplay = \"No Play\", \n                                 muffcatch = \"Muffed Catch\",\n                                 fakepunt = \"Fake-Punt\", \n                                 otherpuntresult = \"Other Play\")\n  \n    expss_digits(2)\n    analysis.df2 %>%\n    tab_cells(returns, touchback, downed, faircatch, outofbounds, blocked, \n              noplay, muffcatch, fakepunt, otherpuntresult) %>%\n    tab_cols(total(), any_inj, conc_inj, oth_inj) %>%\n    tab_stat_fun(Mean = w_mean) %>%\n    tab_pivot()\n","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"3ec9b8531a3fbfbfad59e03059860d280ba37575"},"cell_type":"markdown","source":"***Rule Change Analysis***\n\nMy analytic plan uses a logistic regression to first find the marginal effects of punt returns on: Any Injury, Concussions, and Other Injuries respectively. After completing the initial analysis, I then simulate the expected impact to each injury type’s probability based on moving the touchback location to 10- and 15- yard lines respectively. This simulation allows me to predict the reduction in the number of each injury type based on the proposed rule change. *[Note: I include greater detail in my competition proposal on the model specification and the simulation mechanism, this kernel only includes the general calculations that led to my relevant findings]*\n\nThe marginal effects of punt returns and other covariates on each injury type are presented in the table below. As it shows, the marginal effects for all three injury measures are statistically significant and measures the change in the probability of an injury occurring if a punt return occurs. These results thus suggest that a return occurring increases the likelihood of any injury by 2.29%, of a concussion occurring by 0.92%, and other injuries by 1.38%. For concussions, no other covariate is statistically significant and for all injuries and other injuries only home games are significant and suggest that a home game reduces the risk of an injury on punts."},{"metadata":{"trusted":true,"scrolled":false,"_uuid":"0819aba4b34da5440830eddd99cda64ddbd5c648"},"cell_type":"code","source":"# Appologies for the unnatractive results, I could not figure out how to create the R wrapper to label the variables\nlibrary(margins)  \n  any.inj <- lm(any_inj ~ returns + punt_totalyards + team_game_state + \n                  time_left + home_game + seasonality, data = analysis.df2)\n    any.inj.me <- margins(any.inj)\n    \n  conc.inj <- lm(conc_inj ~ returns + punt_totalyards + team_game_state + \n                 time_left + home_game + seasonality, data = analysis.df2)\n    conc.inj.me <- margins(conc.inj)\n    \n  oth.inj <- lm(oth_inj ~ returns + punt_totalyards + team_game_state + \n                 time_left + home_game + seasonality, data = analysis.df2)\n    oth.inj.me <- margins(oth.inj)\n\n  summary(any.inj)\n  summary(conc.inj)\n  summary(oth.inj)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"df24ab8380ea1ade1a4cffb41d1830cf1616a118"},"cell_type":"markdown","source":"***Simulating Injuries ***\n\nThe next step in the analysis is to simulate the effect on injuries that would occur if the touchback location were changed. I specifically only target touchback location because it is one of the simplest things to change and something that is guaranteed to reduce returns if increased. To simulate what would happen if touchback location were to change, a few assumptions must be made prior to simulating the predicted probability of an injury occurring post rule change. I also test both the 15- and 10-yard line to see if any significant difference occurs in terms of the change in probability, with the 15-yard line serving as the conservative version of the rule change and the 10-yard line serving as the aggressive form of the rule change.\n\nThere are two assumptions I make when simulating the effects of the rule changes. First, I assume that any kick that was returned that was received between the 15- and 20-yard lines would instead be a touchback for the 15-yard line rule change; I then repeat this assumption for the 10-yard line touchback rule change if any punt received between the 10- and 20-yard lines is a touchback. Admittedly this is an aggressive set of assumptions which is why I test a second set of assumptions in the simulation for comparison. The second set of assumptions uses the total number of punt yards in addition to the first assumption. Using the first set of assumptions we then add a rule that returns are only converted to touchbacks for each rule if the ball was received and returned between the respective yard lines and that the total punt yards was less than or equal to 60 which is equivalent to the mean standard total of yards on a punt plus 1.5 standard deviations (μ+1.5×σ).\n\nI do not include the code to do this here. It involves resetting the results, taking the new predicted results, and then taking the difference between the baseline predicted results and each simulated touchback yard line predicted results.  *[If you are interested in seeing the code for this please ask, I can provide the Stata code that accomplishes this step of the analysis]* For concussions, moving the touchback location to the 15-yard line is associated with a reduction of 4.43 – 5.06 total concussions, and moving the touchback location to the 10-yard line is predicted to reduce the number of concussions on punts by 7.59 – 8.23. Given that this is a two-season sample we must interpret the results in this context, that the reductions are over this two-season period or that if we wanted a per season prediction, we would reduce the results in half. Note that there is a significant difference when moving the touchback location only to the 15-yard line compared to moving it to the 10-yard line, where moving it to the 10-yard line shows the greatest number impact in reducing predicted injuries. \n"}],"metadata":{"kernelspec":{"display_name":"R","language":"R","name":"ir"},"language_info":{"mimetype":"text/x-r-source","name":"R","pygments_lexer":"r","version":"3.4.2","file_extension":".r","codemirror_mode":"r"}},"nbformat":4,"nbformat_minor":1}