{"cells":[{"metadata":{"trusted":true,"_uuid":"0b94cf1ffceb8b6465439e5c413d11bbc27cfd2f","_kg_hide-output":true,"_kg_hide-input":false,"scrolled":true},"cell_type":"code","source":"library(dplyr)\nlibrary(readr)\nlibrary(ggplot2)\nlibrary(ggthemes)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"4f29ae39364a9462be187814f2147756fec09993"},"cell_type":"markdown","source":"Author: Cristian Becerra\n\n***As we go through this kernel and analyze the data, our approach is to keep things simple. We hope to provide a rule change that will maintain the integrity of the game while reducing the amount of concussions occuring each year. In addition, there were a lot of cool ideas we had for analyzing the data, but remembered we had to keep our analysis as relevant as possible to a feasible rule change. This is what our kernel will reflect, we hope you enjoy!***\n\n****Descriptions of process and insights are labeled with the corresponding code [number]. In addition, key insights will be bolded****\n\n**Understanding the Injury Data at a high level:**\n\nTo get started we will need to get an idea of what the injury data tells us before we start thinking about an approach for mitigating concussions. [2] Starting with the video_review and play_player_role_data we can look at the injury plays from a high level to inform an approach."},{"metadata":{"trusted":true,"_uuid":"9cf40e02a698553b6ca53eb6482d10261b410659","_kg_hide-input":false,"scrolled":true,"_kg_hide-output":true},"cell_type":"code","source":"video_review <- read_csv(\"../input/NFL-Punt-Analytics-Competition/video_review.csv\")\nplay_player_role_data <- read_csv(\"../input/NFL-Punt-Analytics-Competition/play_player_role_data.csv\")","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"36fb022ee0a7011cd7bd6930ea0b67f1566359fb"},"cell_type":"markdown","source":"[3] We see there is a near even split of injuries by year. From a very broad sense this tells us the number of injuries occuring each season did not change from any external factors. This is good, and we will have a sufficient number of concussions to analyze year over year."},{"metadata":{"trusted":true,"_uuid":"6cd102fb9e31ef9562a2d63b859a5a6dc8817d09","scrolled":true},"cell_type":"code","source":"video_review %>% group_by(Season_Year) %>% summarise(Total_Concussions = n())","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"a61886f5722f3a6b9e3be301e39ffacf199c4502"},"cell_type":"markdown","source":"[4] There is a near even split when looking at the activities associated with concussions by year. If there was a very uneven split between the activities this would give us a specific  focus area. However, we still have to figure out where the largest impact will be for some kind of change to the game without hindering the current competitiveness/gameplay."},{"metadata":{"trusted":true,"scrolled":false,"_uuid":"6bed3dd0655a7ec36d6a913d256b1ebd74d2713c"},"cell_type":"code","source":"video_review %>% group_by(Season_Year, Player_Activity_Derived) %>% summarise(Total_by_Activity = n())\nvideo_review %>% group_by(Season_Year, Player_Activity_Derived) %>% summarise(Total_by_Activity = n()) %>% ggplot(aes(Player_Activity_Derived, Total_by_Activity, fill = Season_Year)) + geom_bar(stat=\"identity\", position = \"dodge2\")","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"8f9cc415cd6a833887f5393feba254aa9e8a4f04"},"cell_type":"markdown","source":"[5] **We see high majority of injuries also happen by Helmet-to-body and Helmet-to-helmet contact.** Helmet-to-body impact slightly decreased in 2017 while Helmet-to-helmet slightly increased in 2017. These Impact Types can be spread over different types of Activities, but it is great to understand the technique behind the activities. We will remember what kind of Impacts the players are having during these injuries."},{"metadata":{"trusted":true,"_uuid":"7a7652f7f841278fc9c1a95086098ca0ade7f884","scrolled":false},"cell_type":"code","source":"video_review %>% group_by(Season_Year, Primary_Impact_Type) %>% summarise(Total_by_Impact = n())\n\nvideo_review %>% group_by(Season_Year, Primary_Impact_Type) %>% summarise(Total_by_Impact = n()) %>% ggplot(aes(Primary_Impact_Type, Total_by_Impact, fill = Season_Year)) + geom_bar(stat=\"identity\", position = \"dodge2\")","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"fcfb93262919987874bcfef51a661540bdde7784"},"cell_type":"markdown","source":"[6] Friendly fire is not a very common occurence. We see it happens, but not a significant amount. This won't be something to focus on moving forward in the analysis."},{"metadata":{"trusted":true,"_uuid":"21c71fd977b97c51cc459b3b8d2f821ebd808517","scrolled":false},"cell_type":"code","source":"video_review %>% group_by(Season_Year, Friendly_Fire) %>% summarise(Total_by_FriendlyFire = n())","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"9b94da67207869c845df182ba60119171bba5592"},"cell_type":"markdown","source":"Now, we can look a little deeper at the video_review data by asking what roles are most common for injuries?\nIt is easy to imagine the ball carrier/tackler being injured the most at high speeds, lets see if this is true...\n\n[7] First, we will need to connect the video_review data w/ the play_player_role_data. "},{"metadata":{"trusted":true,"_uuid":"ed6514cdc22bbcff153860a303f7153f76899044"},"cell_type":"code","source":"Primary_Player_Role <- merge(video_review, play_player_role_data, by = c(\"Season_Year\",\"GameKey\",\"PlayID\",\"GSISID\")) %>% mutate(Player_Role=Role, Player_GSISID=GSISID) %>% select(-Role, -GSISID) %>% mutate(GSISID=Primary_Partner_GSISID) %>% select(-Primary_Partner_GSISID)\nPrimary_Partner_Role_Added <- merge(Primary_Player_Role, play_player_role_data, by = c(\"Season_Year\",\"GameKey\",\"PlayID\",\"GSISID\"), all.x = TRUE) %>% mutate(Partner_Role=Role, Partner_GSISID=GSISID) %>% select(-Role, -GSISID)\nhead(Primary_Partner_Role_Added)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"3342d4f3ba7855aa7370c9cda89c897235e16ecb"},"cell_type":"markdown","source":"[8] For the **Injured Player**, we see some roles getting injured a bit more, but no outliers.\n\n**Also, by looking at the Player_Role, we see that majority positions injured are on the punting team.** So, the injury players are either getting **blocked** or **tackling**.\n\nIf we remember the Impact Type from above, we now know that players are getting blocked badly by hitting head-to-head/body or tacklers are tackling poorly by hitting head-to-head/body. This is how a large amount of the injuries are occuring. **When adding the Percent_Total_Concussions of Blocked & Tackling we see 62% of injuries are on the punting team.**"},{"metadata":{"trusted":true,"_uuid":"ad512a65d0b115e1dcfd6c66adfd7d8a8fbd7340","scrolled":true},"cell_type":"code","source":"Primary_Partner_Role_Added %>% group_by(Player_Role) %>% summarise(Total=n())\nvideo_review %>% group_by(Player_Activity_Derived) %>% summarise(Percent_Total_Concussions = n()/37)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"25ac46960b2caefe7da0105121eec69172f8ea8a"},"cell_type":"markdown","source":"![](http://storage.googleapis.com/kaggle-media/competitions/NFL%20player%20safety%20analytics/punt_coverage.png)"},{"metadata":{"_uuid":"2ff47500bad9c6b86194a7d309ac0a10594a746b"},"cell_type":"markdown","source":"[9] We see the similar counts for partner roles with the Punt Returner (PR) being the only injury partner that looks like an outlier. **From the Partner table, this means the PR isn't getting hurt a lot, the person tackling the PR is getting hurt. This recognizes bad tackling as mentioned above.**"},{"metadata":{"trusted":true,"_uuid":"6c61e340069d9baf646b9066e627d3e4ccfbdbc8"},"cell_type":"code","source":"Primary_Partner_Role_Added %>% group_by(Partner_Role) %>% summarise(Total=n())","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"5b7b1d006bacd64fc96fcb294695e3a8636cf5f4"},"cell_type":"markdown","source":"![](https://storage.googleapis.com/kaggle-media/competitions/NFL%20player%20safety%20analytics/punt_return.png)"},{"metadata":{"_uuid":"87aaf2525fb0f5c37c172812b1a80dd8dca9523e"},"cell_type":"markdown","source":"[10] In addition, there is no common combination of players and their partners during an injury play.\n**This potentially recognizes the difficulty in changing a play/formation that will decrease concussions because any player is equally likely to be the one getting a concussion from a collision with any other opposing team player.**"},{"metadata":{"trusted":true,"_uuid":"9be943202d3ee5758d92c29578be3538c97212ee","scrolled":true},"cell_type":"code","source":"Primary_Partner_Role_Added %>% group_by(Player_Role, Partner_Role) %>% summarise(Total=n())","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"a83b94009a97ca5f59844bd2b5095ad62feaed20"},"cell_type":"markdown","source":"**Taking a step back from the data:**\n\nAfter getting an idea of what the injury data tells us, we decided to sit down and watch all of the videos provided.\n\n**What we currently know heading into video clips:**\nThe punting team is more likely to get hurt and this happens through helmet collisions from being blocked or making bad tackles. In addition, we recognize mitigating injury through play formations would be very hard since any player is likely to get injured through either event.\n\n**Insights from videos:**\nWatching the videos was great insight for understanding the overall punt plays, outcomes, and technique used during the play. We saw what we expected to see in the way players tackled and blocked.\nBy watching the videos we noticed the players blocking were commonly using their bodyweight to lunge forward towards their partner to make a block while leading with their shoulders. \nThis blocking technique would lead to an injury to either them or the player being blocked. We noted this technique very closely to think about an applicable rule change moving forward.\nIn addition, players tackling used similar technique to tackle the ball carrier while running down the field. This led to direct helmet collisions for the tackler. \n\n**Here are links to some examples of the technique described above:**\n\nBlocking:\n\n* http://a.video.nfl.com//films/vodzilla/153252/44_yard_Punt_by_Justin_Vogel-n7U6IS6I-20181119_161556468_5000k.mp4\n* http://a.video.nfl.com//films/vodzilla/153258/61_yard_Punt_by_Brett_Kern-g8sqyGTz-20181119_162413664_5000k.mp4\n\nTackling:\n\n* http://a.video.nfl.com//films/vodzilla/153233/Kadeem_Carey_punt_return-Vwgfn5k9-20181119_152809972_5000k.mp4\n* http://a.video.nfl.com//films/vodzilla/153244/Punt_by_Brad_Wing-5hmlbMBx-20181119_155243111_5000k.mp4\n\n\n\nNow we can take a step back to think about how we want to use the NGS data...\n\n**To start, we decided that concussions caused by tackling would be taken out of our main focus for this analysis. We know there was a new rule introduced in 2018 that makes the lowering of the helmet to make contact a foul [(12-2-8)](https://operations.nfl.com/the-rules/2018-nfl-rulebook/#article-6.-defensive-holding376). ** \nSince we do not have the data for 2018, we were not sure how this rule change affects concussions caused by tackles in 2018 as well as for future seasons. \nWe would like to assume this rule change will bring about better tackling techniques, thus reducing concussions caused by tackling.\n**On the flipside, we know blocking and being blocked holds the other half of total concussions so this became the focus area for a rule change.**"},{"metadata":{"_uuid":"d56c78136f9d063a97a7ebf2fbaed81697e81b2f"},"cell_type":"markdown","source":"**Using the NGS to provide insights:**\n\nAnother important question we had was, how much does speed matter for the injuries? After looking at the plays, it is clear that some players are moving very fast while others aren't.\nWe can look a little deeper at the NGS data for 2017 and 2016.\n\n[11] You will see that the data imported looks different compared to the original NGS data provided. \nFor the time being I preferred to do some of the wrangling in Access Database where I am more comfortable performing the proper data quality checks (This is my first kernel). \n\nThe data imported consists of NGS data for ONLY the two players involved in the injury for all injuries in 2016-2017. This means that the player and their primary partner were queried out of the entire data for all 37 punt plays.\nAll of the data was brought together to create two large tables (2017 & 2016) and the column 'Player' was added to signify if they are the 'Injury Player' or 'Injury Partner'. \n\nWe started by looking at 2017."},{"metadata":{"trusted":true,"_uuid":"fa2da2d309370788c79208fcf72f5a62bf1a3d61","scrolled":false},"cell_type":"code","source":"NGS_2017_Injury_Data <- read_csv(\"../input/ngs-2017-data/NGS 2017 Data.csv\")","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"45dc7e9406dfd5f9ffb50d222b61ec1c90acb35f"},"cell_type":"markdown","source":"[12] Adding speeds(MPH) to each player."},{"metadata":{"trusted":true,"_uuid":"1486dc63c3441b4db9f1666e313b47f8a8ebe00a"},"cell_type":"code","source":"NGS_2017_AddMPH <- NGS_2017_Injury_Data %>% mutate(MPH = dis*10*60*60*0.000568182)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"ec58df27b623c479c57c26f8498cf456ff8f197e"},"cell_type":"markdown","source":"[13] Filter for ONLY the Injury Player, and add an interval of 1 yard to each x & y coordinate. \nThe interval will locate the point in time at which each player and their partner came into contact causing the injury."},{"metadata":{"trusted":true,"_uuid":"0c4be0d446f75789fb77bdbc353b48cec806d9f9"},"cell_type":"code","source":"NGS_2017_Injury_Players <- NGS_2017_AddMPH %>% filter(Player==\"Injury Player\") %>% mutate(xLow=x-1, xHigh=x+1, yLow=y-1, yHigh=y+1)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"9515d615c589045fd27a258518e7e45b6a47e8bf"},"cell_type":"markdown","source":"[14] Filter for ONLY the Injury Partner."},{"metadata":{"trusted":true,"_uuid":"f815297fe2b9b85e2c650f3afe9971db6638aa3f"},"cell_type":"code","source":"NGS_2017_Injury_Partners <- NGS_2017_AddMPH %>% filter(Player==\"Injury Partner\")","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"1d4cfb541429e89e90816a7045ef2f592600507c"},"cell_type":"markdown","source":"[15] Merge two tables so the coordinates are aligned within a row for each pair of players."},{"metadata":{"trusted":true,"_uuid":"1592d4c17b2f14807e1c62c9645313ee16b5c7d9"},"cell_type":"code","source":"NGS_2017_Aligned_Players <- merge(NGS_2017_Injury_Players, NGS_2017_Injury_Partners, by = c(\"GameKey\", \"PlayID\", \"Time\"), all.x = TRUE)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"b7dc8249cc5890810db3015f422841cc42f887a9"},"cell_type":"markdown","source":"[16] Check if the partner is within the coordinate intervals of the player who was injured. \nFilter for data points where this is true, meaning the players came into direct contact with their partners at this point in time.\nOutput the max speed right before each contact moment, this avoids outputing the speed during contact which would be slower upon collision. In addition, the 1 yard intervals avoid catching inflated speeds before contact."},{"metadata":{"trusted":true,"_uuid":"9e2abf9aa7f543b0155150ece95cec7b6f3d6672"},"cell_type":"code","source":"NGS_2017_Intervals <- NGS_2017_Aligned_Players %>% mutate(x_interval= x.y>=xLow & x.y<=xHigh, y_interval= y.y>=yLow & y.y<=yHigh, Contact=x_interval==TRUE & y_interval==TRUE)\nNGS_2017_Contact <- NGS_2017_Intervals %>% filter(Contact==TRUE) %>% group_by(GameKey, PlayID, GSISID.x, GSISID.y) %>% summarise(Player_MPH=max(MPH.x), Partner_MPH=max(MPH.y))\nNGS_2017_Contact","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"9d6f6b9a0a62302ae3799eee1b9261c3ac196829"},"cell_type":"markdown","source":"GSISID.x = Player\n\nGSISID.y = Partner\n\n**Disclaimer:**\nThe output shown has only 14 players with their partners. Recognize that 2017 had 18 concussions. 3 of these concussions had unidentifiable partners that were part of the injury. \nWithout partner data, we can't tell when exactly they came into contact with the other player. This means we can't pinpoint their speed during contact with the current NGS data. \nIn addition, 1 play has partner data, but not data for the entire play. After some digging/analysis we realized there is partner data for only about half of the play. This cutoff before contact as far as we can tell doesn't allow us to find the speed during contact with the other player. \nThis leaves us with 14 comparable concussions speeds, representing majority of 2017 data."},{"metadata":{"_uuid":"67010e38531eafcbc44ce882bae468d55fef7c84"},"cell_type":"markdown","source":"[17] This is the average Player Speed"},{"metadata":{"trusted":true,"scrolled":true,"_uuid":"8cf778f935cf1de8aace07eacddb547c4ef6e823"},"cell_type":"code","source":"Avg_Player_MPH_2017 <- mean(NGS_2017_Contact$Player_MPH)\nAvg_Player_MPH_2017","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"113457cf0d4a00334ae544242c913f5453592484"},"cell_type":"markdown","source":"[18] This is the average Partner Speed"},{"metadata":{"trusted":true,"_uuid":"29280bef90a19aedee23548c7d40b1c0243d5031"},"cell_type":"code","source":"Avg_Partner_MPH_2017 <- mean(NGS_2017_Contact$Partner_MPH)\nAvg_Partner_MPH_2017","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"75de1d4c0382d533a3d2dab1f234531e12bba2a9"},"cell_type":"markdown","source":"We see that speeds on average are about 10MPH for both the Player(9.7) and the Partner(10.3). \n**It is not common for either the Player or the Partner to be moving much faster before the contact that caused the injury. The largest disparity is about 5.5MPH.**\n\n**With a minimum pair of speeds of 4MPH & 8MPH and a maximum of 17MPH & 17MPH we see that a concussion can in fact happen at lower speeds.**\n**This means there should be a focus on variables beyond the only speed of the players. **\n\n[19] Speeds don't represent a normal distribution."},{"metadata":{"trusted":true,"_uuid":"f6e9b56636e4851abe200391e758b53ccbebaddf","scrolled":false},"cell_type":"code","source":"NGS_2017_Player_MPH <- NGS_2017_Contact %>% mutate(MPH=Player_MPH, Player=\"Injury_Player\")\nNGS_2017_Partner_MPH <- NGS_2017_Contact %>% mutate(MPH=Partner_MPH, Player=\"Injury_Partner\")\nAll_2017_MPH <- rbind(NGS_2017_Player_MPH, NGS_2017_Partner_MPH)\n\nAll_2017_MPH %>% ggplot(aes(round(MPH, 0), fill = Player)) + geom_histogram()","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"ab1f6d66b77cfa8c2449f2bbfb93d785763e057b"},"cell_type":"markdown","source":"[20] There is not a strong (>.8) correlation between the Player and Partner speeds. Speeds vary and concussions occur at any speed between 4MPH-17MPH."},{"metadata":{"trusted":true,"_uuid":"81c0d0611278acd9c69182e3937cd53abc89bf90","scrolled":true},"cell_type":"code","source":"corr2017 <- NGS_2017_Contact %>% select(Player_MPH, Partner_MPH)\ncor(corr2017[4], corr2017[5])","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"049c16c4fb09172ff36a6c85b126b48bc5f62045"},"cell_type":"markdown","source":"[21] After running 2017, we can also run the 2016 speeds to see if there are any differences."},{"metadata":{"trusted":true,"_uuid":"fcb3897502e1c677e4aca31b5354f44c34fcbbef","scrolled":false},"cell_type":"code","source":"NGS_2016_Injury_Data <- read_csv(\"../input/ngs-2016-data2/NGS 2016 Data.csv\")","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"cfe4441d8579f782409c9df170924629051ebc86"},"cell_type":"markdown","source":"Note the time format was changed because the original format was not importing correctly.\n\n[22] Adding speeds(MPH) to each player."},{"metadata":{"trusted":true,"_uuid":"d47497f67f9b6f1c7a76ba88bd4729384a30c382"},"cell_type":"code","source":"NGS_2016_AddMPH <- NGS_2016_Injury_Data %>% mutate(MPH = dis*10*60*60*0.000568182)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"cfdd3a0eff1f5c8144fa4cd057596b0bdf0ddba2"},"cell_type":"markdown","source":"[23] Filter for ONLY the Injury Player, and add an interval of 1 yard to each x & y coordinate. \nThe interval will locate the point in time at which each player and their partner came into contact causing the injury."},{"metadata":{"trusted":true,"_uuid":"8a204d9c14b1bb049c5000dc8b1be76d1f93d8ec"},"cell_type":"code","source":"NGS_2016_Injury_Players <- NGS_2016_AddMPH %>% filter(Player==\"Injury Player\") %>% mutate(xLow=x-1, xHigh=x+1, yLow=y-1, yHigh=y+1)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"b50344554a3279103731aee8cc7592c3faea7528"},"cell_type":"markdown","source":"[24] Filter for ONLY the Injury Partner."},{"metadata":{"trusted":true,"_uuid":"1e5b6458dacfd673cadcaa6fe04f89e72b77fdc6"},"cell_type":"code","source":"NGS_2016_Injury_Partners <- NGS_2016_AddMPH %>% filter(Player==\"Injury Partner\")","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"eab16c2f2cd531fa8c6d03ebc10824b226b92975"},"cell_type":"markdown","source":"[25] Merge two tables so the coordinates are aligned within a row for each pair of players."},{"metadata":{"trusted":true,"_uuid":"a86e05ac9c5383ab19f3001f194697561440aff4"},"cell_type":"code","source":"NGS_2016_Aligned_Players <- merge(NGS_2016_Injury_Players, NGS_2016_Injury_Partners, by = c(\"GameKey\", \"PlayID\", \"Time\"), all.x = TRUE)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"7d6c85b47307c4245290152db6bcc6769088c217"},"cell_type":"markdown","source":"[26] Check if the partner is within the coordinate intervals of the player who was injured.\nFilter for data points where this is true, meaning the players came into direct contact with their partners at this point in time.\nOutput the max speed right before each contact moment, this avoids outputing the speed during contact which would be slower upon collision. In addition, the 1 yard intervals avoid catching inflated speeds before contact."},{"metadata":{"trusted":true,"_uuid":"eb68290f8e6a5f01aa47b2c594e64c4723ce55ff","scrolled":true},"cell_type":"code","source":"NGS_2016_Intervals <- NGS_2016_Aligned_Players %>% mutate(x_interval= x.y>=xLow & x.y<=xHigh, y_interval= y.y>=yLow & y.y<=yHigh, Contact=x_interval==TRUE & y_interval==TRUE)\nNGS_2016_Contact <- NGS_2016_Intervals %>% filter(Contact==TRUE) %>% group_by(GameKey, PlayID, GSISID.x, GSISID.y) %>% summarise(Player_MPH=max(MPH.x), Partner_MPH=max(MPH.y))\nNGS_2016_Contact","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"51e409d4eac189f6b298d74a4a994c49430f709b"},"cell_type":"markdown","source":"GSISID.x = Player\n\nGSISID.y = Partner\n\n**Disclaimer:**\n\nOne pair of players is missing so the count for 2016 is 18 comparable speeds instead of 19. This is due to one player not having a partner listed so we were not able to find a point of contact with its speed. This still holds nearly all of the data for 2016."},{"metadata":{"_uuid":"e1a095e03e0ac632b2fcd49c240c3ee083d56755"},"cell_type":"markdown","source":"[27] This is the average Player Speed"},{"metadata":{"trusted":true,"_uuid":"e8a62f46e0283a1aa325225368636a46ec2dc903"},"cell_type":"code","source":"Avg_Player_MPH_2016 <- mean(NGS_2016_Contact$Player_MPH)\nAvg_Player_MPH_2016","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"00f7169ddae7689d6e4b342a6e163c5998499cbc"},"cell_type":"markdown","source":"[28] This is the average Partner Speed"},{"metadata":{"trusted":true,"scrolled":true,"_uuid":"06de5a0c868d3fc1875581017eeb6a889abfc62c"},"cell_type":"code","source":"Avg_Partner_MPH_2016 <- mean(NGS_2016_Contact$Partner_MPH)\nAvg_Partner_MPH_2016","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"8ee8bcf3029ebd1bd598c0af4f08032236e7e24a"},"cell_type":"markdown","source":"We see that speeds on average are about 12MPH for both the Player(11.9) and the Partner(12.5). \n**It is not common for either the Player or the Partner to be moving much faster before the contact that caused the injury. **\n\n**Something different than 2017 is that the largest disparity in pair speeds is about 12.2MPH.**\nAlso note, in 2017 body launching and blindsiding were enforced much more strictly by referees. Perhaps this was the cause for slower speeds and less disparity? \n\n**With a minimum pair of speeds at about 6.5MPH & 7.5MPH and a maximum of 14.3MPH & 19.2MPH we see that a concussion can in fact still happen at lower speeds.**\n**This still supports the conclusion that there should be a focus on variables beyond the speed of the players.** \n\n[29] Speeds don't represent a normal distribution. The histogram is spread widely across low and high speeds, some much higher than 2017."},{"metadata":{"trusted":true,"_uuid":"929c5ea86ae78a135fe87ab71aaa2d867977ad15","scrolled":false},"cell_type":"code","source":"NGS_2016_Player_MPH <- NGS_2016_Contact %>% mutate(MPH=Player_MPH, Player=\"Injury_Player\")\nNGS_2016_Partner_MPH <- NGS_2016_Contact %>% mutate(MPH=Partner_MPH, Player=\"Injury_Partner\")\nAll_2016_MPH <- rbind(NGS_2016_Player_MPH, NGS_2016_Partner_MPH)\n\nAll_2016_MPH %>% ggplot(aes(round(MPH, 0), fill = Player)) + geom_histogram()","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"adef464bd067c14d8e76ef1ed8b2cf5fb38afc44"},"cell_type":"markdown","source":"[30] We see no correlation between speeds for 2016 player pairs."},{"metadata":{"trusted":true,"_uuid":"da2f0ce8700fdcf4fbc8d2827cd7ad23adc0f26d"},"cell_type":"code","source":"corr2016 <- NGS_2016_Contact %>% select(Player_MPH, Partner_MPH)\ncor(corr2016[4], corr2016[5])","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"f175c152c97540849b473d2580e0e12bb3e3bc3f"},"cell_type":"markdown","source":"[31] Now we can bring the 2016 & 2017 data together and run the correlation of speeds for the Injury Player and Injury Partner. \n\nIn addition, we can see a scatter plot of all pairs of speeds showing randomness for speeds associated with concussions."},{"metadata":{"trusted":true,"_uuid":"3d857f9e47fb7d235df478aabd0c493ba2c86ede","scrolled":true},"cell_type":"code","source":"MPH_2016_2017 <- rbind(corr2016, corr2017)\ncor(MPH_2016_2017[5], MPH_2016_2017[4])\nMPH_2016_2017 %>% ggplot(aes(Player_MPH, Partner_MPH)) + geom_point() + theme_stata() + stat_smooth(method=\"lm\", se = FALSE)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"fb01d663fdb9b5b9f38058c261283bb909860900"},"cell_type":"markdown","source":"**Final Rule Proposal:**\n\nAfter analyzing all of the data and thinking critically about the current rules and integrity of the game, we decided to propose a rule be added to blocking during punt plays.\n\n**Rule:** (addition to 9-1-4-a or between 9-1-4-b and 9-1-4-c) A blocker during a scrimmage kick down, must initiate a block with hands or arms. Initiating block with shoulder or helmet will result in a foul for unnecessary roughness. \n\n\n**We can see our rule fits into the current language pulled from the [NFL Rulebook ARTICLE 4. BLOCKING DURING KICK](https://operations.nfl.com/the-rules/2018-nfl-rulebook/#article-4.-blocking-during-kick):**\n\n> The following blocking rules apply during a scrimmage kick down:\n> a. All players on the receiving team are prohibited from blocking below the waist during a down in which there is a scrimmage kick. \n> Note: It is a foul for unnecessary roughness if player attempts to block by leading with helmet or lunging with shoulder. \n\n**Added our language in bold italic:**\n> The following blocking rules apply during a scrimmage kick down:\n>  a. All players on the receiving team are prohibited from blocking below the waist during a down in which there is a scrimmage kick ***and all players must initiate blocks with their hands or arms.***\n> Note: It is a foul for unnecessary roughness if player attempts to block by leading with helmet or lunging with shoulder.\n\nThis rule aims to:\n\n* Keep the game play as close as it is now with competitiveness\n* Not put extra limitations on players or play calling\n* Add no extra burden for referees monitoring\n* Limit high speed collisions without changing the overall dynamic of punt plays\n\nAdditional Considerations:\n\n* We did not want to add rules to limit or change punt formations that may impede the ability to run fake punt plays or gain an advantage in doing so.\n* We also did not want create a rule to change tackling techniques without seeing how the new helmet rule will affect injuries moving forward.\n\n**Thus, our rule suggestion is aimed to reduce the use of excessive force along with reducing injuries to blockers and players being blocked through the change is technique used by players which can be spotted easily by referees.**\n\n**Here we can showcase examples in the video clips provided of what our rule sets out to achieve:**\n\n* http://a.video.nfl.com//films/vodzilla/153253/Justin_Vogel_2-uaXi4twT-20181119_161626398_5000k.mp4\n*  At 9 seconds, Redskins #35 makes a face to face block initiating with arms. He does not lead with his head or shoulder and makes a successful block. \n\n* http://a.video.nfl.com//films/vodzilla/153258/61_yard_Punt_by_Brett_Kern-g8sqyGTz-20181119_162413664_5000k.mp4\n* At 11 seconds, Chiefs #21 and #81 exemplify proper blocking techniques by initiating with their hands and do not using unnecessary force and still having successful blocks.\n\n* http://a.video.nfl.com//films/vodzilla/153291/Palardy_53_yard_punt-XTESVMq9-20181119_170509550_5000k.mp4\n* At 4 seconds, #32 has a block initiated by hands but makes another block attempt shortly after, without use of his hands, leading to an injured player. \n\n* http://a.video.nfl.com//films/vodzilla/153321/Lechler_55_yd_punt-lG1K51rf-20181119_173634665_5000k.mp4\n* At 10  seconds, Titans #94 initiates a light block with his arm against texans #14, leading to a successful block without use of excessive force. At 13 sec Titans #33 uses hands to initiate a block as well. \n\n\n"},{"metadata":{"_uuid":"f674c83ce4ce0af603107943fa2a4fa5fa6f4a30"},"cell_type":"markdown","source":"**Additional Analysis (after competition deadline):**\n\n"},{"metadata":{"trusted":true,"_uuid":"f1cc9c1510b550add633636b49bdb8c85bca5cf5","scrolled":true},"cell_type":"code","source":"#To explore the data a little more, we can see which events during a punt play hold the fastest player speeds. It is obvious that when no specific event is happening (NA), players can be running very fast.\n#MPH2016_2017 <- rbind(NGS_2017_AddMPH %>% select(Event, MPH, Player), NGS_2016_AddMPH %>% select(Event, MPH, Player)) \n#MPH2016_2017 %>% ggplot(aes(MPH, Event, colour = Player)) + geom_point()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"2cc2b74a52e8f154eea6b304d5cbae5a0e135e20"},"cell_type":"code","source":"","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"ce4e7b85370a5856f52cf964843cdf93fe8c67a4"},"cell_type":"markdown","source":"Since our rule focuses on players being blocked or blocking, we can plot each player being blocked showing their path, speed, and the time of collision with the other player relative to ball carriers time of collision with the tackler."},{"metadata":{"trusted":true,"_uuid":"f609e33d37365b498d27eec2c802f0c18a1e271d"},"cell_type":"code","source":"NGS_2017_AddMPH %>% filter(GameKey==364, PlayID==2489) %>% ggplot(aes(x, y, colour = Event, shape = Player)) + geom_point()\n#2017 GameKeys for blocks: 364(2489), 364(2764), 392(1088), 553(1683), 567(1407), 585(733), 607(978)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"b30ee3b5343599d412f684ba2796a8dd4ea6ab18"},"cell_type":"code","source":"NGS_2017_AddMPH %>% filter(GameKey==364, PlayID==2764) %>% ggplot(aes(x, y, colour = Event, shape = Player)) + geom_point()\n#2017 GameKeys for blocks: 364(2489), 364(2764), 392(1088), 553(1683), 567(1407), 585(733), 607(978)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"891cc7907f9a4903acedb02c29994bf2c34ee6e4"},"cell_type":"code","source":"NGS_2017_AddMPH %>% filter(GameKey==392, PlayID==1088) %>% ggplot(aes(x, y, colour = Event, shape = Player)) + geom_point()\n#2017 GameKeys for blocks: 364(2489), 364(2764), 392(1088), 553(1683), 567(1407), 585(733), 607(978)","execution_count":null,"outputs":[]}],"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}