{"cells":[{"metadata":{"_uuid":"a263ac417e6093debf08324d8b4be0670f6d5c88","_execution_state":"idle","trusted":true,"_kg_hide-input":true},"cell_type":"code","source":"playdata = read.csv(\"../input/play_information.csv\")\nvideodata = read.csv(\"../input/video_review.csv\")\nnames(videodata)\nplaydata$PlayDescription <-NULL\nplaydata$Score_Home_Visiting <-NULL\nplaydata$Home_Team_Visit_Team <-NULL\nplaydata$Poss_Team <-NULL\nplaydata$Play_Type <-NULL\nplaydata$Quarter <-NULL\nplaydata$Game_Clock <-NULL\nplaydata$Week <-NULL\nplaydata$Game_Data <- NULL\nplaydata$Season_Type <- NULL\nplaydata$Game_Date <-NULL\nvideodata$Friendly_Fire <-NULL\nvideodata$Primary_Partner_Activity_Derived <-NULL\nvideodata$Primary_Partner_GSISID <-NULL\nvideodata$Primary_Impact_Type <-NULL\nvideodata$Turnover_Related <-NULL\nvideodata$Player_Activity_Derived <-NULL\nvideodata$GSISID <-NULL\nvideodata$Concussion_IND=\"1\"\nplaydata$Play_Count=\"1\"\nnames(playdata)\nnames(videodata)\n\nPlay_videodata = merge(playdata,videodata, by.x=c(\"PlayID\",\"Season_Year\",\"GameKey\"),by.y=c(\"PlayID\",\"Season_Year\",\"GameKey\"),all=TRUE)\n\nPlay_videodata$RightYardLine <- as.numeric(gsub(\"[^\\\\d]+\", \"\", Play_videodata$YardLine, perl=TRUE))\n\nPlay_videodata$PlayID <- NULL\nPlay_videodata$Season_Year <- NULL\nPlay_videodata$GameKey <- NULL\nPlay_videodata$YardLine <- NULL\n\nTable1 = table(Play_videodata$Concussion_IND,Play_videodata$RightYardLine)\nTable2 = table(Play_videodata$Play_Count,Play_videodata$RightYardLine)\nTable1\nTable2\nTable1/Table2","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"2a7c2bc8e6241d364d37a8a2b65830d825d7b950"},"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}