{"cells":[{"metadata":{"trusted":true,"_uuid":"2126addb674da194d625fa9bcbd8625b2c774d1f"},"cell_type":"markdown","source":"### CNN [reports](https://www.cnn.com/2013/08/30/us/nfl-concussions-fast-facts/index.html) \"**96% of ex-NFL players had brain disease**' (Last updated August 2018) \n\n![Concussion Thumbnai from CNN](https://cdn.cnn.com/cnnnext/dam/assets/150918153642-nfl-brain-study-concussion-cte-brain-disease-gupta-sot-nr-00014630-exlarge-169.jpg)"},{"metadata":{"_uuid":"142ee3478195214b681c5d35ce0767b410618dde","_execution_state":"idle","trusted":true},"cell_type":"code","source":"library(tidyverse) # metapackage with lots of helpful functions\n#list.files(path = \"../input\")\nlibrary(viridis)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"e81dc2099ef7e6a0b16464a5dcf0f2a39dbf1c58"},"cell_type":"markdown","source":"### CNN reported Statistics on Diagnosed Concussions\n ![](http://)Based on [NFL IQVIA](https://www.playsmartplaysafe.com/newsroom/reports/2017-injury-data/) for (Preseason and regular-season practices plus games)"},{"metadata":{"trusted":true,"_uuid":"4b066ea3831ca50c4d0a5e662fdbfd599fac762f"},"cell_type":"code","source":"dc <- data.frame(year = c(2012,2013,2014,2015,2016,2017), \n                count = c(265,244,212,279,250,291))","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"a1533a92bfe4e6252aaac50a67c6bfee866510ab"},"cell_type":"code","source":"options(repr.plot.width=4, repr.plot.height=3)\nggplot(dc,aes(year,count)) + geom_line() +\ntheme_minimal() +\nlabs(title = \"Statistics on Diagnosed Concussions\",\n    subtitle = \"Preasons and regular-season practices plus games\")","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"1a1713403a91e90f7dac1955fe8a19cee76be433"},"cell_type":"markdown","source":"### Wikipedia\n\nAccording to the Wikipedia page of [https://en.wikipedia.org/wiki/Concussions_in_American_football](https://en.wikipedia.org/wiki/Concussions_in_American_football), \n\n*Concussions and other types of repetitive play-related head blows in American football have been shown to be the cause of chronic traumatic encephalopathy (CTE), which has led to player deaths and other debilitating symptoms after retirement, including memory loss, depression, anxiety, headaches, and also sleep disturbances.*\n\nIn fact, Wikipedia lists a separate page full of [ex-NFL Players with chronic traumatic encephalopathy](https://en.wikipedia.org/wiki/List_of_NFL_players_with_chronic_traumatic_encephalopathy) diagnosed"},{"metadata":{"_uuid":"77e147188b25465aa69c31ead327559adc400174"},"cell_type":"markdown","source":"# BIG DEAL\n\nNow that we know something about the impact of Concussions in NFL, We should know we are dealing with something that's highly critical and bigger than just being a big deal! "},{"metadata":{"_uuid":"42377112e32ccbeddd0a361e7b8890a5bc197828"},"cell_type":"markdown","source":"### Given Dataset\n\nLet us dive into the given dataset where we have Concussion related informations!"},{"metadata":{"trusted":true,"_uuid":"c61c2ef6f87a9c746d94215bc9db71bab309b818","scrolled":true},"cell_type":"code","source":"video_reviews <- read_csv(\"../input/video_review.csv\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"ea349ec6f1c6c666b23f4b2bb5458a5f260f8ff1"},"cell_type":"code","source":"glimpse(video_reviews)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"98a0e6a986603627c0e8eea5b4320611c24f72df"},"cell_type":"code","source":"dim(video_reviews)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"4511b5d2ec04885cb7fc3b03b4d591e054937bcc"},"cell_type":"code","source":"options(repr.plot.width=6, repr.plot.height=4)\n\nvideo_reviews  %>% \ncount(Season_Year)  %>% \nggplot() + geom_bar(aes(factor(Season_Year),n, fill = factor(Season_Year)), stat = \"identity\", show.legend = FALSE) +\ngeom_label(aes(factor(Season_Year),n, label = n)) +\nscale_fill_viridis_d(option = \"plasma\") +\n\ntheme_minimal() +\nlabs(title = \"Count of Concussion Data in Each Year\",\n    x = \"Season\",\n    y = \"No. of entries in the given Data\")","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"d86e6f709dd8d3b7449d7337dd2e45bdc9a95b2f"},"cell_type":"markdown","source":"### What was the injured player doing?"},{"metadata":{"trusted":true,"_uuid":"b03504388273e0838dc1d672f8a0d6de0e7b324d"},"cell_type":"code","source":"options(repr.plot.width=6, repr.plot.height=4)\n\nvideo_reviews  %>% \ncount(Player_Activity_Derived)  %>% \nggplot() + geom_bar(aes(Player_Activity_Derived,n, fill = Player_Activity_Derived), stat = \"identity\", show.legend = FALSE) +\ngeom_label(aes(Player_Activity_Derived,n, label = n)) +\nscale_fill_viridis_d(option = \"plasma\") +\n\ntheme_minimal() +\nlabs(title = \"Player_Activity_Derived involved in Concussion\",\n    x = \"Player_Activity_Derived\",\n    y = \"No. of entries in the given Data\")","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"c570959c9b7680bfe6d0006672d27b131aa6597e"},"cell_type":"markdown","source":"### What was the injured player's primary partner  doing?"},{"metadata":{"trusted":true,"scrolled":true,"_uuid":"1fab718fbc67ad3d022e35f8cf33754d8ebb71ba"},"cell_type":"code","source":"options(repr.plot.width=6, repr.plot.height=4)\n\nvideo_reviews  %>% \ncount(Primary_Partner_Activity_Derived)  %>% \nggplot() + geom_bar(aes(Primary_Partner_Activity_Derived,n, fill = Primary_Partner_Activity_Derived), stat = \"identity\", show.legend = FALSE) +\ngeom_label(aes(Primary_Partner_Activity_Derived,n, label = n)) +\nscale_fill_viridis_d(option = \"plasma\") +\n\ntheme_minimal() +\nlabs(title = \"Activity of Primary Partner of Player involved in Concussion\",\n    x = \"Primary_Partner_Activity_Derived\",\n    y = \"No. of entries in the given Data\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"355e9c1962c5ba4f53361571f29e38392ba45be9"},"cell_type":"code","source":"options(repr.plot.width=6, repr.plot.height=4)\n\nvideo_reviews  %>% \ncount(Primary_Impact_Type)  %>% \nggplot() + geom_bar(aes(Primary_Impact_Type,n, fill = Primary_Impact_Type), stat = \"identity\", show.legend = FALSE) +\nscale_fill_viridis_d(option = \"plasma\") +\ngeom_label(aes(Primary_Impact_Type,n, label = n)) +\ntheme_minimal() +\nlabs(title = \"Impact Player involved in Concussion\",\n    x = \"Primary_Impact_Type\",\n    y = \"No. of entries in the given Data\") ","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"bd5c7dea0010d94425438237b53eb0ef692d6364"},"cell_type":"markdown","source":"### WIP\n### To-DO\"\"Join multiple data to extend the story \n### Please share your feedback in comments and support as Votes!\n"},{"metadata":{"trusted":true,"_uuid":"d74f830c81f22dd2d3161d120141e2579b75695e"},"cell_type":"code","source":"","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}