{"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_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-01-04T19:44:57.687577Z","iopub.execute_input":"2022-01-04T19:44:57.687953Z","iopub.status.idle":"2022-01-04T19:44:57.719225Z","shell.execute_reply.started":"2022-01-04T19:44:57.687857Z","shell.execute_reply":"2022-01-04T19:44:57.718181Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Import Packages","metadata":{}},{"cell_type":"code","source":"import matplotlib.pyplot as plt\nimport seaborn as sns\nimport pandas as pd\n\n# Shows plots in jupyter notebook\n%matplotlib inline","metadata":{"execution":{"iopub.status.busy":"2022-01-04T20:11:14.554517Z","iopub.execute_input":"2022-01-04T20:11:14.555445Z","iopub.status.idle":"2022-01-04T20:11:14.562563Z","shell.execute_reply.started":"2022-01-04T20:11:14.555394Z","shell.execute_reply":"2022-01-04T20:11:14.561503Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Loading Data and Descriptive Statistics","metadata":{}},{"cell_type":"code","source":"player_df = pd.read_csv(\"/kaggle/input/nfl-big-data-bowl-2022/players.csv\")\nscout_df = pd.read_csv(\"/kaggle/input/nfl-big-data-bowl-2022/PFFScoutingData.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:44:59.160735Z","iopub.execute_input":"2022-01-04T19:44:59.161071Z","iopub.status.idle":"2022-01-04T19:44:59.260592Z","shell.execute_reply.started":"2022-01-04T19:44:59.161030Z","shell.execute_reply":"2022-01-04T19:44:59.259845Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"player_df.shape","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:44:59.261937Z","iopub.execute_input":"2022-01-04T19:44:59.262387Z","iopub.status.idle":"2022-01-04T19:44:59.269869Z","shell.execute_reply.started":"2022-01-04T19:44:59.262354Z","shell.execute_reply":"2022-01-04T19:44:59.268978Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"player_df.info()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:44:59.272798Z","iopub.execute_input":"2022-01-04T19:44:59.273157Z","iopub.status.idle":"2022-01-04T19:44:59.306459Z","shell.execute_reply.started":"2022-01-04T19:44:59.273114Z","shell.execute_reply":"2022-01-04T19:44:59.305585Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"player_df.describe()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:44:59.679104Z","iopub.execute_input":"2022-01-04T19:44:59.679506Z","iopub.status.idle":"2022-01-04T19:44:59.702434Z","shell.execute_reply.started":"2022-01-04T19:44:59.679475Z","shell.execute_reply":"2022-01-04T19:44:59.701852Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"> * As we compared the 75% and maximum there is not as much outlier exist in the player data.","metadata":{}},{"cell_type":"code","source":"player_df.head(3)","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:00.476162Z","iopub.execute_input":"2022-01-04T19:45:00.476586Z","iopub.status.idle":"2022-01-04T19:45:00.487594Z","shell.execute_reply.started":"2022-01-04T19:45:00.476555Z","shell.execute_reply":"2022-01-04T19:45:00.486670Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"player_df.boxplot()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:00.860418Z","iopub.execute_input":"2022-01-04T19:45:00.860854Z","iopub.status.idle":"2022-01-04T19:45:01.095672Z","shell.execute_reply.started":"2022-01-04T19:45:00.860823Z","shell.execute_reply":"2022-01-04T19:45:01.095078Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"player_df[[\"weight\"]].boxplot()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:01.455566Z","iopub.execute_input":"2022-01-04T19:45:01.456357Z","iopub.status.idle":"2022-01-04T19:45:01.627401Z","shell.execute_reply.started":"2022-01-04T19:45:01.456315Z","shell.execute_reply":"2022-01-04T19:45:01.626626Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"scout_df.head(3)","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:02.168128Z","iopub.execute_input":"2022-01-04T19:45:02.168984Z","iopub.status.idle":"2022-01-04T19:45:02.188011Z","shell.execute_reply.started":"2022-01-04T19:45:02.168938Z","shell.execute_reply":"2022-01-04T19:45:02.187428Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"scout_df.info()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:02.666920Z","iopub.execute_input":"2022-01-04T19:45:02.667451Z","iopub.status.idle":"2022-01-04T19:45:02.695446Z","shell.execute_reply.started":"2022-01-04T19:45:02.667410Z","shell.execute_reply":"2022-01-04T19:45:02.694657Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"scout_df.describe()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:03.111214Z","iopub.execute_input":"2022-01-04T19:45:03.111843Z","iopub.status.idle":"2022-01-04T19:45:03.148785Z","shell.execute_reply.started":"2022-01-04T19:45:03.111771Z","shell.execute_reply":"2022-01-04T19:45:03.148102Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"scout_df[['snapTime']].boxplot()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:03.558255Z","iopub.execute_input":"2022-01-04T19:45:03.559244Z","iopub.status.idle":"2022-01-04T19:45:03.743265Z","shell.execute_reply.started":"2022-01-04T19:45:03.559197Z","shell.execute_reply":"2022-01-04T19:45:03.742669Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"scout_df[['operationTime']].boxplot()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:03.995558Z","iopub.execute_input":"2022-01-04T19:45:03.995972Z","iopub.status.idle":"2022-01-04T19:45:04.193003Z","shell.execute_reply.started":"2022-01-04T19:45:03.995939Z","shell.execute_reply":"2022-01-04T19:45:04.191791Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"scout_df[['hangTime']].boxplot()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:04.407229Z","iopub.execute_input":"2022-01-04T19:45:04.407498Z","iopub.status.idle":"2022-01-04T19:45:04.583894Z","shell.execute_reply.started":"2022-01-04T19:45:04.407470Z","shell.execute_reply":"2022-01-04T19:45:04.583075Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"game_df = pd.read_csv(\"/kaggle/input/nfl-big-data-bowl-2022/games.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:04.900273Z","iopub.execute_input":"2022-01-04T19:45:04.900536Z","iopub.status.idle":"2022-01-04T19:45:04.911806Z","shell.execute_reply.started":"2022-01-04T19:45:04.900509Z","shell.execute_reply":"2022-01-04T19:45:04.911164Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"game_df.shape","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:05.395306Z","iopub.execute_input":"2022-01-04T19:45:05.396130Z","iopub.status.idle":"2022-01-04T19:45:05.402335Z","shell.execute_reply.started":"2022-01-04T19:45:05.396059Z","shell.execute_reply":"2022-01-04T19:45:05.401446Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"game_df.head()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:05.784168Z","iopub.execute_input":"2022-01-04T19:45:05.784448Z","iopub.status.idle":"2022-01-04T19:45:05.796028Z","shell.execute_reply.started":"2022-01-04T19:45:05.784420Z","shell.execute_reply":"2022-01-04T19:45:05.795473Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"game_df.info()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:06.219223Z","iopub.execute_input":"2022-01-04T19:45:06.219671Z","iopub.status.idle":"2022-01-04T19:45:06.233588Z","shell.execute_reply.started":"2022-01-04T19:45:06.219623Z","shell.execute_reply":"2022-01-04T19:45:06.232445Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"> * There is no null value","metadata":{}},{"cell_type":"code","source":"game_df.describe()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:15.631779Z","iopub.execute_input":"2022-01-04T19:45:15.632073Z","iopub.status.idle":"2022-01-04T19:45:15.654925Z","shell.execute_reply.started":"2022-01-04T19:45:15.632039Z","shell.execute_reply":"2022-01-04T19:45:15.654082Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"> * There is no outlier exist in the dataframe","metadata":{}},{"cell_type":"code","source":"play_df = pd.read_csv(\"/kaggle/input/nfl-big-data-bowl-2022/plays.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:19.204944Z","iopub.execute_input":"2022-01-04T19:45:19.205247Z","iopub.status.idle":"2022-01-04T19:45:19.340265Z","shell.execute_reply.started":"2022-01-04T19:45:19.205214Z","shell.execute_reply":"2022-01-04T19:45:19.339289Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"play_df.shape","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:20.179416Z","iopub.execute_input":"2022-01-04T19:45:20.179726Z","iopub.status.idle":"2022-01-04T19:45:20.186764Z","shell.execute_reply.started":"2022-01-04T19:45:20.179692Z","shell.execute_reply":"2022-01-04T19:45:20.185766Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"play_df.head()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:20.809510Z","iopub.execute_input":"2022-01-04T19:45:20.809953Z","iopub.status.idle":"2022-01-04T19:45:20.840351Z","shell.execute_reply.started":"2022-01-04T19:45:20.809920Z","shell.execute_reply":"2022-01-04T19:45:20.838979Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"play_df.info()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:21.242580Z","iopub.execute_input":"2022-01-04T19:45:21.242876Z","iopub.status.idle":"2022-01-04T19:45:21.266824Z","shell.execute_reply.started":"2022-01-04T19:45:21.242846Z","shell.execute_reply":"2022-01-04T19:45:21.266137Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"play_df.describe()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:21.698851Z","iopub.execute_input":"2022-01-04T19:45:21.699398Z","iopub.status.idle":"2022-01-04T19:45:21.757666Z","shell.execute_reply.started":"2022-01-04T19:45:21.699361Z","shell.execute_reply":"2022-01-04T19:45:21.756817Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"---\n## Tracking Data","metadata":{}},{"cell_type":"code","source":"track19_df = pd.read_csv(\"/kaggle/input/nfl-big-data-bowl-2022/tracking2019.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:22.584974Z","iopub.execute_input":"2022-01-04T19:45:22.585740Z","iopub.status.idle":"2022-01-04T19:45:59.084547Z","shell.execute_reply.started":"2022-01-04T19:45:22.585700Z","shell.execute_reply":"2022-01-04T19:45:59.083653Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"track19_df.shape","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:59.085981Z","iopub.execute_input":"2022-01-04T19:45:59.086267Z","iopub.status.idle":"2022-01-04T19:45:59.092389Z","shell.execute_reply.started":"2022-01-04T19:45:59.086237Z","shell.execute_reply":"2022-01-04T19:45:59.091337Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"track19_df.head()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:45:59.093877Z","iopub.execute_input":"2022-01-04T19:45:59.094269Z","iopub.status.idle":"2022-01-04T19:45:59.122903Z","shell.execute_reply.started":"2022-01-04T19:45:59.094176Z","shell.execute_reply":"2022-01-04T19:45:59.121905Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"track19_df.describe()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:47:39.891452Z","iopub.execute_input":"2022-01-04T19:47:39.891736Z","iopub.status.idle":"2022-01-04T19:47:44.553861Z","shell.execute_reply.started":"2022-01-04T19:47:39.891707Z","shell.execute_reply":"2022-01-04T19:47:44.552698Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"track19_df.info()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:47:44.555326Z","iopub.execute_input":"2022-01-04T19:47:44.555550Z","iopub.status.idle":"2022-01-04T19:47:44.568793Z","shell.execute_reply.started":"2022-01-04T19:47:44.555525Z","shell.execute_reply":"2022-01-04T19:47:44.567408Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"track18_df = pd.read_csv(\"/kaggle/input/nfl-big-data-bowl-2022/tracking2018.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:47:44.570004Z","iopub.execute_input":"2022-01-04T19:47:44.570401Z","iopub.status.idle":"2022-01-04T19:48:24.829901Z","shell.execute_reply.started":"2022-01-04T19:47:44.570369Z","shell.execute_reply":"2022-01-04T19:48:24.828754Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"track18_df.head()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:48:24.833102Z","iopub.execute_input":"2022-01-04T19:48:24.833552Z","iopub.status.idle":"2022-01-04T19:48:24.860678Z","shell.execute_reply.started":"2022-01-04T19:48:24.833504Z","shell.execute_reply":"2022-01-04T19:48:24.860021Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"track18_df.info()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:48:24.861604Z","iopub.execute_input":"2022-01-04T19:48:24.862144Z","iopub.status.idle":"2022-01-04T19:48:24.875938Z","shell.execute_reply.started":"2022-01-04T19:48:24.862107Z","shell.execute_reply":"2022-01-04T19:48:24.874973Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"track18_df.describe()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:48:34.612277Z","iopub.execute_input":"2022-01-04T19:48:34.612595Z","iopub.status.idle":"2022-01-04T19:48:38.935673Z","shell.execute_reply.started":"2022-01-04T19:48:34.612565Z","shell.execute_reply":"2022-01-04T19:48:38.935083Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"track18_df[[\"x\"]].boxplot()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:49:36.767728Z","iopub.execute_input":"2022-01-04T19:49:36.768206Z","iopub.status.idle":"2022-01-04T19:49:56.350857Z","shell.execute_reply.started":"2022-01-04T19:49:36.768175Z","shell.execute_reply":"2022-01-04T19:49:56.350185Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"track18_df[[\"y\"]].boxplot()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:49:56.352135Z","iopub.execute_input":"2022-01-04T19:49:56.352519Z","iopub.status.idle":"2022-01-04T19:50:16.558786Z","shell.execute_reply.started":"2022-01-04T19:49:56.352487Z","shell.execute_reply":"2022-01-04T19:50:16.557697Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"> * x and y columns have outliers but we cannot change it because this is position of player in the ground.","metadata":{}},{"cell_type":"code","source":"track20_df = pd.read_csv(\"/kaggle/input/nfl-big-data-bowl-2022/tracking2020.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:53:23.133432Z","iopub.execute_input":"2022-01-04T19:53:23.133867Z","iopub.status.idle":"2022-01-04T19:53:57.053025Z","shell.execute_reply.started":"2022-01-04T19:53:23.133828Z","shell.execute_reply":"2022-01-04T19:53:57.052266Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"track20_df.head(3)","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:55:44.464912Z","iopub.execute_input":"2022-01-04T19:55:44.465222Z","iopub.status.idle":"2022-01-04T19:55:44.490018Z","shell.execute_reply.started":"2022-01-04T19:55:44.465191Z","shell.execute_reply":"2022-01-04T19:55:44.489167Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"track20_df.info()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:56:09.411510Z","iopub.execute_input":"2022-01-04T19:56:09.412119Z","iopub.status.idle":"2022-01-04T19:56:09.427282Z","shell.execute_reply.started":"2022-01-04T19:56:09.412053Z","shell.execute_reply":"2022-01-04T19:56:09.426310Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"track20_df.describe()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T19:56:40.465219Z","iopub.execute_input":"2022-01-04T19:56:40.465855Z","iopub.status.idle":"2022-01-04T19:56:44.559006Z","shell.execute_reply.started":"2022-01-04T19:56:40.465804Z","shell.execute_reply":"2022-01-04T19:56:44.558123Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"track20_df[[\"a\"]].boxplot()","metadata":{"execution":{"iopub.status.busy":"2022-01-04T20:08:16.210666Z","iopub.execute_input":"2022-01-04T20:08:16.211138Z","iopub.status.idle":"2022-01-04T20:08:39.643156Z","shell.execute_reply.started":"2022-01-04T20:08:16.211075Z","shell.execute_reply":"2022-01-04T20:08:39.642019Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"---\n\n# Analytics of Data","metadata":{}},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}