{"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":"markdown","source":"<center><h1>NFL-BigDataBowl-2022</h1></center>","metadata":{}},{"cell_type":"markdown","source":"<center><h2>Table of Contents</h2></center>\n\n<h3>Intorduction</h3>\n\n* [Import Libraries](#1)\n* [Data Loading](#2)\n\n<h3>Task 1</h3>\n\n* [Make a new measure for special teams. The NFL Network has accepted the winning algorithm from the 2020 Big Data Bowl for on-air distribution, and we are confident that a new metric for special teams plays will emerge from this year's tournament.](#3)\n\n    <h3>Data Preparation</h3>\n    \n    * [Dataframes with More Insights for 32 NFL Teams](#4)\n    * [Data Preparation for Clear EDA Plotting](#5)\n    \n    <h3>EDA for Special Plays Part - 1</h3>\n    \n        * [Special Plays Pie Plots: ARI, ATL, BAL, BUF, CAR, CHI, CIN, CLE](#6)\n        * [Statistics Bar Plots: ARI, ATL, BAL, BUF, CAR, CHI, CIN, CLE; Special Plays (2018 - 2020)](#7)\n    \n    <h3>EDA for Special Plays Part - 2</h3>\n    \n        * [Special Plays Pie Plots: DAL, DEN, DAT, GB, HOU, IND, JAX, KC](#8)\n        * [Statistics Bar Plots: DAL, DEN, DAT, GB, HOU, IND, JAX, KC; Special Plays (2018 - 2020)](#9)\n    \n    <h3>EDA for Special Plays Part - 3</h3>\n    \n        * [Special Plays Pie Plots: LA, LAC, MIA, MIN, NE, NO, NYG, NYJ](#10)\n        * [Statistics Bar Plots: LA, LAC, MIA, MIN, NE, NO, NYG, NYJ; Special Plays (2018 - 2020)](#11)\n    \n    <h3>EDA for Special Plays Part - 4</h3>\n    \n        * [Special Plays Pie Plots:  OAK / LV, PHI, PIT, SEA, SF, TB, TEN, WAS](#12)\n        * [Statistics Bar Plots: OAK / LV, PHI, PIT, SEA, SF, TB, TEN, WAS; Special Plays (2018 - 2020)](#13)\n        \n        \n <h3>Task 2-3</h3>\n \n* [Make a plan for special teams that can be quantified. Coaches of special teams are among the league's most imaginative and ingenious. Compare and contrast the game plans of each squad. What are the most effective strategies? What additional tactics are there that might be used? and Players Performance and ranking over all seasons.](#14)\n\n    <h3>Special Team Plays Ranking EDA</h3>\n\n    * [Special Team Play Ranking Data Preparation](#15)\n\n    <h3>Kickoff Analysis</h3>\n    \n        * [Player-by-player kickoff analysis of 32 NFL teams by season, Touchbacks, Return, and Much more](#16)\n        * [Players Kickoff Touchback Accuracy 2018](#17)\n        * [Players Kickoff Touchback Accuracy 2019](#18)\n        * [Players Kickoff Touchback Accuracy 2020](#19)\n       \n    <h3>Field Goal Analysis</h3>\n    \n        * [Player-by-player field goal analysis of 32 NFL teams by season and yardage](#20)\n        * [Players Field Goal Statistics 2018](#21)\n        * [Players Field Goal Statistics 2019](#22)\n        * [Players Field Goal Statistics 2020](#23)\n       \n  \n  \n[Source Code](https://github.com/Kush-Trivedi/NFL2022BIgDataBowl)","metadata":{}},{"cell_type":"markdown","source":"<a id=\"1\"></a> <br>\n# Import Libraries","metadata":{}},{"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)\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport warnings\nwarnings.filterwarnings(\"ignore\")\n\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":{"_kg_hide-input":false,"_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-01-07T01:18:57.454819Z","iopub.execute_input":"2022-01-07T01:18:57.455223Z","iopub.status.idle":"2022-01-07T01:18:58.308651Z","shell.execute_reply.started":"2022-01-07T01:18:57.455091Z","shell.execute_reply":"2022-01-07T01:18:58.307924Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"2\"></a> <br>\n# Data Loading","metadata":{}},{"cell_type":"code","source":"allARIData = pd.read_csv('../input/nfl-special-play-legal-plays-only/ARI_Special_Play.csv')\nallATLData = pd.read_csv('../input/nfl-special-play-legal-plays-only/ATL_Special_Play.csv')\nallBALData = pd.read_csv('../input/nfl-special-play-legal-plays-only/BAL_Special_Play.csv')\nallBUFData = pd.read_csv('../input/nfl-special-play-legal-plays-only/BUF_Special_Play.csv')\nallCARData = pd.read_csv('../input/nfl-special-play-legal-plays-only/CAR_Special_Play.csv')\nallCHIData = pd.read_csv('../input/nfl-special-play-legal-plays-only/CHI_Special_Play.csv')\nallCINData = pd.read_csv('../input/nfl-special-play-legal-plays-only/CIN_Special_Play.csv')\nallCLEData = pd.read_csv('../input/nfl-special-play-legal-plays-only/CLE_Special_Play.csv')\nallDALData = pd.read_csv('../input/nfl-special-play-legal-plays-only/DAL_Special_Play.csv')\nallDENData = pd.read_csv('../input/nfl-special-play-legal-plays-only/DEN_Special_Play.csv')\nallDETData = pd.read_csv('../input/nfl-special-play-legal-plays-only/DET_Special_Play.csv')\nallGBData = pd.read_csv('../input/nfl-special-play-legal-plays-only/GB_Special_Play.csv')\nallHOUData = pd.read_csv('../input/nfl-special-play-legal-plays-only/HOU_Special_Play.csv')\nallINDData = pd.read_csv('../input/nfl-special-play-legal-plays-only/IND_Special_Play.csv')\nallJAXData = pd.read_csv('../input/nfl-special-play-legal-plays-only/JAX_Special_Play.csv')\nallKCData = pd.read_csv('../input/nfl-special-play-legal-plays-only/KC_Special_Play.csv')\nallLAData = pd.read_csv('../input/nfl-special-play-legal-plays-only/LA_Special_Play.csv')\nallLACData = pd.read_csv('../input/nfl-special-play-legal-plays-only/LAC_Special_Play.csv')\nallMIAData = pd.read_csv('../input/nfl-special-play-legal-plays-only/MIA_Special_Play.csv')\nallMINData = pd.read_csv('../input/nfl-special-play-legal-plays-only/MIN_Special_Play.csv')\nallNEData = pd.read_csv('../input/nfl-special-play-legal-plays-only/NE_Special_Play.csv')\nallNOData = pd.read_csv('../input/nfl-special-play-legal-plays-only/NO_Special_Play.csv')\nallNYGData = pd.read_csv('../input/nfl-special-play-legal-plays-only/NYG_Special_Play.csv')\nallNYJData = pd.read_csv('../input/nfl-special-play-legal-plays-only/NYJ_Special_Play.csv')\nallOAKData = pd.read_csv('../input/nfl-special-play-legal-plays-only/OAK_LV_Special_Play.csv')\nallPHIData = pd.read_csv('../input/nfl-special-play-legal-plays-only/PHI_Special_Play.csv')\nallPITData = pd.read_csv('../input/nfl-special-play-legal-plays-only/PIT_Special_Play.csv')\nallSEAData = pd.read_csv('../input/nfl-special-play-legal-plays-only/SEA_Special_Play.csv')\nallSFData = pd.read_csv('../input/nfl-special-play-legal-plays-only/SF_Special_Play.csv')\nallTBData = pd.read_csv('../input/nfl-special-play-legal-plays-only/TB_Special_Play.csv')\nallTENData = pd.read_csv('../input/nfl-special-play-legal-plays-only/TEN_Special_Play.csv')\nallWASData = pd.read_csv('../input/nfl-special-play-legal-plays-only/WAS_Special_Play.csv')\n\nfieldGoalData = pd.read_csv('../input/nfl-special-play-legal-plays-only/Field_Goals_2018_to_2020.csv')\nkickoffData = pd.read_csv('../input/nfl-special-play-legal-plays-only/Kickoffs_2018_to_2020.csv')","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:18:58.310514Z","iopub.execute_input":"2022-01-07T01:18:58.310774Z","iopub.status.idle":"2022-01-07T01:18:58.494504Z","shell.execute_reply.started":"2022-01-07T01:18:58.310737Z","shell.execute_reply":"2022-01-07T01:18:58.493828Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"3\"></a> <br>\n# Task 1\n\n* **Make a new measure for special teams. The NFL Network has accepted the winning algorithm from the 2020 Big Data Bowl for on-air distribution, and we are confident that a new metric for special teams plays will emerge from this year's tournament.**\n\n\n<a id=\"4\"></a> <br>\n# Data Preparation\n* Dataframes for **32 NFL** Teams\n\n1.  **ARI**:- **A**rizona **C**ardinals\n2.  **ATL**:- **A**tlanta **F**alcons  \n3.  **BAL**:- **B**altimore **R**avens  \n4.  **BUF**:- **B**uffalo **B**ills\n5.  **CAR**:- **C**arolina **P**anthers\n6.  **CHI**:- **C**hicago **B**ears\n7.  **CIN**:- **C**incinnati **B**engals\n8.  **CLE**:- **C**leveland **B**rowns\n9.  **DAL**:- **D**allas **C**owboys\n10. **DEN**:- **D**enver **B**roncos\n11. **DET**:- **D**etroit **L**ions\n12. **GB** :- **G**reen **B**ay **P**ackers\n13. **HOU**:- **H**ouston **T**exans\n14. **IND**:- **I**ndianapolis **C**olts \n15. **JAX**:- **J**acksonville **J**aguars\n16. **KC** :- **K**ansas **C**ity **C**hiefs\n17. **LA** :- **L**os **A**ngeles **R**ams\n18. **LAC**:- **L**os **A**ngeles **C**hargers\n19. **MIA**:- **M**iami **D**olphins\n20. **MIN**:- **M**innesota **V**ikings\n21. **NE** :- **N**ew **E**ngland **P**atriots\n22. **NO** :- **N**ew **O**rleans **S**aints\n23. **NYG**:- **N**ew **Y**ork **G**iants\n24. **NYJ**:- **N**ew **Y**ork **J**ets\n25. **OAK** / **LV**:- **O**akland / **L**as **V**egas **R**aiders (**OAK** turned to **LV** in **2020**)\n26. **PHI**:- **P**hiladelphia **E**agles\n27. **PIT**:- **P**ittsburgh **S**teelers\n28. **SEA**:- **S**eattle **S**eahawks\n29. **SF** :- **S**an **F**rancisco **49**ers\n30. **TB** :- **T**ampa **B**ay **B**uccaneers\n31. **TEN**:- **T**ennessee **T**itans\n32. **WAS**:- **W**ashington **R**edskins","metadata":{}},{"cell_type":"code","source":"# For Bar Plot\nsumARIData = allARIData[\"2018\"] + allARIData[\"2019\"] + allARIData['2020']\nallARIData[\"Total\"] = sumARIData\nallARIData = allARIData.sort_values(by=['Total'],ascending=False)\n\nsumATLData = allATLData[\"2018\"] + allATLData[\"2019\"] + allATLData['2020']\nallATLData[\"Total\"] = sumATLData\nallATLData = allATLData.sort_values(by=['Total'],ascending=False)\n\nsumBALData = allBALData[\"2018\"] + allBALData[\"2019\"] + allBALData['2020']\nallBALData[\"Total\"] = sumBALData\nallBALData = allBALData.sort_values(by=['Total'],ascending=False)\n\nsumBUFData = allBUFData[\"2018\"] + allBUFData[\"2019\"] + allBUFData['2020']\nallBUFData[\"Total\"] = sumBUFData\nallBUFData = allBUFData.sort_values(by=['Total'],ascending=False)\n\nsumCARData = allCARData[\"2018\"] + allCARData[\"2019\"] + allCARData['2020']\nallCARData[\"Total\"] = sumCARData\nallCARData = allCARData.sort_values(by=['Total'],ascending=False)\n\nsumCHIData = allCHIData[\"2018\"] + allCHIData[\"2019\"] + allCHIData['2020']\nallCHIData[\"Total\"] = sumCHIData\nallCHIData = allCHIData.sort_values(by=['Total'],ascending=False)\n\nsumCINData = allCINData[\"2018\"] + allCINData[\"2019\"] + allCINData['2020']\nallCINData[\"Total\"] = sumCINData\nallCINData = allCINData.sort_values(by=['Total'],ascending=False)\n\nsumCLEData = allCLEData[\"2018\"] + allCLEData[\"2019\"] + allCLEData['2020']\nallCLEData[\"Total\"] = sumCLEData\nallCLEData = allCLEData.sort_values(by=['Total'],ascending=False)\n\nsumDALData = allDALData[\"2018\"] + allDALData[\"2019\"] + allDALData['2020']\nallDALData[\"Total\"] = sumDALData\nallDALData = allDALData.sort_values(by=['Total'],ascending=False)\n\nsumDENData = allDENData[\"2018\"] + allDENData[\"2019\"] + allDENData['2020']\nallDENData[\"Total\"] = sumDENData\nallDENData = allDENData.sort_values(by=['Total'],ascending=False)\n\nsumDETData = allDETData[\"2018\"] + allDETData[\"2019\"] + allDETData['2020']\nallDETData[\"Total\"] = sumDETData\nallDETData = allDETData.sort_values(by=['Total'],ascending=False)\n\nsumGBData = allGBData[\"2018\"] + allGBData[\"2019\"] + allGBData['2020']\nallGBData[\"Total\"] = sumGBData\nallGBData = allGBData.sort_values(by=['Total'],ascending=False)\n\nsumHOUData = allHOUData[\"2018\"] + allHOUData[\"2019\"] + allHOUData['2020']\nallHOUData[\"Total\"] = sumHOUData\nallHOUData = allHOUData.sort_values(by=['Total'],ascending=False)\n\nsumINDData = allINDData[\"2018\"] + allINDData[\"2019\"] + allINDData['2020']\nallINDData[\"Total\"] = sumINDData\nallINDData = allINDData.sort_values(by=['Total'],ascending=False)\n\nsumJAXData = allJAXData[\"2018\"] + allJAXData[\"2019\"] + allJAXData['2020']\nallJAXData[\"Total\"] = sumJAXData\nallJAXData = allJAXData.sort_values(by=['Total'],ascending=False)\n\nsumKCData = allKCData[\"2018\"] + allKCData[\"2019\"] + allKCData['2020']\nallKCData[\"Total\"] = sumKCData\nallKCData = allKCData.sort_values(by=['Total'],ascending=False)\n\nsumLAData = allLAData[\"2018\"] + allLAData[\"2019\"] + allLAData['2020']\nallLAData[\"Total\"] = sumLAData\nallLAData = allLAData.sort_values(by=['Total'],ascending=False)\n\nsumLACData = allLACData[\"2018\"] + allLACData[\"2019\"] + allLACData['2020']\nallLACData[\"Total\"] = sumLACData\nallLACData = allLACData.sort_values(by=['Total'],ascending=False)\n\nsumMIAData = allMIAData[\"2018\"] + allMIAData[\"2019\"] + allMIAData['2020']\nallMIAData[\"Total\"] = sumMIAData\nallMIAData = allMIAData.sort_values(by=['Total'],ascending=False)\n\nsumMINData = allMINData[\"2018\"] + allMINData[\"2019\"] + allMINData['2020']\nallMINData[\"Total\"] = sumMINData\nallMINData = allMINData.sort_values(by=['Total'],ascending=False)\n\nsumNEData = allNEData[\"2018\"] + allNEData[\"2019\"] + allNEData['2020']\nallNEData[\"Total\"] = sumNEData\nallNEData = allNEData.sort_values(by=['Total'],ascending=False)\n\nsumNOData = allNOData[\"2018\"] + allNOData[\"2019\"] + allNOData['2020']\nallNOData[\"Total\"] = sumNOData\nallNOData = allNOData.sort_values(by=['Total'],ascending=False)\n\nsumNYGData = allNYGData[\"2018\"] + allNYGData[\"2019\"] + allNYGData['2020']\nallNYGData[\"Total\"] = sumNYGData\nallNYGData = allNYGData.sort_values(by=['Total'],ascending=False)\n\nsumNYJData = allNYJData[\"2018\"] + allNYJData[\"2019\"] + allNYJData['2020']\nallNYJData[\"Total\"] = sumNYJData\nallNYJData = allNYJData.sort_values(by=['Total'],ascending=False)\n\nsumOAKData = allOAKData[\"2018\"] + allOAKData[\"2019\"] + allOAKData['2020']\nallOAKData[\"Total\"] = sumOAKData\nallOAKData = allOAKData.sort_values(by=['Total'],ascending=False)\n\nsumPHIData = allPHIData[\"2018\"] + allPHIData[\"2019\"] + allPHIData['2020']\nallPHIData[\"Total\"] = sumPHIData\nallPHIData = allPHIData.sort_values(by=['Total'],ascending=False)\n\nsumPITData = allPITData[\"2018\"] + allPITData[\"2019\"] + allPITData['2020']\nallPITData[\"Total\"] = sumPITData\nallPITData = allPITData.sort_values(by=['Total'],ascending=False)\n\nsumSEAData = allSEAData[\"2018\"] + allSEAData[\"2019\"] + allSEAData['2020']\nallSEAData[\"Total\"] = sumSEAData\nallSEAData = allSEAData.sort_values(by=['Total'],ascending=False)\n\nsumSFData = allSFData[\"2018\"] + allSFData[\"2019\"] + allSFData['2020']\nallSFData[\"Total\"] = sumSFData\nallSFData = allSFData.sort_values(by=['Total'],ascending=False)\n\nsumTBData = allTBData[\"2018\"] + allTBData[\"2019\"] + allTBData['2020']\nallTBData[\"Total\"] = sumTBData\nallTBData = allTBData.sort_values(by=['Total'],ascending=False)\n\nsumTENData = allTENData[\"2018\"] + allTENData[\"2019\"] + allTENData['2020']\nallTENData[\"Total\"] = sumTENData\nallTENData = allTENData.sort_values(by=['Total'],ascending=False)\n\nsumWASData = allWASData[\"2018\"] + allWASData[\"2019\"] + allWASData['2020']\nallWASData[\"Total\"] = sumWASData\nallWASData = allWASData.sort_values(by=['Total'],ascending=False)","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:18:58.495968Z","iopub.execute_input":"2022-01-07T01:18:58.496493Z","iopub.status.idle":"2022-01-07T01:18:58.580174Z","shell.execute_reply.started":"2022-01-07T01:18:58.496455Z","shell.execute_reply":"2022-01-07T01:18:58.579512Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ARI2018SpecialTeamPlayCountsSeries = allARIData.groupby('ARI Special Play')['2018'].sum().sort_values(ascending=False)\nARI2019SpecialTeamPlayCountsSeries = allARIData.groupby('ARI Special Play')['2019'].sum().sort_values(ascending=False)\nARI2020SpecialTeamPlayCountsSeries = allARIData.groupby('ARI Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nATL2018SpecialTeamPlayCountsSeries = allATLData.groupby('ATL Special Play')['2018'].sum().sort_values(ascending=False)\nATL2019SpecialTeamPlayCountsSeries = allATLData.groupby('ATL Special Play')['2019'].sum().sort_values(ascending=False)\nATL2020SpecialTeamPlayCountsSeries = allATLData.groupby('ATL Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nBAL2018SpecialTeamPlayCountsSeries = allBALData.groupby('BAL Special Play')['2018'].sum().sort_values(ascending=False)\nBAL2019SpecialTeamPlayCountsSeries = allBALData.groupby('BAL Special Play')['2019'].sum().sort_values(ascending=False)\nBAL2020SpecialTeamPlayCountsSeries = allBALData.groupby('BAL Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nBUF2018SpecialTeamPlayCountsSeries = allBUFData.groupby('BUF Special Play')['2018'].sum().sort_values(ascending=False)\nBUF2019SpecialTeamPlayCountsSeries = allBUFData.groupby('BUF Special Play')['2019'].sum().sort_values(ascending=False)\nBUF2020SpecialTeamPlayCountsSeries = allBUFData.groupby('BUF Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nCAR2018SpecialTeamPlayCountsSeries = allCARData.groupby('CAR Special Play')['2018'].sum().sort_values(ascending=False)\nCAR2019SpecialTeamPlayCountsSeries = allCARData.groupby('CAR Special Play')['2019'].sum().sort_values(ascending=False)\nCAR2020SpecialTeamPlayCountsSeries = allCARData.groupby('CAR Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nCHI2018SpecialTeamPlayCountsSeries = allCHIData.groupby('CHI Special Play')['2018'].sum().sort_values(ascending=False)\nCHI2019SpecialTeamPlayCountsSeries = allCHIData.groupby('CHI Special Play')['2019'].sum().sort_values(ascending=False)\nCHI2020SpecialTeamPlayCountsSeries = allCHIData.groupby('CHI Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nCIN2018SpecialTeamPlayCountsSeries = allCINData.groupby('CIN Special Play')['2018'].sum().sort_values(ascending=False)\nCIN2019SpecialTeamPlayCountsSeries = allCINData.groupby('CIN Special Play')['2019'].sum().sort_values(ascending=False)\nCIN2020SpecialTeamPlayCountsSeries = allCINData.groupby('CIN Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nCLE2018SpecialTeamPlayCountsSeries = allCLEData.groupby('CLE Special Play')['2018'].sum().sort_values(ascending=False)\nCLE2019SpecialTeamPlayCountsSeries = allCLEData.groupby('CLE Special Play')['2019'].sum().sort_values(ascending=False)\nCLE2020SpecialTeamPlayCountsSeries = allCLEData.groupby('CLE Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nDAL2018SpecialTeamPlayCountsSeries = allDALData.groupby('DAL Special Play')['2018'].sum().sort_values(ascending=False)\nDAL2019SpecialTeamPlayCountsSeries = allDALData.groupby('DAL Special Play')['2019'].sum().sort_values(ascending=False)\nDAL2020SpecialTeamPlayCountsSeries = allDALData.groupby('DAL Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nDEN2018SpecialTeamPlayCountsSeries = allDENData.groupby('DEN Special Play')['2018'].sum().sort_values(ascending=False)\nDEN2019SpecialTeamPlayCountsSeries = allDENData.groupby('DEN Special Play')['2019'].sum().sort_values(ascending=False)\nDEN2020SpecialTeamPlayCountsSeries = allDENData.groupby('DEN Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nDET2018SpecialTeamPlayCountsSeries = allDETData.groupby('DET Special Play')['2018'].sum().sort_values(ascending=False)\nDET2019SpecialTeamPlayCountsSeries = allDETData.groupby('DET Special Play')['2019'].sum().sort_values(ascending=False)\nDET2020SpecialTeamPlayCountsSeries = allDETData.groupby('DET Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nGB2018SpecialTeamPlayCountsSeries = allGBData.groupby('GB Special Play')['2018'].sum().sort_values(ascending=False)\nGB2019SpecialTeamPlayCountsSeries = allGBData.groupby('GB Special Play')['2019'].sum().sort_values(ascending=False)\nGB2020SpecialTeamPlayCountsSeries = allGBData.groupby('GB Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nHOU2018SpecialTeamPlayCountsSeries = allHOUData.groupby('HOU Special Play')['2018'].sum().sort_values(ascending=False)\nHOU2019SpecialTeamPlayCountsSeries = allHOUData.groupby('HOU Special Play')['2019'].sum().sort_values(ascending=False)\nHOU2020SpecialTeamPlayCountsSeries = allHOUData.groupby('HOU Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nIND2018SpecialTeamPlayCountsSeries = allINDData.groupby('IND Special Play')['2018'].sum().sort_values(ascending=False)\nIND2019SpecialTeamPlayCountsSeries = allINDData.groupby('IND Special Play')['2019'].sum().sort_values(ascending=False)\nIND2020SpecialTeamPlayCountsSeries = allINDData.groupby('IND Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nJAX2018SpecialTeamPlayCountsSeries = allJAXData.groupby('JAX Special Play')['2018'].sum().sort_values(ascending=False)\nJAX2019SpecialTeamPlayCountsSeries = allJAXData.groupby('JAX Special Play')['2019'].sum().sort_values(ascending=False)\nJAX2020SpecialTeamPlayCountsSeries = allJAXData.groupby('JAX Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nKC2018SpecialTeamPlayCountsSeries = allKCData.groupby('KC Special Play')['2018'].sum().sort_values(ascending=False)\nKC2019SpecialTeamPlayCountsSeries = allKCData.groupby('KC Special Play')['2019'].sum().sort_values(ascending=False)\nKC2020SpecialTeamPlayCountsSeries = allKCData.groupby('KC Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nLA2018SpecialTeamPlayCountsSeries = allLAData.groupby('LA Special Play')['2018'].sum().sort_values(ascending=False)\nLA2019SpecialTeamPlayCountsSeries = allLAData.groupby('LA Special Play')['2019'].sum().sort_values(ascending=False)\nLA2020SpecialTeamPlayCountsSeries = allLAData.groupby('LA Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nLAC2018SpecialTeamPlayCountsSeries = allLACData.groupby('LAC Special Play')['2018'].sum().sort_values(ascending=False)\nLAC2019SpecialTeamPlayCountsSeries = allLACData.groupby('LAC Special Play')['2019'].sum().sort_values(ascending=False)\nLAC2020SpecialTeamPlayCountsSeries = allLACData.groupby('LAC Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nMIA2018SpecialTeamPlayCountsSeries = allMIAData.groupby('MIA Special Play')['2018'].sum().sort_values(ascending=False)\nMIA2019SpecialTeamPlayCountsSeries = allMIAData.groupby('MIA Special Play')['2019'].sum().sort_values(ascending=False)\nMIA2020SpecialTeamPlayCountsSeries = allMIAData.groupby('MIA Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nMIN2018SpecialTeamPlayCountsSeries = allMINData.groupby('MIN Special Play')['2018'].sum().sort_values(ascending=False)\nMIN2019SpecialTeamPlayCountsSeries = allMINData.groupby('MIN Special Play')['2019'].sum().sort_values(ascending=False)\nMIN2020SpecialTeamPlayCountsSeries = allMINData.groupby('MIN Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nNE2018SpecialTeamPlayCountsSeries = allNEData.groupby('NE Special Play')['2018'].sum().sort_values(ascending=False)\nNE2019SpecialTeamPlayCountsSeries = allNEData.groupby('NE Special Play')['2019'].sum().sort_values(ascending=False)\nNE2020SpecialTeamPlayCountsSeries = allNEData.groupby('NE Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nNO2018SpecialTeamPlayCountsSeries = allNOData.groupby('NO Special Play')['2018'].sum().sort_values(ascending=False)\nNO2019SpecialTeamPlayCountsSeries = allNOData.groupby('NO Special Play')['2019'].sum().sort_values(ascending=False)\nNO2020SpecialTeamPlayCountsSeries = allNOData.groupby('NO Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nNYG2018SpecialTeamPlayCountsSeries = allNYGData.groupby('NYG Special Play')['2018'].sum().sort_values(ascending=False)\nNYG2019SpecialTeamPlayCountsSeries = allNYGData.groupby('NYG Special Play')['2019'].sum().sort_values(ascending=False)\nNYG2020SpecialTeamPlayCountsSeries = allNYGData.groupby('NYG Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nNYJ2018SpecialTeamPlayCountsSeries = allNYJData.groupby('NYJ Special Play')['2018'].sum().sort_values(ascending=False)\nNYJ2019SpecialTeamPlayCountsSeries = allNYJData.groupby('NYJ Special Play')['2019'].sum().sort_values(ascending=False)\nNYJ2020SpecialTeamPlayCountsSeries = allNYJData.groupby('NYJ Special Play')['2020'].sum().sort_values(ascending=False)\n\nOAK2018SpecialTeamPlayCountsSeries = allOAKData.groupby('OAK Special Play')['2018'].sum().sort_values(ascending=False)\nOAK2019SpecialTeamPlayCountsSeries = allOAKData.groupby('OAK Special Play')['2019'].sum().sort_values(ascending=False)\nOAK2020SpecialTeamPlayCountsSeries = allOAKData.groupby('OAK Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nPHI2018SpecialTeamPlayCountsSeries = allPHIData.groupby('PHI Special Play')['2018'].sum().sort_values(ascending=False)\nPHI2019SpecialTeamPlayCountsSeries = allPHIData.groupby('PHI Special Play')['2019'].sum().sort_values(ascending=False)\nPHI2020SpecialTeamPlayCountsSeries = allPHIData.groupby('PHI Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nPIT2018SpecialTeamPlayCountsSeries = allPITData.groupby('PIT Special Play')['2018'].sum().sort_values(ascending=False)\nPIT2019SpecialTeamPlayCountsSeries = allPITData.groupby('PIT Special Play')['2019'].sum().sort_values(ascending=False)\nPIT2020SpecialTeamPlayCountsSeries = allPITData.groupby('PIT Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nSEA2018SpecialTeamPlayCountsSeries = allSEAData.groupby('SEA Special Play')['2018'].sum().sort_values(ascending=False)\nSEA2019SpecialTeamPlayCountsSeries = allSEAData.groupby('SEA Special Play')['2019'].sum().sort_values(ascending=False)\nSEA2020SpecialTeamPlayCountsSeries = allSEAData.groupby('SEA Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nSF2018SpecialTeamPlayCountsSeries = allSFData.groupby('SF Special Play')['2018'].sum().sort_values(ascending=False)\nSF2019SpecialTeamPlayCountsSeries = allSFData.groupby('SF Special Play')['2019'].sum().sort_values(ascending=False)\nSF2020SpecialTeamPlayCountsSeries = allSFData.groupby('SF Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nTB2018SpecialTeamPlayCountsSeries = allTBData.groupby('TB Special Play')['2018'].sum().sort_values(ascending=False)\nTB2019SpecialTeamPlayCountsSeries = allTBData.groupby('TB Special Play')['2019'].sum().sort_values(ascending=False)\nTB2020SpecialTeamPlayCountsSeries = allTBData.groupby('TB Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nTEN2018SpecialTeamPlayCountsSeries = allTENData.groupby('TEN Special Play')['2018'].sum().sort_values(ascending=False)\nTEN2019SpecialTeamPlayCountsSeries = allTENData.groupby('TEN Special Play')['2019'].sum().sort_values(ascending=False)\nTEN2020SpecialTeamPlayCountsSeries = allTENData.groupby('TEN Special Play')['2020'].sum().sort_values(ascending=False)\n\n\nWAS2018SpecialTeamPlayCountsSeries = allWASData.groupby('WAS Special Play')['2018'].sum().sort_values(ascending=False)\nWAS2019SpecialTeamPlayCountsSeries = allWASData.groupby('WAS Special Play')['2019'].sum().sort_values(ascending=False)\nWAS2020SpecialTeamPlayCountsSeries = allWASData.groupby('WAS Special Play')['2020'].sum().sort_values(ascending=False)","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:18:58.581307Z","iopub.execute_input":"2022-01-07T01:18:58.581533Z","iopub.status.idle":"2022-01-07T01:18:58.746976Z","shell.execute_reply.started":"2022-01-07T01:18:58.581502Z","shell.execute_reply":"2022-01-07T01:18:58.746192Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**<p id='5'><li>Data Preparation for Clear EDA Plotting</li></p>**","metadata":{}},{"cell_type":"code","source":"ARI2018Labels = []\nARI2018Values = []\nARI2018Counts = 6\notherARI2018Count = 0\nfor c in ARI2018SpecialTeamPlayCountsSeries.index:\n    if ARI2018Counts > 0:\n        ARI2018Labels.append(c)\n        ARI2018Values.append(ARI2018SpecialTeamPlayCountsSeries[c])\n        ARI2018Counts -= 1\n    else:\n        otherARI2018Count += ARI2018SpecialTeamPlayCountsSeries[c]\nARI2018Labels.append(\"Other\")\nARI2018Values.append(otherARI2018Count)\n\n\nARI2019Labels = []\nARI2019Values = []\nARI2019Counts = 6\notherARI2019Count = 0\nfor c in ARI2019SpecialTeamPlayCountsSeries.index:\n    if ARI2019Counts > 0:\n        ARI2019Labels.append(c)\n        ARI2019Values.append(ARI2019SpecialTeamPlayCountsSeries[c])\n        ARI2019Counts -= 1\n    else:\n        otherARI2019Count += ARI2019SpecialTeamPlayCountsSeries[c]\nARI2019Labels.append(\"Other\")\nARI2019Values.append(otherARI2019Count)\n\n\nARI2020Labels = []\nARI2020Values = []\nARI2020Counts = 6\notherARI2020Count = 0\nfor c in ARI2020SpecialTeamPlayCountsSeries.index:\n    if ARI2020Counts > 0:\n        ARI2020Labels.append(c)\n        ARI2020Values.append(ARI2020SpecialTeamPlayCountsSeries[c])\n        ARI2020Counts -= 1\n    else:\n        otherARI2020Count += ARI2020SpecialTeamPlayCountsSeries[c]\nARI2020Labels.append(\"Other\")\nARI2020Values.append(otherARI2020Count)\n\n\nATL2018Labels = []\nATL2018Values = []\nATL2018Counts = 6\notherATL2018Count = 0\nfor c in ATL2018SpecialTeamPlayCountsSeries.index:\n    if ATL2018Counts > 0:\n        ATL2018Labels.append(c)\n        ATL2018Values.append(ATL2018SpecialTeamPlayCountsSeries[c])\n        ATL2018Counts -= 1\n    else:\n        otherATL2018Count += ATL2018SpecialTeamPlayCountsSeries[c]\nATL2018Labels.append(\"Other\")\nATL2018Values.append(otherATL2018Count)\n\n\nATL2019Labels = []\nATL2019Values = []\nATL2019Counts = 6\notherATL2019Count = 0\nfor c in ATL2019SpecialTeamPlayCountsSeries.index:\n    if ATL2019Counts > 0:\n        ATL2019Labels.append(c)\n        ATL2019Values.append(ATL2019SpecialTeamPlayCountsSeries[c])\n        ATL2019Counts -= 1\n    else:\n        otherATL2019Count += ATL2019SpecialTeamPlayCountsSeries[c]\nATL2019Labels.append(\"Other\")\nATL2019Values.append(otherATL2019Count)\n\n\nATL2020Labels = []\nATL2020Values = []\nATL2020Counts = 6\notherATL2020Count = 0\nfor c in ATL2020SpecialTeamPlayCountsSeries.index:\n    if ATL2020Counts > 0:\n        ATL2020Labels.append(c)\n        ATL2020Values.append(ATL2020SpecialTeamPlayCountsSeries[c])\n        ATL2020Counts -= 1\n    else:\n        otherATL2020Count += ATL2020SpecialTeamPlayCountsSeries[c]\nATL2020Labels.append(\"Other\")\nATL2020Values.append(otherATL2020Count)\n\n\nBAL2018Labels = []\nBAL2018Values = []\nBAL2018Counts = 6\notherBAL2018Count = 0\nfor c in BAL2018SpecialTeamPlayCountsSeries.index:\n    if BAL2018Counts > 0:\n        BAL2018Labels.append(c)\n        BAL2018Values.append(BAL2018SpecialTeamPlayCountsSeries[c])\n        BAL2018Counts -= 1\n    else:\n        otherBAL2018Count += BAL2018SpecialTeamPlayCountsSeries[c]\nBAL2018Labels.append(\"Other\")\nBAL2018Values.append(otherBAL2018Count)\n\n\nBAL2019Labels = []\nBAL2019Values = []\nBAL2019Counts = 6\notherBAL2019Count = 0\nfor c in BAL2019SpecialTeamPlayCountsSeries.index:\n    if BAL2019Counts > 0:\n        BAL2019Labels.append(c)\n        BAL2019Values.append(BAL2019SpecialTeamPlayCountsSeries[c])\n        BAL2019Counts -= 1\n    else:\n        otherBAL2019Count += BAL2019SpecialTeamPlayCountsSeries[c]\nBAL2019Labels.append(\"Other\")\nBAL2019Values.append(otherBAL2019Count)\n\n\nBAL2020Labels = []\nBAL2020Values = []\nBAL2020Counts = 6\notherBAL2020Count = 0\nfor c in BAL2020SpecialTeamPlayCountsSeries.index:\n    if BAL2020Counts > 0:\n        BAL2020Labels.append(c)\n        BAL2020Values.append(BAL2020SpecialTeamPlayCountsSeries[c])\n        BAL2020Counts -= 1\n    else:\n        otherBAL2020Count += BAL2020SpecialTeamPlayCountsSeries[c]\nBAL2020Labels.append(\"Other\")\nBAL2020Values.append(otherBAL2020Count)\n\n\nBUF2018Labels = []\nBUF2018Values = []\nBUF2018Counts = 6\notherBUF2018Count = 0\nfor c in BUF2018SpecialTeamPlayCountsSeries.index:\n    if BUF2018Counts > 0:\n        BUF2018Labels.append(c)\n        BUF2018Values.append(BUF2018SpecialTeamPlayCountsSeries[c])\n        BUF2018Counts -= 1\n    else:\n        otherBUF2018Count += BUF2018SpecialTeamPlayCountsSeries[c]\nBUF2018Labels.append(\"Other\")\nBUF2018Values.append(otherBUF2018Count)\n\n\nBUF2019Labels = []\nBUF2019Values = []\nBUF2019Counts = 6\notherBUF2019Count = 0\nfor c in BUF2019SpecialTeamPlayCountsSeries.index:\n    if BUF2019Counts > 0:\n        BUF2019Labels.append(c)\n        BUF2019Values.append(BUF2019SpecialTeamPlayCountsSeries[c])\n        BUF2019Counts -= 1\n    else:\n        otherBUF2019Count += BUF2019SpecialTeamPlayCountsSeries[c]\nBUF2019Labels.append(\"Other\")\nBUF2019Values.append(otherBUF2019Count)\n\n\nBUF2020Labels = []\nBUF2020Values = []\nBUF2020Counts = 6\notherBUF2020Count = 0\nfor c in BUF2020SpecialTeamPlayCountsSeries.index:\n    if BUF2020Counts > 0:\n        BUF2020Labels.append(c)\n        BUF2020Values.append(BUF2020SpecialTeamPlayCountsSeries[c])\n        BUF2020Counts -= 1\n    else:\n        otherBUF2020Count += BUF2020SpecialTeamPlayCountsSeries[c]\nBUF2020Labels.append(\"Other\")\nBUF2020Values.append(otherBUF2020Count)\n\n\nCAR2018Labels = []\nCAR2018Values = []\nCAR2018Counts = 6\notherCAR2018Count = 0\nfor c in CAR2018SpecialTeamPlayCountsSeries.index:\n    if CAR2018Counts > 0:\n        CAR2018Labels.append(c)\n        CAR2018Values.append(CAR2018SpecialTeamPlayCountsSeries[c])\n        CAR2018Counts -= 1\n    else:\n        otherCAR2018Count += CAR2018SpecialTeamPlayCountsSeries[c]\nCAR2018Labels.append(\"Other\")\nCAR2018Values.append(otherCAR2018Count)\n\n\nCAR2019Labels = []\nCAR2019Values = []\nCAR2019Counts = 6\notherCAR2019Count = 0\nfor c in CAR2019SpecialTeamPlayCountsSeries.index:\n    if CAR2019Counts > 0:\n        CAR2019Labels.append(c)\n        CAR2019Values.append(CAR2019SpecialTeamPlayCountsSeries[c])\n        CAR2019Counts -= 1\n    else:\n        otherCAR2019Count += CAR2019SpecialTeamPlayCountsSeries[c]\nCAR2019Labels.append(\"Other\")\nCAR2019Values.append(otherCAR2019Count)\n\n\nCAR2020Labels = []\nCAR2020Values = []\nCAR2020Counts = 6\notherCAR2020Count = 0\nfor c in CAR2020SpecialTeamPlayCountsSeries.index:\n    if CAR2020Counts > 0:\n        CAR2020Labels.append(c)\n        CAR2020Values.append(CAR2020SpecialTeamPlayCountsSeries[c])\n        CAR2020Counts -= 1\n    else:\n        otherCAR2020Count += CAR2020SpecialTeamPlayCountsSeries[c]\nCAR2020Labels.append(\"Other\")\nCAR2020Values.append(otherCAR2020Count)\n\n\nCHI2018Labels = []\nCHI2018Values = []\nCHI2018Counts = 6\notherCHI2018Count = 0\nfor c in CHI2018SpecialTeamPlayCountsSeries.index:\n    if CHI2018Counts > 0:\n        CHI2018Labels.append(c)\n        CHI2018Values.append(CHI2018SpecialTeamPlayCountsSeries[c])\n        CHI2018Counts -= 1\n    else:\n        otherCHI2018Count += CHI2018SpecialTeamPlayCountsSeries[c]\nCHI2018Labels.append(\"Other\")\nCHI2018Values.append(otherCHI2018Count)\n\n\nCHI2019Labels = []\nCHI2019Values = []\nCHI2019Counts = 6\notherCHI2019Count = 0\nfor c in CHI2019SpecialTeamPlayCountsSeries.index:\n    if CHI2019Counts > 0:\n        CHI2019Labels.append(c)\n        CHI2019Values.append(CHI2019SpecialTeamPlayCountsSeries[c])\n        CHI2019Counts -= 1\n    else:\n        otherCHI2019Count += CHI2019SpecialTeamPlayCountsSeries[c]\nCHI2019Labels.append(\"Other\")\nCHI2019Values.append(otherCHI2019Count)\n\n\nCHI2020Labels = []\nCHI2020Values = []\nCHI2020Counts = 6\notherCHI2020Count = 0\nfor c in CHI2020SpecialTeamPlayCountsSeries.index:\n    if CHI2020Counts > 0:\n        CHI2020Labels.append(c)\n        CHI2020Values.append(CHI2020SpecialTeamPlayCountsSeries[c])\n        CHI2020Counts -= 1\n    else:\n        otherCHI2020Count += CHI2020SpecialTeamPlayCountsSeries[c]\nCHI2020Labels.append(\"Other\")\nCHI2020Values.append(otherCHI2020Count)\n\n\nCIN2018Labels = []\nCIN2018Values = []\nCIN2018Counts = 6\notherCIN2018Count = 0\nfor c in CIN2018SpecialTeamPlayCountsSeries.index:\n    if CIN2018Counts > 0:\n        CIN2018Labels.append(c)\n        CIN2018Values.append(CIN2018SpecialTeamPlayCountsSeries[c])\n        CIN2018Counts -= 1\n    else:\n        otherCIN2018Count += CIN2018SpecialTeamPlayCountsSeries[c]\nCIN2018Labels.append(\"Other\")\nCIN2018Values.append(otherCIN2018Count)\n\n\nCIN2019Labels = []\nCIN2019Values = []\nCIN2019Counts = 6\notherCIN2019Count = 0\nfor c in CIN2019SpecialTeamPlayCountsSeries.index:\n    if CIN2019Counts > 0:\n        CIN2019Labels.append(c)\n        CIN2019Values.append(CIN2019SpecialTeamPlayCountsSeries[c])\n        CIN2019Counts -= 1\n    else:\n        otherCIN2019Count += CIN2019SpecialTeamPlayCountsSeries[c]\nCIN2019Labels.append(\"Other\")\nCIN2019Values.append(otherCIN2019Count)\n\n\nCIN2020Labels = []\nCIN2020Values = []\nCIN2020Counts = 6\notherCIN2020Count = 0\nfor c in CIN2020SpecialTeamPlayCountsSeries.index:\n    if CIN2020Counts > 0:\n        CIN2020Labels.append(c)\n        CIN2020Values.append(CIN2020SpecialTeamPlayCountsSeries[c])\n        CIN2020Counts -= 1\n    else:\n        otherCIN2020Count += CIN2020SpecialTeamPlayCountsSeries[c]\nCIN2020Labels.append(\"Other\")\nCIN2020Values.append(otherCIN2020Count)\n\n\nCLE2018Labels = []\nCLE2018Values = []\nCLE2018Counts = 6\notherCLE2018Count = 0\nfor c in CLE2018SpecialTeamPlayCountsSeries.index:\n    if CLE2018Counts > 0:\n        CLE2018Labels.append(c)\n        CLE2018Values.append(CLE2018SpecialTeamPlayCountsSeries[c])\n        CLE2018Counts -= 1\n    else:\n        otherCLE2018Count += CLE2018SpecialTeamPlayCountsSeries[c]\nCLE2018Labels.append(\"Other\")\nCLE2018Values.append(otherCLE2018Count)\n\n\nCLE2019Labels = []\nCLE2019Values = []\nCLE2019Counts = 6\notherCLE2019Count = 0\nfor c in CLE2019SpecialTeamPlayCountsSeries.index:\n    if CLE2019Counts > 0:\n        CLE2019Labels.append(c)\n        CLE2019Values.append(CLE2019SpecialTeamPlayCountsSeries[c])\n        CLE2019Counts -= 1\n    else:\n        otherCLE2019Count += CLE2019SpecialTeamPlayCountsSeries[c]\nCLE2019Labels.append(\"Other\")\nCLE2019Values.append(otherCLE2019Count)\n\n\nCLE2020Labels = []\nCLE2020Values = []\nCLE2020Counts = 6\notherCLE2020Count = 0\nfor c in CLE2020SpecialTeamPlayCountsSeries.index:\n    if CLE2020Counts > 0:\n        CLE2020Labels.append(c)\n        CLE2020Values.append(CLE2020SpecialTeamPlayCountsSeries[c])\n        CLE2020Counts -= 1\n    else:\n        otherCLE2020Count += CLE2020SpecialTeamPlayCountsSeries[c]\nCLE2020Labels.append(\"Other\")\nCLE2020Values.append(otherCLE2020Count)\n\n\nDAL2018Labels = []\nDAL2018Values = []\nDAL2018Counts = 6\notherDAL2018Count = 0\nfor c in DAL2018SpecialTeamPlayCountsSeries.index:\n    if DAL2018Counts > 0:\n        DAL2018Labels.append(c)\n        DAL2018Values.append(DAL2018SpecialTeamPlayCountsSeries[c])\n        DAL2018Counts -= 1\n    else:\n        otherDAL2018Count += DAL2018SpecialTeamPlayCountsSeries[c]\nDAL2018Labels.append(\"Other\")\nDAL2018Values.append(otherDAL2018Count)\n\n\nDAL2019Labels = []\nDAL2019Values = []\nDAL2019Counts = 6\notherDAL2019Count = 0\nfor c in DAL2019SpecialTeamPlayCountsSeries.index:\n    if DAL2019Counts > 0:\n        DAL2019Labels.append(c)\n        DAL2019Values.append(DAL2019SpecialTeamPlayCountsSeries[c])\n        DAL2019Counts -= 1\n    else:\n        otherDAL2019Count += DAL2019SpecialTeamPlayCountsSeries[c]\nDAL2019Labels.append(\"Other\")\nDAL2019Values.append(otherDAL2019Count)\n\n\nDAL2020Labels = []\nDAL2020Values = []\nDAL2020Counts = 6\notherDAL2020Count = 0\nfor c in DAL2020SpecialTeamPlayCountsSeries.index:\n    if DAL2020Counts > 0:\n        DAL2020Labels.append(c)\n        DAL2020Values.append(DAL2020SpecialTeamPlayCountsSeries[c])\n        DAL2020Counts -= 1\n    else:\n        otherATL2020Count += DAL2020SpecialTeamPlayCountsSeries[c]\nDAL2020Labels.append(\"Other\")\nDAL2020Values.append(otherDAL2020Count)\n\n\nDEN2018Labels = []\nDEN2018Values = []\nDEN2018Counts = 6\notherDEN2018Count = 0\nfor c in DEN2018SpecialTeamPlayCountsSeries.index:\n    if DEN2018Counts > 0:\n        DEN2018Labels.append(c)\n        DEN2018Values.append(DEN2018SpecialTeamPlayCountsSeries[c])\n        DEN2018Counts -= 1\n    else:\n        otherDEN2018Count += DEN2018SpecialTeamPlayCountsSeries[c]\nDEN2018Labels.append(\"Other\")\nDEN2018Values.append(otherDEN2018Count)\n\n\nDEN2019Labels = []\nDEN2019Values = []\nDEN2019Counts = 6\notherDEN2019Count = 0\nfor c in DEN2019SpecialTeamPlayCountsSeries.index:\n    if DEN2019Counts > 0:\n        DEN2019Labels.append(c)\n        DEN2019Values.append(DEN2019SpecialTeamPlayCountsSeries[c])\n        DEN2019Counts -= 1\n    else:\n        otherDEN2019Count += DEN2019SpecialTeamPlayCountsSeries[c]\nDEN2019Labels.append(\"Other\")\nDEN2019Values.append(otherDEN2019Count)\n\n\nDEN2020Labels = []\nDEN2020Values = []\nDEN2020Counts = 6\notherDEN2020Count = 0\nfor c in DEN2020SpecialTeamPlayCountsSeries.index:\n    if DEN2020Counts > 0:\n        DEN2020Labels.append(c)\n        DEN2020Values.append(DEN2020SpecialTeamPlayCountsSeries[c])\n        DEN2020Counts -= 1\n    else:\n        otherDEN2020Count += DEN2020SpecialTeamPlayCountsSeries[c]\nDEN2020Labels.append(\"Other\")\nDEN2020Values.append(otherDEN2020Count)\n\n\nDET2018Labels = []\nDET2018Values = []\nDET2018Counts = 6\notherDET2018Count = 0\nfor c in DET2018SpecialTeamPlayCountsSeries.index:\n    if DET2018Counts > 0:\n        DET2018Labels.append(c)\n        DET2018Values.append(DET2018SpecialTeamPlayCountsSeries[c])\n        DET2018Counts -= 1\n    else:\n        otherDET2018Count += DET2018SpecialTeamPlayCountsSeries[c]\nDET2018Labels.append(\"Other\")\nDET2018Values.append(otherDET2018Count)\n\n\nDET2019Labels = []\nDET2019Values = []\nDET2019Counts = 6\notherDET2019Count = 0\nfor c in DET2019SpecialTeamPlayCountsSeries.index:\n    if DET2019Counts > 0:\n        DET2019Labels.append(c)\n        DET2019Values.append(DET2019SpecialTeamPlayCountsSeries[c])\n        DET2019Counts -= 1\n    else:\n        otherDET2019Count += DET2019SpecialTeamPlayCountsSeries[c]\nDET2019Labels.append(\"Other\")\nDET2019Values.append(otherDET2019Count)\n\n\nDET2020Labels = []\nDET2020Values = []\nDET2020Counts = 6\notherDET2020Count = 0\nfor c in DET2020SpecialTeamPlayCountsSeries.index:\n    if DET2020Counts > 0:\n        DET2020Labels.append(c)\n        DET2020Values.append(DET2020SpecialTeamPlayCountsSeries[c])\n        DET2020Counts -= 1\n    else:\n        otherATL2020Count += DET2020SpecialTeamPlayCountsSeries[c]\nDET2020Labels.append(\"Other\")\nDET2020Values.append(otherDET2020Count)\n\n\nGB2018Labels = []\nGB2018Values = []\nGB2018Counts = 6\notherGB2018Count = 0\nfor c in GB2018SpecialTeamPlayCountsSeries.index:\n    if GB2018Counts > 0:\n        GB2018Labels.append(c)\n        GB2018Values.append(GB2018SpecialTeamPlayCountsSeries[c])\n        GB2018Counts -= 1\n    else:\n        otherGB2018Count += GB2018SpecialTeamPlayCountsSeries[c]\nGB2018Labels.append(\"Other\")\nGB2018Values.append(otherGB2018Count)\n\n\nGB2019Labels = []\nGB2019Values = []\nGB2019Counts = 6\notherGB2019Count = 0\nfor c in GB2019SpecialTeamPlayCountsSeries.index:\n    if GB2019Counts > 0:\n        GB2019Labels.append(c)\n        GB2019Values.append(GB2019SpecialTeamPlayCountsSeries[c])\n        GB2019Counts -= 1\n    else:\n        otherGB2019Count += GB2019SpecialTeamPlayCountsSeries[c]\nGB2019Labels.append(\"Other\")\nGB2019Values.append(otherGB2019Count)\n\n\nGB2020Labels = []\nGB2020Values = []\nGB2020Counts = 6\notherGB2020Count = 0\nfor c in GB2020SpecialTeamPlayCountsSeries.index:\n    if GB2020Counts > 0:\n        GB2020Labels.append(c)\n        GB2020Values.append(GB2020SpecialTeamPlayCountsSeries[c])\n        GB2020Counts -= 1\n    else:\n        otherGB2020Count += GB2020SpecialTeamPlayCountsSeries[c]\nGB2020Labels.append(\"Other\")\nGB2020Values.append(otherGB2020Count)\n\nHOU2018Labels = []\nHOU2018Values = []\nHOU2018Counts = 6\notherHOU2018Count = 0\nfor c in HOU2018SpecialTeamPlayCountsSeries.index:\n    if HOU2018Counts > 0:\n        HOU2018Labels.append(c)\n        HOU2018Values.append(HOU2018SpecialTeamPlayCountsSeries[c])\n        HOU2018Counts -= 1\n    else:\n        otherHOU2018Count += HOU2018SpecialTeamPlayCountsSeries[c]\nHOU2018Labels.append(\"Other\")\nHOU2018Values.append(otherHOU2018Count)\n\n\nHOU2019Labels = []\nHOU2019Values = []\nHOU2019Counts = 6\notherHOU2019Count = 0\nfor c in HOU2019SpecialTeamPlayCountsSeries.index:\n    if HOU2019Counts > 0:\n        HOU2019Labels.append(c)\n        HOU2019Values.append(HOU2019SpecialTeamPlayCountsSeries[c])\n        HOU2019Counts -= 1\n    else:\n        otherHOU2019Count += HOU2019SpecialTeamPlayCountsSeries[c]\nHOU2019Labels.append(\"Other\")\nHOU2019Values.append(otherHOU2019Count)\n\n\nHOU2020Labels = []\nHOU2020Values = []\nHOU2020Counts = 6\notherHOU2020Count = 0\nfor c in HOU2020SpecialTeamPlayCountsSeries.index:\n    if HOU2020Counts > 0:\n        HOU2020Labels.append(c)\n        HOU2020Values.append(HOU2020SpecialTeamPlayCountsSeries[c])\n        HOU2020Counts -= 1\n    else:\n        otherHOU2020Count += HOU2020SpecialTeamPlayCountsSeries[c]\nHOU2020Labels.append(\"Other\")\nHOU2020Values.append(otherHOU2020Count)\n\n\nIND2018Labels = []\nIND2018Values = []\nIND2018Counts = 6\notherIND2018Count = 0\nfor c in IND2018SpecialTeamPlayCountsSeries.index:\n    if IND2018Counts > 0:\n        IND2018Labels.append(c)\n        IND2018Values.append(IND2018SpecialTeamPlayCountsSeries[c])\n        IND2018Counts -= 1\n    else:\n        otherIND2018Count += IND2018SpecialTeamPlayCountsSeries[c]\nIND2018Labels.append(\"Other\")\nIND2018Values.append(otherIND2018Count)\n\n\nIND2019Labels = []\nIND2019Values = []\nIND2019Counts = 6\notherIND2019Count = 0\nfor c in IND2019SpecialTeamPlayCountsSeries.index:\n    if IND2019Counts > 0:\n        IND2019Labels.append(c)\n        IND2019Values.append(IND2019SpecialTeamPlayCountsSeries[c])\n        IND2019Counts -= 1\n    else:\n        otherIND2019Count += IND2019SpecialTeamPlayCountsSeries[c]\nIND2019Labels.append(\"Other\")\nIND2019Values.append(otherIND2019Count)\n\n\nIND2020Labels = []\nIND2020Values = []\nIND2020Counts = 6\notherIND2020Count = 0\nfor c in IND2020SpecialTeamPlayCountsSeries.index:\n    if IND2020Counts > 0:\n        IND2020Labels.append(c)\n        IND2020Values.append(IND2020SpecialTeamPlayCountsSeries[c])\n        IND2020Counts -= 1\n    else:\n        otherIND2020Count += IND2020SpecialTeamPlayCountsSeries[c]\nIND2020Labels.append(\"Other\")\nIND2020Values.append(otherIND2020Count)\n\n\nJAX2018Labels = []\nJAX2018Values = []\nJAX2018Counts = 6\notherJAX2018Count = 0\nfor c in JAX2018SpecialTeamPlayCountsSeries.index:\n    if JAX2018Counts > 0:\n        JAX2018Labels.append(c)\n        JAX2018Values.append(JAX2018SpecialTeamPlayCountsSeries[c])\n        JAX2018Counts -= 1\n    else:\n        otherJAX2018Count += JAX2018SpecialTeamPlayCountsSeries[c]\nJAX2018Labels.append(\"Other\")\nJAX2018Values.append(otherJAX2018Count)\n\n\nJAX2019Labels = []\nJAX2019Values = []\nJAX2019Counts = 6\notherJAX2019Count = 0\nfor c in JAX2019SpecialTeamPlayCountsSeries.index:\n    if JAX2019Counts > 0:\n        JAX2019Labels.append(c)\n        JAX2019Values.append(JAX2019SpecialTeamPlayCountsSeries[c])\n        JAX2019Counts -= 1\n    else:\n        otherJAX2019Count += JAX2019SpecialTeamPlayCountsSeries[c]\nJAX2019Labels.append(\"Other\")\nJAX2019Values.append(otherJAX2019Count)\n\n\nJAX2020Labels = []\nJAX2020Values = []\nJAX2020Counts = 6\notherJAX2020Count = 0\nfor c in JAX2020SpecialTeamPlayCountsSeries.index:\n    if JAX2020Counts > 0:\n        JAX2020Labels.append(c)\n        JAX2020Values.append(JAX2020SpecialTeamPlayCountsSeries[c])\n        JAX2020Counts -= 1\n    else:\n        otherJAX2020Count += JAX2020SpecialTeamPlayCountsSeries[c]\nJAX2020Labels.append(\"Other\")\nJAX2020Values.append(otherJAX2020Count)\n\n\nKC2018Labels = []\nKC2018Values = []\nKC2018Counts = 6\notherKC2018Count = 0\nfor c in KC2018SpecialTeamPlayCountsSeries.index:\n    if KC2018Counts > 0:\n        KC2018Labels.append(c)\n        KC2018Values.append(KC2018SpecialTeamPlayCountsSeries[c])\n        KC2018Counts -= 1\n    else:\n        otherKC2018Count += KC2018SpecialTeamPlayCountsSeries[c]\nKC2018Labels.append(\"Other\")\nKC2018Values.append(otherKC2018Count)\n\n\nKC2019Labels = []\nKC2019Values = []\nKC2019Counts = 6\notherKC2019Count = 0\nfor c in KC2019SpecialTeamPlayCountsSeries.index:\n    if KC2019Counts > 0:\n        KC2019Labels.append(c)\n        KC2019Values.append(KC2019SpecialTeamPlayCountsSeries[c])\n        KC2019Counts -= 1\n    else:\n        otherKC2019Count += KC2019SpecialTeamPlayCountsSeries[c]\nKC2019Labels.append(\"Other\")\nKC2019Values.append(otherKC2019Count)\n\n\nKC2020Labels = []\nKC2020Values = []\nKC2020Counts = 6\notherKC2020Count = 0\nfor c in KC2020SpecialTeamPlayCountsSeries.index:\n    if KC2020Counts > 0:\n        KC2020Labels.append(c)\n        KC2020Values.append(KC2020SpecialTeamPlayCountsSeries[c])\n        KC2020Counts -= 1\n    else:\n        otherKC2020Count += KC2020SpecialTeamPlayCountsSeries[c]\nKC2020Labels.append(\"Other\")\nKC2020Values.append(otherKC2020Count)\n\n\nLA2018Labels = []\nLA2018Values = []\nLA2018Counts = 6\notherLA2018Count = 0\nfor c in LA2018SpecialTeamPlayCountsSeries.index:\n    if LA2018Counts > 0:\n        LA2018Labels.append(c)\n        LA2018Values.append(LA2018SpecialTeamPlayCountsSeries[c])\n        LA2018Counts -= 1\n    else:\n        otherLA2018Count += LA2018SpecialTeamPlayCountsSeries[c]\nLA2018Labels.append(\"Other\")\nLA2018Values.append(otherLA2018Count)\n\n\nLA2019Labels = []\nLA2019Values = []\nLA2019Counts = 6\notherLA2019Count = 0\nfor c in LA2019SpecialTeamPlayCountsSeries.index:\n    if LA2019Counts > 0:\n        LA2019Labels.append(c)\n        LA2019Values.append(LA2019SpecialTeamPlayCountsSeries[c])\n        LA2019Counts -= 1\n    else:\n        otherLA2019Count += LA2019SpecialTeamPlayCountsSeries[c]\nLA2019Labels.append(\"Other\")\nLA2019Values.append(otherLA2019Count)\n\n\nLA2020Labels = []\nLA2020Values = []\nLA2020Counts = 6\notherLA2020Count = 0\nfor c in LA2020SpecialTeamPlayCountsSeries.index:\n    if LA2020Counts > 0:\n        LA2020Labels.append(c)\n        LA2020Values.append(LA2020SpecialTeamPlayCountsSeries[c])\n        LA2020Counts -= 1\n    else:\n        otherLA2020Count += LA2020SpecialTeamPlayCountsSeries[c]\nLA2020Labels.append(\"Other\")\nLA2020Values.append(otherLA2020Count)\n\n\nLAC2018Labels = []\nLAC2018Values = []\nLAC2018Counts = 6\notherLAC2018Count = 0\nfor c in LAC2018SpecialTeamPlayCountsSeries.index:\n    if LAC2018Counts > 0:\n        LAC2018Labels.append(c)\n        LAC2018Values.append(LAC2018SpecialTeamPlayCountsSeries[c])\n        LAC2018Counts -= 1\n    else:\n        otherLAC2018Count += LAC2018SpecialTeamPlayCountsSeries[c]\nLAC2018Labels.append(\"Other\")\nLAC2018Values.append(otherLAC2018Count)\n\n\nLAC2019Labels = []\nLAC2019Values = []\nLAC2019Counts = 6\notherLAC2019Count = 0\nfor c in LAC2019SpecialTeamPlayCountsSeries.index:\n    if LAC2019Counts > 0:\n        LAC2019Labels.append(c)\n        LAC2019Values.append(LAC2019SpecialTeamPlayCountsSeries[c])\n        LAC2019Counts -= 1\n    else:\n        otherLAC2019Count += LAC2019SpecialTeamPlayCountsSeries[c]\nLAC2019Labels.append(\"Other\")\nLAC2019Values.append(otherLAC2019Count)\n\n\nLAC2020Labels = []\nLAC2020Values = []\nLAC2020Counts = 6\notherLAC2020Count = 0\nfor c in LAC2020SpecialTeamPlayCountsSeries.index:\n    if LAC2020Counts > 0:\n        LAC2020Labels.append(c)\n        LAC2020Values.append(LAC2020SpecialTeamPlayCountsSeries[c])\n        LAC2020Counts -= 1\n    else:\n        otherLAC2020Count += LAC2020SpecialTeamPlayCountsSeries[c]\nLAC2020Labels.append(\"Other\")\nLAC2020Values.append(otherLAC2020Count)\n\n\nMIA2018Labels = []\nMIA2018Values = []\nMIA2018Counts = 6\notherMIA2018Count = 0\nfor c in MIA2018SpecialTeamPlayCountsSeries.index:\n    if MIA2018Counts > 0:\n        MIA2018Labels.append(c)\n        MIA2018Values.append(MIA2018SpecialTeamPlayCountsSeries[c])\n        MIA2018Counts -= 1\n    else:\n        otherMIA2018Count += MIA2018SpecialTeamPlayCountsSeries[c]\nMIA2018Labels.append(\"Other\")\nMIA2018Values.append(otherMIA2018Count)\n\n\nMIA2019Labels = []\nMIA2019Values = []\nMIA2019Counts = 6\notherMIA2019Count = 0\nfor c in MIA2019SpecialTeamPlayCountsSeries.index:\n    if MIA2019Counts > 0:\n        MIA2019Labels.append(c)\n        MIA2019Values.append(MIA2019SpecialTeamPlayCountsSeries[c])\n        MIA2019Counts -= 1\n    else:\n        otherMIA2019Count += MIA2019SpecialTeamPlayCountsSeries[c]\nMIA2019Labels.append(\"Other\")\nMIA2019Values.append(otherMIA2019Count)\n\n\nMIA2020Labels = []\nMIA2020Values = []\nMIA2020Counts = 6\notherMIA2020Count = 0\nfor c in MIA2020SpecialTeamPlayCountsSeries.index:\n    if MIA2020Counts > 0:\n        MIA2020Labels.append(c)\n        MIA2020Values.append(MIA2020SpecialTeamPlayCountsSeries[c])\n        MIA2020Counts -= 1\n    else:\n        otherMIA2020Count += MIA2020SpecialTeamPlayCountsSeries[c]\nMIA2020Labels.append(\"Other\")\nMIA2020Values.append(otherMIA2020Count)\n\n\nMIN2018Labels = []\nMIN2018Values = []\nMIN2018Counts = 6\notherMIN2018Count = 0\nfor c in MIN2018SpecialTeamPlayCountsSeries.index:\n    if MIN2018Counts > 0:\n        MIN2018Labels.append(c)\n        MIN2018Values.append(MIN2018SpecialTeamPlayCountsSeries[c])\n        MIN2018Counts -= 1\n    else:\n        otherMIN2018Count += MIN2018SpecialTeamPlayCountsSeries[c]\nMIN2018Labels.append(\"Other\")\nMIN2018Values.append(otherMIN2018Count)\n\n\nMIN2019Labels = []\nMIN2019Values = []\nMIN2019Counts = 6\notherMIN2019Count = 0\nfor c in MIN2019SpecialTeamPlayCountsSeries.index:\n    if MIN2019Counts > 0:\n        MIN2019Labels.append(c)\n        MIN2019Values.append(MIN2019SpecialTeamPlayCountsSeries[c])\n        MIN2019Counts -= 1\n    else:\n        otherMIN2019Count += MIN2019SpecialTeamPlayCountsSeries[c]\nMIN2019Labels.append(\"Other\")\nMIN2019Values.append(otherMIN2019Count)\n\n\nMIN2020Labels = []\nMIN2020Values = []\nMIN2020Counts = 6\notherMIN2020Count = 0\nfor c in MIN2020SpecialTeamPlayCountsSeries.index:\n    if MIN2020Counts > 0:\n        MIN2020Labels.append(c)\n        MIN2020Values.append(MIN2020SpecialTeamPlayCountsSeries[c])\n        MIN2020Counts -= 1\n    else:\n        otherMIN2020Count += MIN2020SpecialTeamPlayCountsSeries[c]\nMIN2020Labels.append(\"Other\")\nMIN2020Values.append(otherMIN2020Count)\n\n\nNE2018Labels = []\nNE2018Values = []\nNE2018Counts = 6\notherNE2018Count = 0\nfor c in NE2018SpecialTeamPlayCountsSeries.index:\n    if NE2018Counts > 0:\n        NE2018Labels.append(c)\n        NE2018Values.append(NE2018SpecialTeamPlayCountsSeries[c])\n        NE2018Counts -= 1\n    else:\n        otherNE2018Count += NE2018SpecialTeamPlayCountsSeries[c]\nNE2018Labels.append(\"Other\")\nNE2018Values.append(otherNE2018Count)\n\n\nNE2019Labels = []\nNE2019Values = []\nNE2019Counts = 6\notherNE2019Count = 0\nfor c in NE2019SpecialTeamPlayCountsSeries.index:\n    if NE2019Counts > 0:\n        NE2019Labels.append(c)\n        NE2019Values.append(NE2019SpecialTeamPlayCountsSeries[c])\n        NE2019Counts -= 1\n    else:\n        otherNE2019Count += NE2019SpecialTeamPlayCountsSeries[c]\nNE2019Labels.append(\"Other\")\nNE2019Values.append(otherNE2019Count)\n\n\nNE2020Labels = []\nNE2020Values = []\nNE2020Counts = 6\notherNE2020Count = 0\nfor c in NE2020SpecialTeamPlayCountsSeries.index:\n    if NE2020Counts > 0:\n        NE2020Labels.append(c)\n        NE2020Values.append(NE2020SpecialTeamPlayCountsSeries[c])\n        NE2020Counts -= 1\n    else:\n        otherNE2020Count += NE2020SpecialTeamPlayCountsSeries[c]\nNE2020Labels.append(\"Other\")\nNE2020Values.append(otherNE2020Count)\n\n\nNO2018Labels = []\nNO2018Values = []\nNO2018Counts = 6\notherNO2018Count = 0\nfor c in NO2018SpecialTeamPlayCountsSeries.index:\n    if NO2018Counts > 0:\n        NO2018Labels.append(c)\n        NO2018Values.append(NO2018SpecialTeamPlayCountsSeries[c])\n        NO2018Counts -= 1\n    else:\n        otherNO2018Count += NO2018SpecialTeamPlayCountsSeries[c]\nNO2018Labels.append(\"Other\")\nNO2018Values.append(otherNO2018Count)\n\n\nNO2019Labels = []\nNO2019Values = []\nNO2019Counts = 6\notherNO2019Count = 0\nfor c in NO2019SpecialTeamPlayCountsSeries.index:\n    if NO2019Counts > 0:\n        NO2019Labels.append(c)\n        NO2019Values.append(NO2019SpecialTeamPlayCountsSeries[c])\n        NO2019Counts -= 1\n    else:\n        otherNO2019Count += NO2019SpecialTeamPlayCountsSeries[c]\nNO2019Labels.append(\"Other\")\nNO2019Values.append(otherNO2019Count)\n\n\nNO2020Labels = []\nNO2020Values = []\nNO2020Counts = 6\notherNO2020Count = 0\nfor c in NO2020SpecialTeamPlayCountsSeries.index:\n    if NO2020Counts > 0:\n        NO2020Labels.append(c)\n        NO2020Values.append(NO2020SpecialTeamPlayCountsSeries[c])\n        NO2020Counts -= 1\n    else:\n        otherNO2020Count += NO2020SpecialTeamPlayCountsSeries[c]\nNO2020Labels.append(\"Other\")\nNO2020Values.append(otherNO2020Count)\n\n\nNYG2018Labels = []\nNYG2018Values = []\nNYG2018Counts = 6\notherNYG2018Count = 0\nfor c in NYG2018SpecialTeamPlayCountsSeries.index:\n    if NYG2018Counts > 0:\n        NYG2018Labels.append(c)\n        NYG2018Values.append(NYG2018SpecialTeamPlayCountsSeries[c])\n        NYG2018Counts -= 1\n    else:\n        otherNYG2018Count += NYG2018SpecialTeamPlayCountsSeries[c]\nNYG2018Labels.append(\"Other\")\nNYG2018Values.append(otherNYG2018Count)\n\n\nNYG2019Labels = []\nNYG2019Values = []\nNYG2019Counts = 6\notherNYG2019Count = 0\nfor c in NYG2019SpecialTeamPlayCountsSeries.index:\n    if NYG2019Counts > 0:\n        NYG2019Labels.append(c)\n        NYG2019Values.append(NYG2019SpecialTeamPlayCountsSeries[c])\n        NYG2019Counts -= 1\n    else:\n        otherNYG2019Count += NYG2019SpecialTeamPlayCountsSeries[c]\nNYG2019Labels.append(\"Other\")\nNYG2019Values.append(otherNYG2019Count)\n\n\nNYG2020Labels = []\nNYG2020Values = []\nNYG2020Counts = 6\notherNYG2020Count = 0\nfor c in NYG2020SpecialTeamPlayCountsSeries.index:\n    if NYG2020Counts > 0:\n        NYG2020Labels.append(c)\n        NYG2020Values.append(NYG2020SpecialTeamPlayCountsSeries[c])\n        NYG2020Counts -= 1\n    else:\n        otherNYG2020Count += NYG2020SpecialTeamPlayCountsSeries[c]\nNYG2020Labels.append(\"Other\")\nNYG2020Values.append(otherNYG2020Count)\n\n\nNYJ2018Labels = []\nNYJ2018Values = []\nNYJ2018Counts = 6\notherNYJ2018Count = 0\nfor c in NYJ2018SpecialTeamPlayCountsSeries.index:\n    if NYJ2018Counts > 0:\n        NYJ2018Labels.append(c)\n        NYJ2018Values.append(NYJ2018SpecialTeamPlayCountsSeries[c])\n        NYJ2018Counts -= 1\n    else:\n        otherNYJ2018Count += NYJ2018SpecialTeamPlayCountsSeries[c]\nNYJ2018Labels.append(\"Other\")\nNYJ2018Values.append(otherNYJ2018Count)\n\n\nNYJ2019Labels = []\nNYJ2019Values = []\nNYJ2019Counts = 6\notherNYJ2019Count = 0\nfor c in NYJ2019SpecialTeamPlayCountsSeries.index:\n    if NYJ2019Counts > 0:\n        NYJ2019Labels.append(c)\n        NYJ2019Values.append(NYJ2019SpecialTeamPlayCountsSeries[c])\n        NYJ2019Counts -= 1\n    else:\n        otherNYJ2019Count += NYJ2019SpecialTeamPlayCountsSeries[c]\nNYJ2019Labels.append(\"Other\")\nNYJ2019Values.append(otherNYJ2019Count)\n\n\nNYJ2020Labels = []\nNYJ2020Values = []\nNYJ2020Counts = 6\notherNYJ2020Count = 0\nfor c in NYJ2020SpecialTeamPlayCountsSeries.index:\n    if NYJ2020Counts > 0:\n        NYJ2020Labels.append(c)\n        NYJ2020Values.append(NYJ2020SpecialTeamPlayCountsSeries[c])\n        NYJ2020Counts -= 1\n    else:\n        otherNYJ2020Count += NYJ2020SpecialTeamPlayCountsSeries[c]\nNYJ2020Labels.append(\"Other\")\nNYJ2020Values.append(otherNYJ2020Count)\n\nOAK2018Labels = []\nOAK2018Values = []\nOAK2018Counts = 6\notherOAK2018Count = 0\nfor c in OAK2018SpecialTeamPlayCountsSeries.index:\n    if OAK2018Counts > 0:\n        OAK2018Labels.append(c)\n        OAK2018Values.append(OAK2018SpecialTeamPlayCountsSeries[c])\n        OAK2018Counts -= 1\n    else:\n        otherOAK2018Count += OAK2018SpecialTeamPlayCountsSeries[c]\nOAK2018Labels.append(\"Other\")\nOAK2018Values.append(otherOAK2018Count)\n\n\nOAK2019Labels = []\nOAK2019Values = []\nOAK2019Counts = 6\notherOAK2019Count = 0\nfor c in OAK2019SpecialTeamPlayCountsSeries.index:\n    if OAK2019Counts > 0:\n        OAK2019Labels.append(c)\n        OAK2019Values.append(OAK2019SpecialTeamPlayCountsSeries[c])\n        OAK2019Counts -= 1\n    else:\n        otherOAK2019Count += OAK2019SpecialTeamPlayCountsSeries[c]\nOAK2019Labels.append(\"Other\")\nOAK2019Values.append(otherOAK2019Count)\n\n\nOAK2020Labels = []\nOAK2020Values = []\nOAK2020Counts = 6\notherOAK2020Count = 0\nfor c in OAK2020SpecialTeamPlayCountsSeries.index:\n    if OAK2020Counts > 0:\n        OAK2020Labels.append(c)\n        OAK2020Values.append(OAK2020SpecialTeamPlayCountsSeries[c])\n        OAK2020Counts -= 1\n    else:\n        otherOAK2020Count += OAK2020SpecialTeamPlayCountsSeries[c]\nOAK2020Labels.append(\"Other\")\nOAK2020Values.append(otherOAK2020Count)\n\n\nPHI2018Labels = []\nPHI2018Values = []\nPHI2018Counts = 6\notherPHI2018Count = 0\nfor c in PHI2018SpecialTeamPlayCountsSeries.index:\n    if PHI2018Counts > 0:\n        PHI2018Labels.append(c)\n        PHI2018Values.append(PHI2018SpecialTeamPlayCountsSeries[c])\n        PHI2018Counts -= 1\n    else:\n        otherPHI2018Count += PHI2018SpecialTeamPlayCountsSeries[c]\nPHI2018Labels.append(\"Other\")\nPHI2018Values.append(otherPHI2018Count)\n\n\nPHI2019Labels = []\nPHI2019Values = []\nPHI2019Counts = 6\notherPHI2019Count = 0\nfor c in PHI2019SpecialTeamPlayCountsSeries.index:\n    if PHI2019Counts > 0:\n        PHI2019Labels.append(c)\n        PHI2019Values.append(PHI2019SpecialTeamPlayCountsSeries[c])\n        PHI2019Counts -= 1\n    else:\n        otherPHI2019Count += PHI2019SpecialTeamPlayCountsSeries[c]\nPHI2019Labels.append(\"Other\")\nPHI2019Values.append(otherPHI2019Count)\n\n\nPHI2020Labels = []\nPHI2020Values = []\nPHI2020Counts = 6\notherPHI2020Count = 0\nfor c in PHI2020SpecialTeamPlayCountsSeries.index:\n    if PHI2020Counts > 0:\n        PHI2020Labels.append(c)\n        PHI2020Values.append(PHI2020SpecialTeamPlayCountsSeries[c])\n        PHI2020Counts -= 1\n    else:\n        otherPHI2020Count += PHI2020SpecialTeamPlayCountsSeries[c]\nPHI2020Labels.append(\"Other\")\nPHI2020Values.append(otherPHI2020Count)\n\n\nPIT2018Labels = []\nPIT2018Values = []\nPIT2018Counts = 6\notherPIT2018Count = 0\nfor c in PIT2018SpecialTeamPlayCountsSeries.index:\n    if PIT2018Counts > 0:\n        PIT2018Labels.append(c)\n        PIT2018Values.append(PIT2018SpecialTeamPlayCountsSeries[c])\n        PIT2018Counts -= 1\n    else:\n        otherPIT2018Count += PIT2018SpecialTeamPlayCountsSeries[c]\nPIT2018Labels.append(\"Other\")\nPIT2018Values.append(otherPIT2018Count)\n\n\nPIT2019Labels = []\nPIT2019Values = []\nPIT2019Counts = 6\notherPIT2019Count = 0\nfor c in PIT2019SpecialTeamPlayCountsSeries.index:\n    if PIT2019Counts > 0:\n        PIT2019Labels.append(c)\n        PIT2019Values.append(PIT2019SpecialTeamPlayCountsSeries[c])\n        PIT2019Counts -= 1\n    else:\n        otherPIT2019Count += PIT2019SpecialTeamPlayCountsSeries[c]\nPIT2019Labels.append(\"Other\")\nPIT2019Values.append(otherPIT2019Count)\n\n\nPIT2020Labels = []\nPIT2020Values = []\nPIT2020Counts = 6\notherPIT2020Count = 0\nfor c in PIT2020SpecialTeamPlayCountsSeries.index:\n    if PIT2020Counts > 0:\n        PIT2020Labels.append(c)\n        PIT2020Values.append(PIT2020SpecialTeamPlayCountsSeries[c])\n        PIT2020Counts -= 1\n    else:\n        otherPIT2020Count += PIT2020SpecialTeamPlayCountsSeries[c]\nPIT2020Labels.append(\"Other\")\nPIT2020Values.append(otherPIT2020Count)\n\n\nSEA2018Labels = []\nSEA2018Values = []\nSEA2018Counts = 6\notherSEA2018Count = 0\nfor c in SEA2018SpecialTeamPlayCountsSeries.index:\n    if SEA2018Counts > 0:\n        SEA2018Labels.append(c)\n        SEA2018Values.append(SEA2018SpecialTeamPlayCountsSeries[c])\n        SEA2018Counts -= 1\n    else:\n        otherSEA2018Count += SEA2018SpecialTeamPlayCountsSeries[c]\nSEA2018Labels.append(\"Other\")\nSEA2018Values.append(otherSEA2018Count)\n\n\nSEA2019Labels = []\nSEA2019Values = []\nSEA2019Counts = 6\notherSEA2019Count = 0\nfor c in SEA2019SpecialTeamPlayCountsSeries.index:\n    if SEA2019Counts > 0:\n        SEA2019Labels.append(c)\n        SEA2019Values.append(SEA2019SpecialTeamPlayCountsSeries[c])\n        SEA2019Counts -= 1\n    else:\n        otherSEA2019Count += SEA2019SpecialTeamPlayCountsSeries[c]\nSEA2019Labels.append(\"Other\")\nSEA2019Values.append(otherSEA2019Count)\n\n\nSEA2020Labels = []\nSEA2020Values = []\nSEA2020Counts = 6\notherSEA2020Count = 0\nfor c in SEA2020SpecialTeamPlayCountsSeries.index:\n    if SEA2020Counts > 0:\n        SEA2020Labels.append(c)\n        SEA2020Values.append(SEA2020SpecialTeamPlayCountsSeries[c])\n        SEA2020Counts -= 1\n    else:\n        otherSEA2020Count += SEA2020SpecialTeamPlayCountsSeries[c]\nSEA2020Labels.append(\"Other\")\nSEA2020Values.append(otherSEA2020Count)\n\n\nSF2018Labels = []\nSF2018Values = []\nSF2018Counts = 6\notherSF2018Count = 0\nfor c in SF2018SpecialTeamPlayCountsSeries.index:\n    if SF2018Counts > 0:\n        SF2018Labels.append(c)\n        SF2018Values.append(SF2018SpecialTeamPlayCountsSeries[c])\n        SF2018Counts -= 1\n    else:\n        otherSF2018Count += SF2018SpecialTeamPlayCountsSeries[c]\nSF2018Labels.append(\"Other\")\nSF2018Values.append(otherSF2018Count)\n\n\nSF2019Labels = []\nSF2019Values = []\nSF2019Counts = 6\notherSF2019Count = 0\nfor c in SF2019SpecialTeamPlayCountsSeries.index:\n    if SF2019Counts > 0:\n        SF2019Labels.append(c)\n        SF2019Values.append(SF2019SpecialTeamPlayCountsSeries[c])\n        SF2019Counts -= 1\n    else:\n        otherSF2019Count += SF2019SpecialTeamPlayCountsSeries[c]\nSF2019Labels.append(\"Other\")\nSF2019Values.append(otherSF2019Count)\n\n\nSF2020Labels = []\nSF2020Values = []\nSF2020Counts = 6\notherSF2020Count = 0\nfor c in SF2020SpecialTeamPlayCountsSeries.index:\n    if SF2020Counts > 0:\n        SF2020Labels.append(c)\n        SF2020Values.append(SF2020SpecialTeamPlayCountsSeries[c])\n        SF2020Counts -= 1\n    else:\n        otherSF2020Count += SF2020SpecialTeamPlayCountsSeries[c]\nSF2020Labels.append(\"Other\")\nSF2020Values.append(otherSF2020Count)\n\n\nTB2018Labels = []\nTB2018Values = []\nTB2018Counts = 6\notherTB2018Count = 0\nfor c in TB2018SpecialTeamPlayCountsSeries.index:\n    if TB2018Counts > 0:\n        TB2018Labels.append(c)\n        TB2018Values.append(TB2018SpecialTeamPlayCountsSeries[c])\n        TB2018Counts -= 1\n    else:\n        otherTB2018Count += TB2018SpecialTeamPlayCountsSeries[c]\nTB2018Labels.append(\"Other\")\nTB2018Values.append(otherTB2018Count)\n\n\nTB2019Labels = []\nTB2019Values = []\nTB2019Counts = 6\notherTB2019Count = 0\nfor c in TB2019SpecialTeamPlayCountsSeries.index:\n    if TB2019Counts > 0:\n        TB2019Labels.append(c)\n        TB2019Values.append(TB2019SpecialTeamPlayCountsSeries[c])\n        TB2019Counts -= 1\n    else:\n        otherTB2019Count += TB2019SpecialTeamPlayCountsSeries[c]\nTB2019Labels.append(\"Other\")\nTB2019Values.append(otherTB2019Count)\n\n\nTB2020Labels = []\nTB2020Values = []\nTB2020Counts = 6\notherTB2020Count = 0\nfor c in TB2020SpecialTeamPlayCountsSeries.index:\n    if TB2020Counts > 0:\n        TB2020Labels.append(c)\n        TB2020Values.append(TB2020SpecialTeamPlayCountsSeries[c])\n        TB2020Counts -= 1\n    else:\n        otherTB2020Count += TB2020SpecialTeamPlayCountsSeries[c]\nTB2020Labels.append(\"Other\")\nTB2020Values.append(otherTB2020Count)\n\n\nTEN2018Labels = []\nTEN2018Values = []\nTEN2018Counts = 6\notherTEN2018Count = 0\nfor c in TEN2018SpecialTeamPlayCountsSeries.index:\n    if TEN2018Counts > 0:\n        TEN2018Labels.append(c)\n        TEN2018Values.append(TEN2018SpecialTeamPlayCountsSeries[c])\n        TEN2018Counts -= 1\n    else:\n        otherTEN2018Count += TEN2018SpecialTeamPlayCountsSeries[c]\nTEN2018Labels.append(\"Other\")\nTEN2018Values.append(otherTEN2018Count)\n\n\nTEN2019Labels = []\nTEN2019Values = []\nTEN2019Counts = 6\notherTEN2019Count = 0\nfor c in TEN2019SpecialTeamPlayCountsSeries.index:\n    if TEN2019Counts > 0:\n        TEN2019Labels.append(c)\n        TEN2019Values.append(TEN2019SpecialTeamPlayCountsSeries[c])\n        TEN2019Counts -= 1\n    else:\n        otherTEN2019Count += TEN2019SpecialTeamPlayCountsSeries[c]\nTEN2019Labels.append(\"Other\")\nTEN2019Values.append(otherTEN2019Count)\n\n\nTEN2020Labels = []\nTEN2020Values = []\nTEN2020Counts = 6\notherTEN2020Count = 0\nfor c in TEN2020SpecialTeamPlayCountsSeries.index:\n    if TEN2020Counts > 0:\n        TEN2020Labels.append(c)\n        TEN2020Values.append(TEN2020SpecialTeamPlayCountsSeries[c])\n        TEN2020Counts -= 1\n    else:\n        otherTEN2020Count += TEN2020SpecialTeamPlayCountsSeries[c]\nTEN2020Labels.append(\"Other\")\nTEN2020Values.append(otherTEN2020Count)\n\n\nWAS2018Labels = []\nWAS2018Values = []\nWAS2018Counts = 6\notherWAS2018Count = 0\nfor c in WAS2018SpecialTeamPlayCountsSeries.index:\n    if WAS2018Counts > 0:\n        WAS2018Labels.append(c)\n        WAS2018Values.append(WAS2018SpecialTeamPlayCountsSeries[c])\n        WAS2018Counts -= 1\n    else:\n        otherWAS2018Count += WAS2018SpecialTeamPlayCountsSeries[c]\nWAS2018Labels.append(\"Other\")\nWAS2018Values.append(otherWAS2018Count)\n\n\nWAS2019Labels = []\nWAS2019Values = []\nWAS2019Counts = 6\notherWAS2019Count = 0\nfor c in WAS2019SpecialTeamPlayCountsSeries.index:\n    if WAS2019Counts > 0:\n        WAS2019Labels.append(c)\n        WAS2019Values.append(WAS2019SpecialTeamPlayCountsSeries[c])\n        WAS2019Counts -= 1\n    else:\n        otherWAS2019Count += WAS2019SpecialTeamPlayCountsSeries[c]\nWAS2019Labels.append(\"Other\")\nWAS2019Values.append(otherWAS2019Count)\n\n\nWAS2020Labels = []\nWAS2020Values = []\nWAS2020Counts = 6\notherWAS2020Count = 0\nfor c in WAS2020SpecialTeamPlayCountsSeries.index:\n    if WAS2020Counts > 0:\n        WAS2020Labels.append(c)\n        WAS2020Values.append(WAS2020SpecialTeamPlayCountsSeries[c])\n        WAS2020Counts -= 1\n    else:\n        otherWAS2020Count += WAS2020SpecialTeamPlayCountsSeries[c]\nWAS2020Labels.append(\"Other\")\nWAS2020Values.append(otherWAS2020Count)","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:18:58.750955Z","iopub.execute_input":"2022-01-07T01:18:58.751174Z","iopub.status.idle":"2022-01-07T01:18:59.032377Z","shell.execute_reply.started":"2022-01-07T01:18:58.751149Z","shell.execute_reply":"2022-01-07T01:18:59.03165Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"6\"></a> <br>\n# EDA for Special Plays Part - 1","metadata":{}},{"cell_type":"code","source":"x = 0\ny = 0\nsns.set(rc={'axes.facecolor':'#f6f5f5', 'figure.facecolor':'#f6f5f5'})\ncolors2018 = sns.color_palette('pastel')\ncolors2019 = sns.color_palette('Set2')\ncolors2020 = sns.color_palette('Set3')\nfig, axes = plt.subplots(8, 3, figsize=(200, 380),facecolor='#f6f5f5')\naxes[0,0].pie(ARI2018Values, labels=ARI2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in ARI2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[0,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[0,0].set_title(\"ARI Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[0,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\", ha=\"center\")\naxes[0,1].pie(ARI2019Values, labels=ARI2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in ARI2019Labels], shadow=True, startangle=130,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[0,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[0,1].set_title(\"ARI Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[0,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[0,2].pie(ARI2020Values, labels=ARI2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in ARI2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[0,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[0,2].set_title(\"ARI Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[0,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[1,0].pie(ATL2018Values, labels=ATL2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in ATL2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[1,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[1,0].set_title(\"ATL Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[1,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[1,1].pie(ATL2019Values, labels=ATL2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in ATL2019Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[1,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[1,1].set_title(\"ATL Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[1,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[1,2].pie(ATL2020Values, labels=ATL2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in ATL2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[1,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[1,2].set_title(\"ATL Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[1,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[2,0].pie(BAL2018Values, labels=BAL2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in BAL2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[2,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[2,0].set_title(\"BAL Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[2,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[2,1].pie(BAL2019Values, labels=BAL2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in BAL2019Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[2,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[2,1].set_title(\"BAL Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[2,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[2,2].pie(BAL2020Values, labels=BAL2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in BAL2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[2,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[2,2].set_title(\"BAL Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[2,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[3,0].pie(BUF2018Values, labels=BUF2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in BUF2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[3,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[3,0].set_title(\"BUF Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[3,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[3,1].pie(BUF2019Values, labels=BUF2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in BUF2019Labels], shadow=True, startangle=125,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[3,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[3,1].set_title(\"BUF Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[3,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[3,2].pie(BUF2020Values, labels=BUF2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in BUF2020Labels], shadow=True, startangle=110,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[3,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[3,2].set_title(\"BUF Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[3,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[4,0].pie(CAR2018Values, labels=CAR2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in CAR2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[4,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[4,0].set_title(\"CAR Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[4,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[4,1].pie(CAR2019Values, labels=CAR2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in CAR2019Labels], shadow=True, startangle=110,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[4,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[4,1].set_title(\"CAR Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[4,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[4,2].pie(CAR2020Values, labels=CAR2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in CAR2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[4,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[4,2].set_title(\"CAR Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[4,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\", ha=\"center\")\n\naxes[5,0].pie(CHI2018Values, labels=CHI2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in CHI2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[5,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[5,0].set_title(\"CHI Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[5,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[5,1].pie(CHI2019Values, labels=CHI2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in CHI2019Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[5,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[5,1].set_title(\"CHI Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[5,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[5,2].pie(CHI2020Values, labels=CHI2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in CHI2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[5,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[5,2].set_title(\"CHI Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[5,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[6,0].pie(CIN2018Values, labels=CIN2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in CIN2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[6,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[6,0].set_title(\"CIN Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[6,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[6,1].pie(CIN2019Values, labels=CIN2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in CIN2019Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[6,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[6,1].set_title(\"CIN Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[6,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[6,2].pie(CIN2020Values, labels=CIN2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in CIN2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[6,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[6,2].set_title(\"CIN Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[6,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[7,0].pie(CLE2018Values, labels=CLE2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in CLE2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[7,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[7,0].set_title(\"CLE Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[7,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[7,1].pie(CLE2019Values, labels=CLE2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in CLE2019Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[7,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[7,1].set_title(\"CLE Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[7,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[7,2].pie(CLE2020Values, labels=CLE2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in CLE2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[7,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[7,2].set_title(\"CLE Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[7,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110, va=\"center\", ha=\"center\")\nfig.suptitle(\"NFL Special Teams Play Analysis (2018-20) Part-I\", y=1, fontweight=\"bold\", fontsize=200)\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:18:59.034258Z","iopub.execute_input":"2022-01-07T01:18:59.034666Z","iopub.status.idle":"2022-01-07T01:19:36.967558Z","shell.execute_reply.started":"2022-01-07T01:18:59.034632Z","shell.execute_reply":"2022-01-07T01:19:36.964198Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**<p id='7'><li>Statistics for Special Plays 2018 - 2020</li></p>**","metadata":{}},{"cell_type":"code","source":"sns.set(rc={'axes.facecolor':'#f6f5f5', 'figure.facecolor':'#f6f5f5'})\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allARIData['ARI Special Play'],allARIData['2020'], color='#191970',edgecolor='black',linewidth=2)\np2 = plt.bar(allARIData['ARI Special Play'],allARIData['2019'], bottom = allARIData['2020'], color='#FFD700',edgecolor='black',linewidth=2)\np3 = plt.bar(allARIData['ARI Special Play'],allARIData['2018'], bottom = allARIData['2020'] + allARIData['2019'] , color='#97233f',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"ARI Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allATLData['ATL Special Play'],allATLData['2020'], color='#a5acaf',edgecolor='black',linewidth=2)\np2 = plt.bar(allATLData['ATL Special Play'],allATLData['2019'], bottom = allATLData['2020'], color='black',edgecolor='black',linewidth=2)\np3 = plt.bar(allATLData['ATL Special Play'],allATLData['2018'], bottom = allATLData['2020'] + allATLData['2019'] , color='#a71930',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"ATL Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allBALData['BAL Special Play'],allBALData['2020'], color='#241773',edgecolor='black',linewidth=2)\np2 = plt.bar(allBALData['BAL Special Play'],allBALData['2019'], bottom = allBALData['2020'], color='white',edgecolor='black',linewidth=2)\np3 = plt.bar(allBALData['BAL Special Play'],allBALData['2018'], bottom = allBALData['2020'] + allBALData['2019'] , color='#9e7c0c',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"BAL Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allBUFData['BUF Special Play'],allBUFData['2020'], color='#00338d',edgecolor='black',linewidth=2)\np2 = plt.bar(allBUFData['BUF Special Play'],allBUFData['2019'], bottom = allBUFData['2020'], color='#c60c30',edgecolor='black',linewidth=2)\np3 = plt.bar(allBUFData['BUF Special Play'],allBUFData['2018'], bottom = allBUFData['2020'] + allBUFData['2019'] , color='#00274d',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"BUF Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allCARData['CAR Special Play'],allCARData['2020'], color='#0085ca',edgecolor='black',linewidth=2)\np2 = plt.bar(allCARData['CAR Special Play'],allCARData['2019'], bottom = allCARData['2020'], color='black',edgecolor='black',linewidth=2)\np3 = plt.bar(allCARData['CAR Special Play'],allCARData['2018'], bottom = allCARData['2020'] + allCARData['2019'] , color='#bfc0bf',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"CAR Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allCHIData['CHI Special Play'],allCHIData['2020'], color='#c83803',edgecolor='black',linewidth=2)\np2 = plt.bar(allCHIData['CHI Special Play'],allCHIData['2019'], bottom = allCHIData['2020'], color='#191970',edgecolor='black',linewidth=2)\np3 = plt.bar(allCHIData['CHI Special Play'],allCHIData['2018'], bottom = allCHIData['2020'] + allCHIData['2019'] , color='#a71930',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"CHI Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allCINData['CIN Special Play'],allCINData['2020'], color='#fb4f14',edgecolor='black',linewidth=2)\np2 = plt.bar(allCINData['CIN Special Play'],allCINData['2019'], bottom = allCINData['2020'], color='white',edgecolor='black',linewidth=2)\np3 = plt.bar(allCINData['CIN Special Play'],allCINData['2018'], bottom = allCINData['2020'] + allCINData['2019'] , color='#97233f',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"CIN Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allCLEData['CLE Special Play'],allCLEData['2020'], color='#311d00',edgecolor='black',linewidth=2)\np2 = plt.bar(allCLEData['CLE Special Play'],allCLEData['2019'], bottom = allCLEData['2020'], color='white',edgecolor='black',linewidth=2)\np3 = plt.bar(allCLEData['CLE Special Play'],allCLEData['2018'], bottom = allCLEData['2020'] + allCLEData['2019'] , color='#ff3c00',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"CLE Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:19:36.968833Z","iopub.execute_input":"2022-01-07T01:19:36.96913Z","iopub.status.idle":"2022-01-07T01:19:43.603675Z","shell.execute_reply.started":"2022-01-07T01:19:36.969086Z","shell.execute_reply":"2022-01-07T01:19:43.602951Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"8\"></a> <br>\n# EDA for Special Plays Part - 2","metadata":{}},{"cell_type":"code","source":"x = 0\ny = 0\ncolors2018 = sns.color_palette('pastel')\ncolors2019 = sns.color_palette('Set2')\ncolors2020 = sns.color_palette('Set3')\nfig, axes = plt.subplots(8, 3, figsize=(200, 380))\naxes[0,0].pie(DAL2018Values, labels=DAL2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in DAL2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[0,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[0,0].set_title(\"DAL Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[0,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\", ha=\"center\")\naxes[0,1].pie(DAL2019Values, labels=DAL2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in DAL2019Labels], shadow=True, startangle=130,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[0,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[0,1].set_title(\"DAL Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[0,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[0,2].pie(DAL2020Values, labels=DAL2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in DAL2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[0,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[0,2].set_title(\"DAL Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[0,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[1,0].pie(DEN2018Values, labels=DEN2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in DEN2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[1,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[1,0].set_title(\"DEN Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[1,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[1,1].pie(DEN2019Values, labels=DEN2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in DEN2019Labels], shadow=True, startangle=110,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[1,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[1,1].set_title(\"DEN Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[1,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[1,2].pie(DEN2020Values, labels=DEN2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in DEN2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[1,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[1,2].set_title(\"DEN Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[1,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[2,0].pie(DET2018Values, labels=DET2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in DET2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[2,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[2,0].set_title(\"DET Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[2,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[2,1].pie(DET2019Values, labels=DET2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in DET2019Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[2,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[2,1].set_title(\"DET Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[2,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[2,2].pie(DET2020Values, labels=DET2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in DET2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[2,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[2,2].set_title(\"DET Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[2,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[3,0].pie(GB2018Values, labels=GB2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in GB2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[3,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[3,0].set_title(\"GB Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[3,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[3,1].pie(GB2019Values, labels=GB2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in GB2019Labels], shadow=True, startangle=130,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[3,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[3,1].set_title(\"GB Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[3,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[3,2].pie(GB2020Values, labels=GB2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in GB2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[3,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[3,2].set_title(\"GB Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[3,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[4,0].pie(HOU2018Values, labels=HOU2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in HOU2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[4,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[4,0].set_title(\"HOU Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[4,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[4,1].pie(HOU2019Values, labels=HOU2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in HOU2019Labels], shadow=True, startangle=130,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[4,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[4,1].set_title(\"HOU Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[4,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[4,2].pie(HOU2020Values, labels=HOU2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in HOU2020Labels], shadow=True, startangle=130,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[4,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[4,2].set_title(\"HOU Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[4,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\", ha=\"center\")\n\naxes[5,0].pie(IND2018Values, labels=IND2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in IND2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[5,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[5,0].set_title(\"IND Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[5,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[5,1].pie(IND2019Values, labels=IND2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in TB2019Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[5,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[5,1].set_title(\"IND Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[5,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[5,2].pie(IND2020Values, labels=IND2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in IND2020Labels], shadow=True, startangle=110,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[5,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[5,2].set_title(\"IND Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[5,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[6,0].pie(JAX2018Values, labels=JAX2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in JAX2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[6,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[6,0].set_title(\"JAX Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[6,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[6,1].pie(JAX2019Values, labels=JAX2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in JAX2019Labels], shadow=True, startangle=110,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[6,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[6,1].set_title(\"JAX Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[6,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[6,2].pie(JAX2020Values, labels=JAX2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in JAX2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[6,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[6,2].set_title(\"JAX Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[6,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[7,0].pie(KC2018Values, labels=KC2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in KC2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[7,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[7,0].set_title(\"KC Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[7,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[7,1].pie(KC2019Values, labels=KC2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in KC2019Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[7,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[7,1].set_title(\"KC Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[7,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=120,va=\"center\",  ha=\"center\")\naxes[7,2].pie(KC2020Values, labels=KC2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in KC2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[7,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[7,2].set_title(\"KC Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[7,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110, va=\"center\", ha=\"center\")\nfig.suptitle(\"NFL Special Teams Play Analysis (2018-20) Part-II\", y=1, fontweight=\"bold\", fontsize=200)\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:19:43.605401Z","iopub.execute_input":"2022-01-07T01:19:43.6057Z","iopub.status.idle":"2022-01-07T01:20:22.019872Z","shell.execute_reply.started":"2022-01-07T01:19:43.605663Z","shell.execute_reply":"2022-01-07T01:20:22.019018Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**<p id='9'><li>Statistics for Special Plays 2018 - 2020</li></p>**","metadata":{}},{"cell_type":"code","source":"plt.figure(figsize=(20, 12))\np1 = plt.bar(allDALData['DAL Special Play'],allDALData['2020'], color='#869397',edgecolor='black',linewidth=2)\np2 = plt.bar(allDALData['DAL Special Play'],allDALData['2019'], bottom = allDALData['2020'], color='white',edgecolor='black',linewidth=2)\np3 = plt.bar(allDALData['DAL Special Play'],allDALData['2018'], bottom = allDALData['2020'] + allDALData['2019'] , color='#00338d',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"DAL Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allDENData['DEN Special Play'],allDENData['2020'], color='#fb4f14',edgecolor='black',linewidth=2)\np2 = plt.bar(allDENData['DEN Special Play'],allDENData['2019'], bottom = allDENData['2020'], color='white',edgecolor='black',linewidth=2)\np3 = plt.bar(allDENData['DEN Special Play'],allDENData['2018'], bottom = allDENData['2020'] + allDENData['2019'] , color='#002244',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"DEN Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allDETData['DET Special Play'],allDETData['2020'], color='#0076b6',edgecolor='black',linewidth=2)\np2 = plt.bar(allDETData['DET Special Play'],allDETData['2019'], bottom = allDETData['2020'], color='white',edgecolor='black',linewidth=2)\np3 = plt.bar(allDETData['DET Special Play'],allDETData['2018'], bottom = allDETData['2020'] + allDETData['2019'] , color='#b0b7bc',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"DET Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allGBData['GB Special Play'],allGBData['2020'], color='#203731',edgecolor='black',linewidth=2)\np2 = plt.bar(allGBData['GB Special Play'],allGBData['2019'], bottom = allGBData['2020'], color='#ffb612',edgecolor='black',linewidth=2)\np3 = plt.bar(allGBData['GB Special Play'],allGBData['2018'], bottom = allGBData['2020'] + allGBData['2019'] , color='white',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"GB Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allHOUData['HOU Special Play'],allHOUData['2020'], color='#03202f',edgecolor='black',linewidth=2)\np2 = plt.bar(allHOUData['HOU Special Play'],allHOUData['2019'], bottom = allHOUData['2020'], color='white',edgecolor='black',linewidth=2)\np3 = plt.bar(allHOUData['HOU Special Play'],allHOUData['2018'], bottom = allHOUData['2020'] + allHOUData['2019'] , color='#a71930',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"HOU Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allINDData['IND Special Play'],allINDData['2020'], color='white',edgecolor='black',linewidth=2)\np2 = plt.bar(allINDData['IND Special Play'],allINDData['2019'], bottom = allINDData['2020'], color='#002c5f',edgecolor='black',linewidth=2)\np3 = plt.bar(allINDData['IND Special Play'],allINDData['2018'], bottom = allINDData['2020'] + allINDData['2019'] , color='#a5acaf',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"IND Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allJAXData['JAX Special Play'],allJAXData['2020'], color='#006778',edgecolor='black',linewidth=2)\np2 = plt.bar(allJAXData['JAX Special Play'],allJAXData['2019'], bottom = allJAXData['2020'], color='#9f792c',edgecolor='black',linewidth=2)\np3 = plt.bar(allJAXData['JAX Special Play'],allJAXData['2018'], bottom = allJAXData['2020'] + allJAXData['2019'] , color='white',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"JAX Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allKCData['KC Special Play'],allKCData['2020'], color='#e31837',edgecolor='black',linewidth=2)\np2 = plt.bar(allKCData['KC Special Play'],allKCData['2019'], bottom = allKCData['2020'], color='white',edgecolor='black',linewidth=2)\np3 = plt.bar(allKCData['KC Special Play'],allKCData['2018'], bottom = allKCData['2020'] + allKCData['2019'] , color='#ffb612',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"KC Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\", rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:20:22.021401Z","iopub.execute_input":"2022-01-07T01:20:22.021861Z","iopub.status.idle":"2022-01-07T01:20:27.958678Z","shell.execute_reply.started":"2022-01-07T01:20:22.021805Z","shell.execute_reply":"2022-01-07T01:20:27.958017Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"10\"></a> <br>\n# EDA for Special Plays Part - 3","metadata":{}},{"cell_type":"code","source":"x = 0\ny = 0\ncolors2018 = sns.color_palette('pastel')\ncolors2019 = sns.color_palette('Set2')\ncolors2020 = sns.color_palette('Set3')\nfig, axes = plt.subplots(8, 3, figsize=(200, 380))\naxes[0,0].pie(LA2018Values, labels=LA2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in LA2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[0,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[0,0].set_title(\"LA Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[0,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\", ha=\"center\")\naxes[0,1].pie(LA2019Values, labels=LA2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in LA2019Labels], shadow=True, startangle=130,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[0,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[0,1].set_title(\"LA Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[0,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[0,2].pie(LA2020Values, labels=LA2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in LA2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[0,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[0,2].set_title(\"LA Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[0,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[1,0].pie(LAC2018Values, labels=LAC2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in LAC2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[1,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[1,0].set_title(\"LAC Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[1,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[1,1].pie(LAC2019Values, labels=LAC2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in LAC2019Labels], shadow=True, startangle=110,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[1,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[1,1].set_title(\"LAC Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[1,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[1,2].pie(LAC2020Values, labels=LAC2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in LAC2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[1,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[1,2].set_title(\"LAC Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[1,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[2,0].pie(MIA2018Values, labels=MIA2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in MIA2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[2,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[2,0].set_title(\"MIA Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[2,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[2,1].pie(MIA2019Values, labels=MIA2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in MIA2019Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[2,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[2,1].set_title(\"MIA Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[2,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[2,2].pie(MIA2020Values, labels=MIA2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in MIA2020Labels], shadow=True, startangle=110,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[2,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[2,2].set_title(\"MIA Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[2,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[3,0].pie(MIN2018Values, labels=MIN2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in MIN2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[3,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[3,0].set_title(\"MIN Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[3,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[3,1].pie(MIN2019Values, labels=MIN2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in MIN2019Labels], shadow=True, startangle=130,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[3,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[3,1].set_title(\"MIN Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[3,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[3,2].pie(MIN2020Values, labels=MIN2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in MIN2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[3,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[3,2].set_title(\"MIN Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[3,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[4,0].pie(NE2018Values, labels=NE2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in NE2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[4,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[4,0].set_title(\"NE Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[4,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[4,1].pie(NE2019Values, labels=NE2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in NE2019Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[4,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[4,1].set_title(\"NE Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[4,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[4,2].pie(NE2020Values, labels=NE2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in NE2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[4,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[4,2].set_title(\"NE Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[4,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\", ha=\"center\")\n\naxes[5,0].pie(NO2018Values, labels=NO2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in NO2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[5,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[5,0].set_title(\"NO Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[5,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[5,1].pie(NO2019Values, labels=NO2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in NO2019Labels], shadow=True, startangle=110,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[5,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[5,1].set_title(\"NO Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[5,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[5,2].pie(NO2020Values, labels=NO2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in NO2020Labels], shadow=True, startangle=130,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[5,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[5,2].set_title(\"NO Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[5,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[6,0].pie(NYG2018Values, labels=NYG2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in NYG2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[6,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[6,0].set_title(\"NYG Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[6,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[6,1].pie(NYG2019Values, labels=NYG2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in NYG2019Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[6,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[6,1].set_title(\"NYG Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[6,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[6,2].pie(NYG2020Values, labels=NYG2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in NYG2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[6,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[6,2].set_title(\"NYG Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[6,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[7,0].pie(NYJ2018Values, labels=NYJ2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in NYJ2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[7,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[7,0].set_title(\"NYJ Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[7,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[7,1].pie(NYJ2019Values, labels=NYJ2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in NYJ2019Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[7,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[7,1].set_title(\"NYJ Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[7,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[7,2].pie(NYJ2020Values, labels=NYJ2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in NYJ2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[7,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[7,2].set_title(\"NYJ Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[7,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110, va=\"center\", ha=\"center\")\nfig.suptitle(\"NFL Special Teams Play Analysis (2018-20) Part-III\", y=1, fontweight=\"bold\", fontsize=200)\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:20:27.960338Z","iopub.execute_input":"2022-01-07T01:20:27.9608Z","iopub.status.idle":"2022-01-07T01:21:05.337968Z","shell.execute_reply.started":"2022-01-07T01:20:27.960765Z","shell.execute_reply":"2022-01-07T01:21:05.337123Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**<p id='11'><li>Statistics for Special Plays 2018 - 2020</li></p>**","metadata":{}},{"cell_type":"code","source":"plt.figure(figsize=(20, 12))\np1 = plt.bar(allLAData['LA Special Play'],allLAData['2020'], color='#b3995d',edgecolor='black',linewidth=2)\np2 = plt.bar(allLAData['LA Special Play'],allLAData['2019'], bottom = allLAData['2020'], color='#002244',edgecolor='black',linewidth=2)\np3 = plt.bar(allLAData['LA Special Play'],allLAData['2018'], bottom = allLAData['2020'] + allLAData['2019'] , color='white',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"LA Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allLACData['LAC Special Play'],allLACData['2020'], color='#0073cf',edgecolor='black',linewidth=2)\np2 = plt.bar(allLACData['LAC Special Play'],allLACData['2019'], bottom = allLACData['2020'], color='#ffb612',edgecolor='black',linewidth=2)\np3 = plt.bar(allLACData['LAC Special Play'],allLACData['2018'], bottom = allLACData['2020'] + allLACData['2019'] , color='#002244',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"LAC Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allMIAData['MIA Special Play'],allMIAData['2020'], color='#008e97',edgecolor='black',linewidth=2)\np2 = plt.bar(allMIAData['MIA Special Play'],allMIAData['2019'], bottom = allMIAData['2020'], color='#f26a24',edgecolor='black',linewidth=2)\np3 = plt.bar(allMIAData['MIA Special Play'],allMIAData['2018'], bottom = allMIAData['2020'] + allMIAData['2019'] , color='#005778',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"MIA Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allMINData['MIN Special Play'],allMINData['2020'], color='#4f2683',edgecolor='black',linewidth=2)\np2 = plt.bar(allMINData['MIN Special Play'],allMINData['2019'], bottom = allMINData['2020'], color='white',edgecolor='black',linewidth=2)\np3 = plt.bar(allMINData['MIN Special Play'],allMINData['2018'], bottom = allMINData['2020'] + allMINData['2019'] , color='#ffc62f',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"MIN Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allNEData['NE Special Play'],allNEData['2020'], color='#002244',edgecolor='black',linewidth=2)\np2 = plt.bar(allNEData['NE Special Play'],allNEData['2019'], bottom = allNEData['2020'], color='#c60c30',edgecolor='black',linewidth=2)\np3 = plt.bar(allNEData['NE Special Play'],allNEData['2018'], bottom = allNEData['2020'] + allNEData['2019'] , color='#b0b7bc',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"NE Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allNOData['NO Special Play'],allNOData['2020'], color='#000000',edgecolor='black',linewidth=2)\np2 = plt.bar(allNOData['NO Special Play'],allNOData['2019'], bottom = allNOData['2020'], color='#d3bc8d',edgecolor='black',linewidth=2)\np3 = plt.bar(allNOData['NO Special Play'],allNOData['2018'], bottom = allNOData['2020'] + allNOData['2019'] , color='white',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"NO Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allNYGData['NYG Special Play'],allNYGData['2020'], color='#a5acaf',edgecolor='black',linewidth=2)\np2 = plt.bar(allNYGData['NYG Special Play'],allNYGData['2019'], bottom = allNYGData['2020'], color='#a71930',edgecolor='black',linewidth=2)\np3 = plt.bar(allNYGData['NYG Special Play'],allNYGData['2018'], bottom = allNYGData['2020'] + allNYGData['2019'] , color='#0b2265',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"NYG Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allNYJData['NYJ Special Play'],allNYJData['2020'], color='white',edgecolor='black',linewidth=2)\np2 = plt.bar(allNYJData['NYJ Special Play'],allNYJData['2019'], bottom = allNYJData['2020'], color='#003f2d',edgecolor='black',linewidth=2)\np3 = plt.bar(allNYJData['NYJ Special Play'],allNYJData['2018'], bottom = allNYJData['2020'] + allNYJData['2019'] , color='green',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"NYJ Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:21:05.339625Z","iopub.execute_input":"2022-01-07T01:21:05.340046Z","iopub.status.idle":"2022-01-07T01:21:11.221478Z","shell.execute_reply.started":"2022-01-07T01:21:05.340005Z","shell.execute_reply":"2022-01-07T01:21:11.220799Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"12\"></a> <br>\n# EDA for Special Plays Part - 4","metadata":{}},{"cell_type":"code","source":"x = 0\ny = 0\ncolors2018 = sns.color_palette('pastel')\ncolors2019 = sns.color_palette('Set2')\ncolors2020 = sns.color_palette('Set3')\nfig, axes = plt.subplots(8, 3, figsize=(200, 380))\naxes[0,0].pie(OAK2018Values, labels=OAK2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in OAK2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[0,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[0,0].set_title(\"OAK Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[0,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\", ha=\"center\")\naxes[0,1].pie(OAK2019Values, labels=OAK2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in OAK2019Labels], shadow=True, startangle=130,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[0,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[0,1].set_title(\"OAK Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[0,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[0,2].pie(OAK2020Values, labels=OAK2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in OAK2020Labels], shadow=True, startangle=110,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[0,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[0,2].set_title(\"OAK/LV: Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[0,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[1,0].pie(PHI2018Values, labels=PHI2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in PHI2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[1,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[1,0].set_title(\"PHI Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[1,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[1,1].pie(PHI2019Values, labels=PHI2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in PHI2019Labels], shadow=True, startangle=130,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[1,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[1,1].set_title(\"PHI Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[1,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[1,2].pie(PHI2020Values, labels=PHI2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in PHI2020Labels], shadow=True, startangle=130,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[1,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[1,2].set_title(\"PHI Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[1,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[2,0].pie(PIT2018Values, labels=PIT2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in PIT2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[2,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[2,0].set_title(\"PIT Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[2,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[2,1].pie(PIT2019Values, labels=PIT2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in PIT2019Labels], shadow=True, startangle=110,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[2,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[2,1].set_title(\"PIT Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[2,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[2,2].pie(PIT2020Values, labels=PIT2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in PIT2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[2,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[2,2].set_title(\"PIT Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[2,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[3,0].pie(SEA2018Values, labels=SEA2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in SEA2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[3,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[3,0].set_title(\"SEA Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[3,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[3,1].pie(SEA2019Values, labels=SEA2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in SEA2019Labels], shadow=True, startangle=130,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[3,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[3,1].set_title(\"SEA Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[3,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[3,2].pie(SEA2020Values, labels=SEA2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in SEA2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[3,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[3,2].set_title(\"SEA Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[3,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[4,0].pie(SF2018Values, labels=SF2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in SF2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[4,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[4,0].set_title(\"SF Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[4,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[4,1].pie(SF2019Values, labels=SF2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in SF2019Labels], shadow=True, startangle=130,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[4,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[4,1].set_title(\"SF Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[4,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[4,2].pie(SF2020Values, labels=SF2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in SF2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[4,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[4,2].set_title(\"SF Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[4,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\", ha=\"center\")\n\naxes[5,0].pie(TB2018Values, labels=TB2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in TB2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[5,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[5,0].set_title(\"TB Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[5,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[5,1].pie(TB2019Values, labels=TB2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in TB2019Labels], shadow=True, startangle=130,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[5,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[5,1].set_title(\"TB Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[5,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[5,2].pie(TB2020Values, labels=TB2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in TB2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[5,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[5,2].set_title(\"TB Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[5,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[6,0].pie(TEN2018Values, labels=TEN2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in TEN2018Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[6,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[6,0].set_title(\"TEN Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[6,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[6,1].pie(TEN2019Values, labels=TEN2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in TEN2019Labels], shadow=True, startangle=130,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[6,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[6,1].set_title(\"TEN Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[6,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[6,2].pie(TEN2020Values, labels=TEN2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in TEN2020Labels], shadow=True, startangle=120,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[6,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[6,2].set_title(\"TEN Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[6,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\n\naxes[7,0].pie(WAS2018Values, labels=WAS2018Labels, colors=colors2018, autopct='%.0f%%',\n            explode=[0.05 for i in WAS2018Labels], shadow=True, startangle=110,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[7,0].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[7,0].set_title(\"WAS Special Team Plays 2018\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[7,0].annotate(\"Season\\n2018\", xy=(x, y), fontweight=\"bold\", fontsize=110,va=\"center\",  ha=\"center\")\naxes[7,1].pie(WAS2019Values, labels=WAS2019Labels, colors=colors2019, autopct='%.0f%%',\n            explode=[0.05 for i in WAS2019Labels], shadow=True, startangle=110,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[7,1].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[7,1].set_title(\"WAS Special Team Plays 2019\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[7,1].annotate(\"Season\\n2019\", xy=(x, y), fontweight=\"bold\", fontsize=120,va=\"center\",  ha=\"center\")\naxes[7,2].pie(WAS2020Values, labels=WAS2020Labels, colors=colors2020, autopct='%.0f%%',\n            explode=[0.05 for i in WAS2020Labels], shadow=True, startangle=110,\n            textprops={'fontweight': 'semibold', 'fontsize': 80}, wedgeprops={'linewidth': 12, 'edgecolor': 'k'},\n            labeldistance=1.1)\naxes[7,2].add_artist(plt.Circle((0, 0), 0.35, fc='#E4E6EB', ec='black', lw=12))\naxes[7,2].set_title(\"WAS Special Team Plays 2020\", fontweight=\"bold\", fontsize=110, pad=21)\naxes[7,2].annotate(\"Season\\n2020\", xy=(x, y), fontweight=\"bold\", fontsize=110, va=\"center\", ha=\"center\")\nfig.suptitle(\"NFL Special Teams Play Analysis (2018-20) Part-IV\", y=1, fontweight=\"bold\", fontsize=200)\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:21:11.223188Z","iopub.execute_input":"2022-01-07T01:21:11.223639Z","iopub.status.idle":"2022-01-07T01:21:49.588137Z","shell.execute_reply.started":"2022-01-07T01:21:11.223604Z","shell.execute_reply":"2022-01-07T01:21:49.576145Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**<p id='13'><li>Statistics for Special Plays 2018 - 2020</li></p>**","metadata":{}},{"cell_type":"code","source":"plt.figure(figsize=(20, 12))\np1 = plt.bar(allOAKData['OAK Special Play'],allOAKData['2020'], color='#a5acaf',edgecolor='black',linewidth=2)\np2 = plt.bar(allOAKData['OAK Special Play'],allOAKData['2019'], bottom = allOAKData['2020'], color='black',edgecolor='black',linewidth=2)\np3 = plt.bar(allOAKData['OAK Special Play'],allOAKData['2018'], bottom = allOAKData['2020'] + allOAKData['2019'] , color='white',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n             bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"OAK / LV Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allPHIData['PHI Special Play'],allPHIData['2020'], color='#a5acaf',edgecolor='black',linewidth=2)\np2 = plt.bar(allPHIData['PHI Special Play'],allPHIData['2019'], bottom = allPHIData['2020'], color='white',edgecolor='black',linewidth=2)\np3 = plt.bar(allPHIData['PHI Special Play'],allPHIData['2018'], bottom = allPHIData['2020'] + allPHIData['2019'] , color='#004c54',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"PHI Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allPITData['PIT Special Play'],allPITData['2020'], color='#c60c30',edgecolor='black',linewidth=2)\np2 = plt.bar(allPITData['PIT Special Play'],allPITData['2019'], bottom = allPITData['2020'], color='#ffb612',edgecolor='black',linewidth=2)\np3 = plt.bar(allPITData['PIT Special Play'],allPITData['2018'], bottom = allPITData['2020'] + allPITData['2019'] , color='#00539b',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"PIT Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allSEAData['SEA Special Play'],allSEAData['2020'], color='#69be28',edgecolor='black',linewidth=2)\np2 = plt.bar(allSEAData['SEA Special Play'],allSEAData['2019'], bottom = allSEAData['2020'], color='#a5acaf',edgecolor='black',linewidth=2)\np3 = plt.bar(allSEAData['SEA Special Play'],allSEAData['2018'], bottom = allSEAData['2020'] + allSEAData['2019'] , color='#002244',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"SEA Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allSFData['SF Special Play'],allSFData['2020'], color='#b3995d',edgecolor='black',linewidth=2)\np2 = plt.bar(allSFData['SF Special Play'],allSFData['2019'], bottom = allSFData['2020'], color='white',edgecolor='black',linewidth=2)\np3 = plt.bar(allSFData['SF Special Play'],allSFData['2018'], bottom = allSFData['2020'] + allSFData['2019'] , color='#aa0000',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"SF Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allTBData['TB Special Play'],allTBData['2020'], color='#ff7900',edgecolor='black',linewidth=2)\np2 = plt.bar(allTBData['TB Special Play'],allTBData['2019'], bottom = allTBData['2020'], color='#34302b',edgecolor='black',linewidth=2)\np3 = plt.bar(allTBData['TB Special Play'],allTBData['2018'], bottom = allTBData['2020'] + allTBData['2019'] , color='#d50a0a',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2., h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"TB Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allTENData['TEN Special Play'],allTENData['2020'], color='#c60c30',edgecolor='black',linewidth=2)\np2 = plt.bar(allTENData['TEN Special Play'],allTENData['2019'], bottom = allTENData['2020'], color='#4b92db',edgecolor='black',linewidth=2)\np3 = plt.bar(allTENData['TEN Special Play'],allTENData['2018'], bottom = allTENData['2020'] + allTENData['2019'] , color='#a5acaf',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x()+r1.get_width()/2, h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n            bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"TEN Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()\n\nplt.figure(figsize=(20, 12))\np1 = plt.bar(allWASData['WAS Special Play'],allWASData['2020'], color='#773141',edgecolor='black',linewidth=2)\np2 = plt.bar(allWASData['WAS Special Play'],allWASData['2019'], bottom = allWASData['2020'], color='white',edgecolor='black',linewidth=2)\np3 = plt.bar(allWASData['WAS Special Play'],allWASData['2018'], bottom = allWASData['2020'] + allWASData['2019'] , color='#ffb612',edgecolor='black',linewidth=2)\n\nfor r1,r2,r3 in zip(p1,p2,p3):\n    h1 = r1.get_height()\n    h2 = r2.get_height()\n    h3 = r3.get_height()\n    plt.text(r1.get_x() + r1.get_width()/2, h1+h2+h3 + 2, '%s'% (h1+h2+h3), ha = 'center', va='bottom',color='black', size=15,\n             bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=1))\nplt.legend([\"2020\", \"2019\", \"2018\"],prop={'size': 15})\nplt.title(\"WAS Special Team Plays\", fontweight=\"bold\", fontsize=25, pad=21)\nplt.xticks(fontsize=14,fontweight=\"bold\",rotation=90)\nplt.yticks(fontsize=14,fontweight=\"bold\")\nplt.tight_layout(pad=1, w_pad=1, h_pad=1)\nplt.grid(False)\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:21:49.5921Z","iopub.execute_input":"2022-01-07T01:21:49.59478Z","iopub.status.idle":"2022-01-07T01:21:56.034193Z","shell.execute_reply.started":"2022-01-07T01:21:49.594705Z","shell.execute_reply":"2022-01-07T01:21:56.033492Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"14\"></a> <br>\n# Task 2-3\n\n* **Make a plan for special teams that can be quantified. Coaches of special teams are among the league's most imaginative and ingenious. Compare and contrast the game plans of each squad. What are the most effective strategies? What additional tactics are there that might be used?**","metadata":{}},{"cell_type":"markdown","source":"<a id=\"15\"></a> <br>\n# Special Team Plays Ranking EDA\n\n**<p id='15'><li>Special Team Play Ranking Data Preparation</li></p>**","metadata":{}},{"cell_type":"code","source":"# Kickoffs\nkickoffData['Team'] = kickoffData['Team'].str.replace('OAK','LV')\nkickoffData['Player-Name'] = kickoffData['Player Name'].map(str) + \", \" + kickoffData['Team'].map(str)\nkickoffsSeries = kickoffData.groupby(['Season','Team','Player Name','TB Accuracy %','Kickoff TB','Kickoff RT','Kickoff OTB','Kickoff OSK',\n                             'Kickoff TD'], \n                             as_index=True).size()  \nkickoffFrame = pd.DataFrame(kickoffsSeries)\nkickoff2018 = kickoffData[(kickoffData.Season == 2018)]\nkickoff2019 = kickoffData[(kickoffData.Season == 2019)]\nkickoff2020 = kickoffData[(kickoffData.Season == 2020)]\nsortedKickoff2018 = kickoff2018.sort_values(by=['TB Accuracy %'], ascending=False)\nsortedKickoff2019 = kickoff2019.sort_values(by=['TB Accuracy %'], ascending=False)\nsortedKickoff2020 = kickoff2020.sort_values(by=['TB Accuracy %'], ascending=False)\n\n\n# Field Goals\nfieldGoalData['Team'] = fieldGoalData['Team'].str.replace('OAK','LV')\nfieldGoalData['Player-Name'] = fieldGoalData['Player Name'].map(str) + \", \" + fieldGoalData['Team'].map(str)\nfieldGoalsSeries = fieldGoalData.groupby(['Season','Team','Player Name','FG Attempts','FG Accuracy %','FG Made','FG Missed','FG Blocked','1-19 yds: FGM/FGA',\n                             '20-29 yds: FGM/FGA','30-39 yds: FGM/FGA','40-49 yds: FGM/FGA'], \n                             as_index=True).size()  \nfieldGoalsFrame = pd.DataFrame(fieldGoalsSeries)\nfieldGoalData2018 = fieldGoalData[(fieldGoalData.Season == 2018)]\nfieldGoalData2019 = fieldGoalData[(fieldGoalData.Season == 2019)]\nfieldGoalData2020 = fieldGoalData[(fieldGoalData.Season == 2020)]\npd.options.display.max_rows = 99999999","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:21:56.038009Z","iopub.execute_input":"2022-01-07T01:21:56.038233Z","iopub.status.idle":"2022-01-07T01:21:56.076161Z","shell.execute_reply.started":"2022-01-07T01:21:56.038209Z","shell.execute_reply":"2022-01-07T01:21:56.075425Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**<p id='16'><li>Player-by-player kickoff analysis of 32 NFL teams by season, Touchbacks, Return, and Much more</li></p>**","metadata":{}},{"cell_type":"code","source":"kickoffFrame","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:21:56.077805Z","iopub.execute_input":"2022-01-07T01:21:56.078321Z","iopub.status.idle":"2022-01-07T01:21:56.155869Z","shell.execute_reply.started":"2022-01-07T01:21:56.078282Z","shell.execute_reply":"2022-01-07T01:21:56.155122Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**<p id='17'><li>Players Kickoff Touchback Accuracy 2018</li></p>**","metadata":{}},{"cell_type":"code","source":"plt.rcParams['figure.dpi'] = 600\n\nfig = plt.figure(figsize=(10,35), facecolor='#f6f5f5')\ngs = fig.add_gridspec(1, 1)\ngs.update(wspace=1, hspace=0.05)\n\nbackground_color = \"#f6f5f5\"\nsns.set_palette(['#B891E3']*1200)\naxes = fig.add_subplot()\n\n\nfor s in [\"right\", \"top\"]:\n    axes.spines[s].set_visible(False)\n    \naxes.set_facecolor(background_color)\naxes.spines['left'].set_color('black')\naxes.spines['bottom'].set_color('black')\n\naxes_sns = sns.barplot(data=sortedKickoff2018,x=sortedKickoff2018['TB Accuracy %'],y=sortedKickoff2018['Player-Name'],zorder=2, ec='black')\n\naxes_sns.grid(which='major', axis='x', zorder=0, color='#EEEEEE', linewidth=0.4)\naxes_sns.grid(which='major', axis='y', zorder=0, color='#EEEEEE', linewidth=0.4)\n\nfor p in axes_sns.patches:\n            value = f'{p.get_width():.0f}%'\n            x = p.get_x() + p.get_width() + 2\n            y = p.get_y() + p.get_height() / 2 \n            axes.text(x, y, value, ha='left', va='center', fontsize=10, \n                    bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=0.3))\n            \n\nXstart, Xend = axes.get_xlim()\nYstart, Yend = axes.get_ylim()\naxes_sns.text(85,-1.6, f'Kickoff Touchbacks', fontsize=27, weight='bold',ha='right')\naxes.text(85,-1,f'Players Kickoff Touchback Accuracy 2018',fontsize=13,ha='right')\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:21:56.157103Z","iopub.execute_input":"2022-01-07T01:21:56.157432Z","iopub.status.idle":"2022-01-07T01:22:03.293632Z","shell.execute_reply.started":"2022-01-07T01:21:56.157395Z","shell.execute_reply":"2022-01-07T01:22:03.291238Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**<p id='18'><li>Players Kickoff Touchback Accuracy 2019</li></p>**","metadata":{}},{"cell_type":"code","source":"plt.rcParams['figure.dpi'] = 600\n\nfig = plt.figure(figsize=(10,35), facecolor='#f6f5f5')\ngs = fig.add_gridspec(1, 1)\ngs.update(wspace=1, hspace=0.05)\n\nbackground_color = \"#f6f5f5\"\nsns.set_palette(['#FAD0C9FF']*1200)\naxes = fig.add_subplot()\n\n\nfor s in [\"right\", \"top\"]:\n    axes.spines[s].set_visible(False)\n    \naxes.set_facecolor(background_color)\naxes.spines['left'].set_color('black')\naxes.spines['bottom'].set_color('black')\n\naxes_sns = sns.barplot(data=sortedKickoff2019,x=sortedKickoff2019['TB Accuracy %'],y=sortedKickoff2019['Player-Name'],zorder=2, ec='black')\n\naxes_sns.grid(which='major', axis='x', zorder=0, color='#EEEEEE', linewidth=0.4)\naxes_sns.grid(which='major', axis='y', zorder=0, color='#EEEEEE', linewidth=0.4)\n\nfor p in axes_sns.patches:\n            value = f'{p.get_width():.0f}%'\n            x = p.get_x() + p.get_width() + 2\n            y = p.get_y() + p.get_height() / 2 \n            axes.text(x, y, value, ha='left', va='center', fontsize=10, \n                    bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=0.3))\n            \n\nXstart, Xend = axes.get_xlim()\nYstart, Yend = axes.get_ylim()\naxes_sns.text(100,-1.6, f'Kickoff Touchbacks', fontsize=27, weight='bold',ha='right')\naxes.text(100,-1,f'Players Kickoff Touchback Accuracy 2019',fontsize=13,ha='right')\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:22:03.295121Z","iopub.execute_input":"2022-01-07T01:22:03.295536Z","iopub.status.idle":"2022-01-07T01:22:09.928251Z","shell.execute_reply.started":"2022-01-07T01:22:03.295484Z","shell.execute_reply":"2022-01-07T01:22:09.927248Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**<p id='19'><li>Players Kickoff Touchback Accuracy 2020</li></p>**","metadata":{}},{"cell_type":"code","source":"plt.rcParams['figure.dpi'] = 600\n\nfig = plt.figure(figsize=(10,35), facecolor='#f6f5f5')\ngs = fig.add_gridspec(1, 1)\ngs.update(wspace=1, hspace=0.05)\n\nbackground_color = \"#f6f5f5\"\nsns.set_palette(['#A8D5BAFF']*1200)\naxes = fig.add_subplot()\n\n\nfor s in [\"right\", \"top\"]:\n    axes.spines[s].set_visible(False)\n    \naxes.set_facecolor(background_color)\naxes.spines['left'].set_color('black')\naxes.spines['bottom'].set_color('black')\n\naxes_sns = sns.barplot(data=sortedKickoff2020,x=sortedKickoff2020['TB Accuracy %'],y=sortedKickoff2020['Player-Name'],zorder=2, ec='black')\n\naxes_sns.grid(which='major', axis='x', zorder=0, color='#EEEEEE', linewidth=0.4)\naxes_sns.grid(which='major', axis='y', zorder=0, color='#EEEEEE', linewidth=0.4)\n\nfor p in axes_sns.patches:\n            value = f'{p.get_width():.0f}%'\n            x = p.get_x() + p.get_width() + 2\n            y = p.get_y() + p.get_height() / 2 \n            axes.text(x, y, value, ha='left', va='center', fontsize=10, \n                    bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=0.3))\n            \n\nXstart, Xend = axes.get_xlim()\nYstart, Yend = axes.get_ylim()\naxes_sns.text(100,-1.6, f'Kickoff Touchbacks', fontsize=27, weight='bold',ha='right')\naxes.text(100,-1,f'Players Kickoff Touchback Accuracy 2020',fontsize=13,ha='right')\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:22:09.929723Z","iopub.execute_input":"2022-01-07T01:22:09.929972Z","iopub.status.idle":"2022-01-07T01:22:17.071619Z","shell.execute_reply.started":"2022-01-07T01:22:09.929942Z","shell.execute_reply":"2022-01-07T01:22:17.07099Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"20\"></a> <br>\n# Field Goal Analysis\n\n**<p id='20'><li>Player-by-player field goal analysis of 32 NFL teams by season and yardage</li></p>**","metadata":{}},{"cell_type":"code","source":"fieldGoalsFrame","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:22:17.072951Z","iopub.execute_input":"2022-01-07T01:22:17.073388Z","iopub.status.idle":"2022-01-07T01:22:17.166914Z","shell.execute_reply.started":"2022-01-07T01:22:17.073353Z","shell.execute_reply":"2022-01-07T01:22:17.166008Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**<p id='21'><li>Players Stats for Field Goals 2018</li></p>**","metadata":{}},{"cell_type":"code","source":"fieldGoalData2018 = fieldGoalData2018.sort_index(ascending=False)\nplt.rcParams['figure.dpi'] = 600\n\nfig = plt.figure(figsize=(3.5,45), facecolor='#f6f5f5')\ngs = fig.add_gridspec(1, 1)\ngs.update(wspace=1.5, hspace=0.05)\n\nbackground_color = \"#f6f5f5\"\nsns.set_palette(['#F65058FF','#FBDE44FF','#3CB371'])\naxes = fig.add_subplot(gs[0, 0])\n\nfor s in [\"right\", \"top\"]:\n    axes.spines[s].set_visible(False)\n    \naxes.set_facecolor(background_color)\naxes.spines['left'].set_color('black')\naxes.spines['bottom'].set_color('black')\n\naxes_sns = fieldGoalData2018.plot(x='Player-Name',y=['FG Missed','FG Blocked','FG Made'],kind='barh',ax=axes,zorder=2,width=0.8,edgecolor ='black')\naxes_sns.set_xlabel('Field Goals Count',fontsize=4, weight='bold')\n\naxes_sns.grid(which='major', axis='x', zorder=0, color='#EEEEEE', linewidth=0.4)\naxes_sns.grid(which='major', axis='y', zorder=0, color='#EEEEEE', linewidth=0.4)\n\naxes_sns.tick_params(labelsize=6, width=0.5, length=1.5)\n\naxes_sns.legend(['FG Missed', 'FG Blocked','FG Made'], ncol=3, facecolor='#D8D8D8', edgecolor='None', fontsize=4, bbox_to_anchor=(1, 1.005), loc='upper right')\n\n\nfor p in axes_sns.patches:\n        value = f'{p.get_width():.0f}'\n        if value == '0':\n            pass\n        else:\n            x = p.get_x() + p.get_width() + .5\n            y = p.get_y() + p.get_height() / 2\n            axes.text(x, y, value, ha='left', va='center', fontsize=4,bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=0.1))\n\nXstart, Xend = axes.get_xlim()\nYstart, Yend = axes.get_ylim()\naxes_sns.text(Xend-1, Yend+0.71, f'Field Goals', fontsize=16, weight='bold',ha='right')\naxes.text(Xend-1, Yend+0.48,f'Field Goals Stats 2018',fontsize=10,ha='right')\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:22:17.168631Z","iopub.execute_input":"2022-01-07T01:22:17.169068Z","iopub.status.idle":"2022-01-07T01:22:21.67562Z","shell.execute_reply.started":"2022-01-07T01:22:17.169032Z","shell.execute_reply":"2022-01-07T01:22:21.673219Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**<p id='22'><li>Players Stats for Field Goals 2019</li></p>**","metadata":{}},{"cell_type":"code","source":"fieldGoalData2019 = fieldGoalData2019.sort_index(ascending=False)\nplt.rcParams['figure.dpi'] = 600\n\nfig = plt.figure(figsize=(3.5,45), facecolor='#f6f5f5')\ngs = fig.add_gridspec(1, 1)\ngs.update(wspace=1.5, hspace=0.05)\n\nbackground_color = \"#f6f5f5\"\nsns.set_palette(['#F65058FF','#FBDE44FF','#3CB371'])\naxes = fig.add_subplot(gs[0, 0])\n\nfor s in [\"right\", \"top\"]:\n    axes.spines[s].set_visible(False)\n    \naxes.set_facecolor(background_color)\naxes.spines['left'].set_color('black')\naxes.spines['bottom'].set_color('black')\n\naxes_sns = fieldGoalData2019.plot(x='Player-Name',y=['FG Missed','FG Blocked','FG Made'],kind='barh',ax=axes,zorder=2,width=0.8,edgecolor ='black')\naxes_sns.set_xlabel('Field Goals Count',fontsize=4, weight='bold')\naxes_sns.grid(which='major', axis='x', zorder=0, color='#EEEEEE', linewidth=0.4)\naxes_sns.grid(which='major', axis='y', zorder=0, color='#EEEEEE', linewidth=0.4)\n\naxes_sns.tick_params(labelsize=6, width=0.5, length=1.5)\n\naxes_sns.legend(['FG Missed', 'FG Blocked','FG Made'], ncol=3, facecolor='#D8D8D8', edgecolor='None', fontsize=4, bbox_to_anchor=(1, 1.005), loc='upper right')\n\n\nfor p in axes_sns.patches:\n        value = f'{p.get_width():.0f}'\n        if value == '0':\n            pass\n        else:\n            x = p.get_x() + p.get_width() + .5\n            y = p.get_y() + p.get_height() / 2\n            axes.text(x, y, value, ha='left', va='center', fontsize=4,bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=0.1))\n\nXstart, Xend = axes.get_xlim()\nYstart, Yend = axes.get_ylim()\naxes_sns.text(Xend-1, Yend+0.71, f'Field Goals', fontsize=16, weight='bold',ha='right')\naxes.text(Xend-1, Yend+0.48,f'Field Goals Stats 2019',fontsize=10,ha='right')\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:22:21.677133Z","iopub.execute_input":"2022-01-07T01:22:21.677568Z","iopub.status.idle":"2022-01-07T01:22:26.494068Z","shell.execute_reply.started":"2022-01-07T01:22:21.677533Z","shell.execute_reply":"2022-01-07T01:22:26.493222Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**<p id='23'><li>Players Stats for Field Goals 2020</li></p>**","metadata":{}},{"cell_type":"code","source":"fieldGoalData2020 = fieldGoalData2020.sort_index(ascending=False)\nplt.rcParams['figure.dpi'] = 600\n\nfig = plt.figure(figsize=(3.5,45), facecolor='#f6f5f5')\ngs = fig.add_gridspec(1, 1)\ngs.update(wspace=1.5, hspace=0.05)\n\nbackground_color = \"#f6f5f5\"\nsns.set_palette(['#F65058FF','#FBDE44FF','#3CB371'])\naxes = fig.add_subplot(gs[0, 0])\n\nfor s in [\"right\", \"top\"]:\n    axes.spines[s].set_visible(False)\n    \naxes.set_facecolor(background_color)\naxes.spines['left'].set_color('black')\naxes.spines['bottom'].set_color('black')\n\naxes_sns = fieldGoalData2020.plot(x='Player-Name',y=['FG Missed','FG Blocked','FG Made'],kind='barh',ax=axes,zorder=2,width=0.8,edgecolor ='black')\naxes_sns.set_xlabel('Field Goals Count',fontsize=4, weight='bold')\naxes_sns.grid(which='major', axis='x', zorder=0, color='#EEEEEE', linewidth=0.4)\naxes_sns.grid(which='major', axis='y', zorder=0, color='#EEEEEE', linewidth=0.4)\n\naxes_sns.tick_params(labelsize=6, width=0.5, length=1.5)\n\naxes_sns.legend(['FG Missed', 'FG Blocked','FG Made'], ncol=3, facecolor='#D8D8D8', edgecolor='None', fontsize=4, bbox_to_anchor=(1, 1.005), loc='upper right')\n\n\nfor p in axes_sns.patches:\n        value = f'{p.get_width():.0f}'\n        if value == '0':\n            pass\n        else:\n            x = p.get_x() + p.get_width() + .5\n            y = p.get_y() + p.get_height() / 2\n            axes.text(x, y, value, ha='left', va='center', fontsize=4,bbox=dict(facecolor='none', edgecolor='black', boxstyle='round', linewidth=0.1))\n\nXstart, Xend = axes.get_xlim()\nYstart, Yend = axes.get_ylim()\naxes_sns.text(Xend-1, Yend+0.71, f'Field Goals', fontsize=16, weight='bold',ha='right')\naxes.text(Xend-1, Yend+0.48,f'Field Goals Stats 2020',fontsize=10,ha='right')\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-01-07T01:22:26.495363Z","iopub.execute_input":"2022-01-07T01:22:26.495688Z","iopub.status.idle":"2022-01-07T01:22:30.772485Z","shell.execute_reply.started":"2022-01-07T01:22:26.495654Z","shell.execute_reply":"2022-01-07T01:22:30.771089Z"},"trusted":true},"execution_count":null,"outputs":[]}]}