{"cells":[{"metadata":{},"cell_type":"markdown","source":"# NFL 1st and Future 2019\n### Can you investigate the relationship between the playing surface and the injury and performance of NFL athletes?"},{"metadata":{},"cell_type":"markdown","source":"**To understand the precise goal of the competittion and the data, please have a look at https://www.kaggle.com/c/nfl-playing-surface-analytics/data, which describes each variable of each datafile**\n\n![](https://1ycbx02rgnsa1i87hd1i7v1r-wpengine.netdna-ssl.com/wp-content/uploads/2019/01/nfl.png)\n"},{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"_kg_hide-input":false},"cell_type":"code","source":"import pandas as pd\nimport matplotlib.pylab as plt\nimport seaborn as sns\nimport matplotlib.patches as patches\nimport pandas_profiling\nimport warnings\nwarnings.filterwarnings('ignore')\n\nfrom time import time","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","trusted":true},"cell_type":"code","source":"# Load the data files\nplaylist = pd.read_csv('../input/nfl-playing-surface-analytics/PlayList.csv')\ninjuries = pd.read_csv('../input/nfl-playing-surface-analytics/InjuryRecord.csv')\ntracking = pd.read_csv('../input/nfl-playing-surface-analytics/PlayerTrackData.csv', nrows=int(1e6)) # load only a fraction of the data","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Playlist Analysis\nLet's first analyse the PlayList. It contains information on the player and on the game. Nothing crazy but it's the main source of info on the player and on the play conditions (weather, stadium, etc.). Note that some features have missing values (but I think it's no big deal)."},{"metadata":{"trusted":true},"cell_type":"code","source":"# Make report for playlist\npandas_profiling.ProfileReport(playlist)","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Injuries Analysis\nThis dataset provides information about each injury. Most information here is categorical and/or one-hot-encoded!"},{"metadata":{"trusted":true},"cell_type":"code","source":"# Make report for injuries\npandas_profiling.ProfileReport(injuries)","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Tracking Analysis\nThis dataset is I think the most informative: it allows to track each trajectory of a player. This continuous information will allow you to make rich features based on trajectories, speed, acceleration, etc."},{"metadata":{"trusted":true},"cell_type":"code","source":"# Make report for tracking data\npandas_profiling.ProfileReport(tracking)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat":4,"nbformat_minor":1}