{"cells":[{"metadata":{},"cell_type":"markdown","source":"NFL 1st & Future"},{"metadata":{"_uuid":"051d70d956493feee0c6d64651c6a088724dca2a","_execution_state":"idle","trusted":true},"cell_type":"code","source":"## Importing packages\nlibrary(tidyverse) \nlibrary(gganimate)\nlibrary(rpart)\nlibrary(caret)\n\nlist.files(path = \"../input\")\n\n## Saving data\n\n# If you save any files or images, these will be put in the \"output\" directory. You \n# can see the output directory by committing and running your kernel (using the \n# Commit & Run button) and then checking out the compiled version of your kernel.","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"InjuryRecord <- read.csv(\"../input/nfl-playing-surface-analytics/InjuryRecord.csv\")\nPlayList <- read.csv(\"../input/nfl-playing-surface-analytics/PlayList.csv\")\nPlayTrackData <- read.csv(\"../input/nfl-playing-surface-analytics/PlayerTrackData.csv\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"injury <- merge(PlayTrackData, InjuryRecord, by = 'PlayKey')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"for (PlayKey in 1:nrow(injury)){\np <- ggplot(x = x , y = y, data=injury, aes(x,y, color=PlayKey), xlab= \"Endzone Direction\", ylab= \"Sideline Direction\", main= \"NFL 1st & Future\") + geom_point()\n}\nprint(p)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"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}