{"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":"# <h1 style=\"font-family: Trebuchet MS; padding: 12px; font-size: 48px; color: #00008B; text-align: center; line-height: 1.25;\"><b>🏬🔧 Data Exploration,<span style=\"color: #00FF00\"> EDA & Feature Engineering 📉</span></b><br><span style=\"color: #FF00FF; font-size: 24px\">Big Data Derpy 2022</span></h1>\n<hr>","metadata":{}},{"cell_type":"markdown","source":"# <div style=\"font-family: Trebuchet MS; background-color: #2E8B57; color: #FFFFFF; padding: 12px; line-height: 1.5;\">Introduction 👋</div>\n<center>\n    <img src=\"https://25j3em2gunpt1kquh13xkftx-wpengine.netdna-ssl.com/wp-content/uploads/2022/04/kentucky-derby-2022-825x423.jpg\" alt=\"Mart\" width=\"80%\">\n</center>\n<br>","metadata":{}},{"cell_type":"markdown","source":"## <div style=\"font-family: Trebuchet MS; background-color: #2E8B57; color: #FFFFFF; padding: 12px; line-height: 1.5;\">Data Set Problems 🤔</div>\n<div style=\"font-family: Segoe UI; line-height: 2; color: #000000; text-align: justify\">\n    👉 The goal of this competition is to analyze horse racing tactics, drafting strategies, and path efficiency. You will develop a model using never-before-released coordinate data along with basic race information. <br>\n    👉 <mark>We’ll be apply our analysis skills to predict failure</mark> which allows to optimize in making decisions. <br> \n    👉 <mark><b>Data pre-processing and feature engineering will be performed to prepare  dataset</b></mark> \n</div>\n\n## <div style=\"font-family: Trebuchet MS; background-color: #2E8B57; color: #FFFFFF; padding: 12px; line-height: 1.5;\">Objectives of Notebook 📌</div>\n<div style=\"font-family: Segoe UI; line-height: 2; color: #000000; text-align: justify\">\n    👉 <b>This notebook aims to:</b>\n    <ul>\n        <li> Perform <mark><b>initial data exploration</b></mark>.</li>\n        <li> Perform <mark><b>data pre-processing</b></mark>.</li>\n        <li> Perform <mark><b>EDA</b></mark> and <mark><b>hypothesis testing (statistical and non-statistical)</b></mark> in cleaned data set.</li>\n        <li> Perform <mark><b>feature engineering (one-hot encoding, label encoding, and binning)</b></mark>.</li>\n    </ul>\n</div>","metadata":{}},{"cell_type":"markdown","source":"## <div style=\"font-family: Trebuchet MS; background-color: #2E8B57; color: #FFFFFF; padding: 12px; line-height: 1.5;\">Data Set Description 🧾</div>\n<div style=\"font-family: Segoe UI; line-height: 2; color: #000000; text-align: justify\">\n    👉 The dataset contains mainly three files:\n    <ul>\n        <li> <mark><b>nyra_start_table.csv</b></mark>  horse/jockey race data</li>\n        <li> <mark><b>nyra_race_table.csv</b></mark>racetrack race data</li>\n        <li> <mark><b>nyra_tracking_table.csv</b></mark>tracking data</li>  \n        <li> <mark><b>nyra_2019_complete.csv</b></mark>combined table of three above files</mark>\n    </ul><br>\n     \n","metadata":{}},{"cell_type":"markdown","source":"# <div style=\"font-family: Trebuchet MS; background-color: #2E8B57; color: #FFFFFF; padding: 12px; line-height: 1.5;\">Importing Libraries 📚</div>\n<div style=\"font-family: Segoe UI; line-height: 2; color: #000000; text-align: justify\">\n    👉 <b>Importing libraries</b> that will be used in this notebook.\n</div>","metadata":{}},{"cell_type":"code","source":"# Importing libraries\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 missingno as mso\nimport plotly.graph_objects as go\nimport plotly.offline as po\nfrom plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot\nimport plotly.express as px\nimport random\nimport plotly.figure_factory as ff\nfrom plotly.subplots import make_subplots\nfrom statsmodels.graphics.gofplots import qqplot","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:12:22.327703Z","iopub.execute_input":"2022-08-21T13:12:22.328564Z","iopub.status.idle":"2022-08-21T13:12:26.283241Z","shell.execute_reply.started":"2022-08-21T13:12:22.328458Z","shell.execute_reply":"2022-08-21T13:12:26.281792Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# <div style=\"font-family: Trebuchet MS; background-color: #2E8B57; color: #FFFFFF; padding: 12px; line-height: 1.5;\">Reading Dataset 👓</div>\n<div style=\"font-family: Segoe UI; line-height: 2; color: #000000; text-align: justify\">\n    👉 After importing libraries, <b>the dataset that will be used will be imported</b>.\n</div>","metadata":{}},{"cell_type":"code","source":"nyra_tracking_table =pd.read_csv(\"/kaggle/input/big-data-derby-2022/nyra_tracking_table.csv\")\nnyra_start_table=pd.read_csv(\"/kaggle/input/big-data-derby-2022/nyra_start_table.csv\")\nnyra_race_table=pd.read_csv(\"/kaggle/input/big-data-derby-2022/nyra_race_table.csv\")\nnyra_2019_complete=pd.read_csv(\"/kaggle/input/big-data-derby-2022/nyra_2019_complete.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:12:26.285826Z","iopub.execute_input":"2022-08-21T13:12:26.286206Z","iopub.status.idle":"2022-08-21T13:12:48.287524Z","shell.execute_reply.started":"2022-08-21T13:12:26.286164Z","shell.execute_reply":"2022-08-21T13:12:48.286314Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# --- Reading Dataset ---\nnyra_2019_complete.head().style.background_gradient(cmap='plasma').set_properties(**{'font-family': 'Arial'}).hide_index()","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:12:48.289228Z","iopub.execute_input":"2022-08-21T13:12:48.289715Z","iopub.status.idle":"2022-08-21T13:12:48.557292Z","shell.execute_reply.started":"2022-08-21T13:12:48.289671Z","shell.execute_reply":"2022-08-21T13:12:48.555999Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# <div style=\"font-family: Trebuchet MS; background-color: #2E8B57; color: #FFFFFF; padding: 12px; line-height: 1.5;\">Color Palettes 🎨</div>\n<div style=\"font-family: Segoe UI; line-height: 2; color: #000000; text-align: justify\">\n    👉 This section will create some <b>color palettes</b> that will be used in this notebook.\n</div>","metadata":{}},{"cell_type":"code","source":"# --- Create List of Color Palletes ---\nred_grad = ['#FF0000', '#BF0000', '#800000', '#400000', '#000000']\npink_grad = ['#8A0030', '#BA1141', '#FF5C8A', '#FF99B9', '#FFDEEB']\npurple_grad = ['#4C0028', '#7F0043', '#8E004C', '#A80059', '#C10067']\ncolor_mix = ['#F38BB2', '#FFB9CF', '#FFD7D7', '#F17881', '#E7525B']\nblack_grad = ['#100C07', '#3E3B39', '#6D6A6A', '#9B9A9C', '#CAC9CD']\n\n# --- Plot Color Palletes --\nsns.palplot(red_grad)\nsns.palplot(pink_grad)\nsns.palplot(purple_grad)\nsns.palplot(color_mix)\nsns.palplot(black_grad)","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:12:48.559850Z","iopub.execute_input":"2022-08-21T13:12:48.560283Z","iopub.status.idle":"2022-08-21T13:12:48.936448Z","shell.execute_reply.started":"2022-08-21T13:12:48.560251Z","shell.execute_reply":"2022-08-21T13:12:48.934913Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# <div style=\"font-family: Trebuchet MS; background-color: #2E8B57; color: #FFFFFF; padding: 12px; line-height: 1.5;\">Initial Data Exploration 🔍</div>\n<div style=\"font-family: Segoe UI; line-height: 2; color: #000000; text-align: justify\">\n    👉 This section will focused on <b>initial data exploration</b>\n</div>","metadata":{}},{"cell_type":"code","source":"# Shape of the nyra_2019_complete data set\n\nprint('\\033[1m'\"Shape of the nyra_2019_complete data file\\n\"'\\033[0m',nyra_2019_complete.shape)","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:12:48.938598Z","iopub.execute_input":"2022-08-21T13:12:48.939160Z","iopub.status.idle":"2022-08-21T13:12:48.946582Z","shell.execute_reply.started":"2022-08-21T13:12:48.939116Z","shell.execute_reply":"2022-08-21T13:12:48.945176Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"## Data Type\nprint('\\033[1m'\"Data types of each column in nyra_2019_complete data file\\n\"'\\033[0m',nyra_2019_complete.dtypes)","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:12:48.948907Z","iopub.execute_input":"2022-08-21T13:12:48.949978Z","iopub.status.idle":"2022-08-21T13:12:48.967049Z","shell.execute_reply.started":"2022-08-21T13:12:48.949841Z","shell.execute_reply":"2022-08-21T13:12:48.965822Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# --- Plot Missing Values ---\nmso.bar(nyra_2019_complete, fontsize=9, color=[purple_grad[0], purple_grad[0], purple_grad[0], purple_grad[0], purple_grad[0], purple_grad[0],\n                               purple_grad[0], purple_grad[0], purple_grad[0], purple_grad[0], purple_grad[1], purple_grad[1]], \n        figsize=(15, 8), sort='descending', labels=True)\n\n# --- Title & Subtitle Settings ---\nplt.suptitle('Missing Values in each Columns', fontweight='heavy', x=0.124, y=1.22, ha='left',fontsize='16', \n             fontfamily='sans-serif', color=black_grad[0])\nplt.title(' All columns have no missing value.\\n\\nThe total of missing values in each column is 0, which means that imputation is not required', \n          fontsize='8', fontfamily='sans-serif', loc='left', color=black_grad[1], pad=5)\nplt.grid(axis='both', alpha=0);\n\n# --- Total Missing Values in each Columns ---\nprint('\\033[36m*' * 43)\nprint('\\033[1m'+'.: Total Missing Values in each Columns :.'+'\\033[0m')\nprint('\\033[36m*' * 43+'\\033[0m')\nnyra_2019_complete.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:12:48.968904Z","iopub.execute_input":"2022-08-21T13:12:48.969871Z","iopub.status.idle":"2022-08-21T13:12:55.677280Z","shell.execute_reply.started":"2022-08-21T13:12:48.969822Z","shell.execute_reply":"2022-08-21T13:12:55.675826Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Descriptive Statistics \nnyra_2019_complete.select_dtypes(exclude='object').describe().T.style.background_gradient(cmap='plasma').set_properties(**{'font-family': 'Segoe UI'})","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:12:55.678458Z","iopub.execute_input":"2022-08-21T13:12:55.678889Z","iopub.status.idle":"2022-08-21T13:12:57.529704Z","shell.execute_reply.started":"2022-08-21T13:12:55.678853Z","shell.execute_reply":"2022-08-21T13:12:57.527699Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# <div style=\"font-family: Trebuchet MS; background-color: #00FF7F; color: #FFFFFF; padding: 12px; line-height: 1.5;\">Univariate analysis of Categorical Values 🔍</div>\n<div style=\"font-family: Segoe UI; line-height: 2; color: #000000; text-align: justify\">\n    👉 This section will focused on <b>categorical data analysis</b> before applying ML models.\n</div>","metadata":{}},{"cell_type":"code","source":"# --- Setting Colors, Labels, Order ---\n\ncolors=red_grad\nlabels=nyra_2019_complete['program_number'].dropna().unique()\norder=nyra_2019_complete['program_number'].value_counts().index\n\n# --- Size for Both Figures ---\nplt.figure(figsize=(30, 25))\nplt.suptitle('Program Number Distribution', fontweight='heavy', fontsize='16', fontfamily='sans-serif', \n             color=black_grad[0])\n\n# --- Histogram ---\ncountplt = plt.subplot(1, 2, 1)\nplt.title('Histogram', fontweight='bold', fontsize=14, fontfamily='sans-serif', color=black_grad[0])\nax = sns.countplot(x='program_number', data=nyra_2019_complete, palette=colors, order=order, edgecolor=black_grad[2], alpha=0.85)\nfor rect in ax.patches:\n    ax.text (rect.get_x()+rect.get_width()/2, rect.get_height()+20,rect.get_height(), horizontalalignment='center', \n             fontsize=12, bbox=dict(facecolor='none', edgecolor=black_grad[0], linewidth=0.15, boxstyle='round'))\nplt.tight_layout(rect=[0, 0.04, 1, 0.965])\nplt.xlabel('Program Number Distribution', fontweight='bold', fontsize=11, fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('Total', fontweight='bold', fontsize=11, fontfamily='sans-serif', color=black_grad[1])\nplt.grid(axis='y', alpha=0.4)\ncountplt\n\n# --- Pie Chart ---\nplt.subplot(1, 2, 2)\nplt.title('Pie Chart', fontweight='bold', fontsize=14, fontfamily='sans-serif', color=black_grad[0])\nplt.pie(nyra_2019_complete['program_number'].value_counts(), colors=colors, labels=order, pctdistance=0.67, autopct='%.2f%%', \n        wedgeprops=dict(alpha=0.8, edgecolor=black_grad[1]), textprops={'fontsize':12})\ncentre=plt.Circle((0, 0), 0.45, fc='white', edgecolor=black_grad[1])\nplt.gcf().gca().add_artist(centre);\n\n# --- Count Categorical Labels w/out Dropping Null Walues ---\nprint('\\033[36m*' * 30)\nprint('\\033[1m'+'.: program_number Total :.'+'\\033[0m')\nprint('\\033[36m*' * 30+'\\033[0m')\nnyra_2019_complete.program_number.value_counts(dropna=False)","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:12:57.532561Z","iopub.execute_input":"2022-08-21T13:12:57.533921Z","iopub.status.idle":"2022-08-21T13:13:03.319446Z","shell.execute_reply.started":"2022-08-21T13:12:57.533881Z","shell.execute_reply":"2022-08-21T13:13:03.318337Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# --- Setting Colors, Labels, Order ---\n\ncolors=purple_grad\nlabels=nyra_2019_complete['course_type'].dropna().unique()\norder=nyra_2019_complete['course_type'].value_counts().index\n\n# --- Size for Both Figures ---\nplt.figure(figsize=(30, 25))\nplt.suptitle('Course Type Distribution', fontweight='heavy', fontsize='16', fontfamily='sans-serif', \n             color=black_grad[0])\n\n# --- Histogram ---\ncountplt = plt.subplot(1, 2, 1)\nplt.title('Histogram', fontweight='bold', fontsize=14, fontfamily='sans-serif', color=black_grad[0])\nax = sns.countplot(x='course_type', data=nyra_2019_complete, palette=colors, order=order, edgecolor=black_grad[2], alpha=0.85)\nfor rect in ax.patches:\n    ax.text (rect.get_x()+rect.get_width()/2, rect.get_height()+20,rect.get_height(), horizontalalignment='center', \n             fontsize=12, bbox=dict(facecolor='none', edgecolor=black_grad[0], linewidth=0.15, boxstyle='round'))\nplt.tight_layout(rect=[0, 0.04, 1, 0.965])\nplt.xlabel('Course Type Distribution', fontweight='bold', fontsize=11, fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('Total', fontweight='bold', fontsize=11, fontfamily='sans-serif', color=black_grad[1])\nplt.grid(axis='y', alpha=0.4)\ncountplt\n\n# --- Pie Chart ---\nplt.subplot(1, 2, 2)\nplt.title('Pie Chart', fontweight='bold', fontsize=14, fontfamily='sans-serif', color=black_grad[0])\nplt.pie(nyra_2019_complete['course_type'].value_counts(), colors=colors, labels=order, pctdistance=0.67, autopct='%.2f%%', \n        wedgeprops=dict(alpha=0.8, edgecolor=black_grad[1]), textprops={'fontsize':12})\ncentre=plt.Circle((0, 0), 0.45, fc='white', edgecolor=black_grad[1])\nplt.gcf().gca().add_artist(centre);\n\n# --- Count Categorical Labels w/out Dropping Null Walues ---\nprint('\\033[36m*' * 30)\nprint('\\033[1m'+'.: course_type Total :.'+'\\033[0m')\nprint('\\033[36m*' * 30+'\\033[0m')\nnyra_2019_complete.course_type.value_counts(dropna=False)","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:13:03.325134Z","iopub.execute_input":"2022-08-21T13:13:03.325954Z","iopub.status.idle":"2022-08-21T13:13:07.441495Z","shell.execute_reply.started":"2022-08-21T13:13:03.325908Z","shell.execute_reply":"2022-08-21T13:13:07.440333Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# --- Setting Colors, Labels, Order ---\n\ncolors=pink_grad\nlabels=nyra_2019_complete['track_condition'].dropna().unique()\norder=nyra_2019_complete['track_condition'].value_counts().index\n\n# --- Size for Both Figures ---\nplt.figure(figsize=(30, 25))\nplt.suptitle('Track condition Distribution', fontweight='heavy', fontsize='16', fontfamily='sans-serif', \n             color=black_grad[0])\n\n# --- Histogram ---\ncountplt = plt.subplot(1, 2, 1)\nplt.title('Histogram', fontweight='bold', fontsize=14, fontfamily='sans-serif', color=black_grad[0])\nax = sns.countplot(x='track_condition', data=nyra_2019_complete, palette=colors, order=order, edgecolor=black_grad[2], alpha=0.85)\nfor rect in ax.patches:\n    ax.text (rect.get_x()+rect.get_width()/2, rect.get_height()+20,rect.get_height(), horizontalalignment='center', \n             fontsize=12, bbox=dict(facecolor='none', edgecolor=black_grad[0], linewidth=0.15, boxstyle='round'))\nplt.tight_layout(rect=[0, 0.04, 1, 0.965])\nplt.xlabel('Course Type Distribution', fontweight='bold', fontsize=11, fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('Total', fontweight='bold', fontsize=11, fontfamily='sans-serif', color=black_grad[1])\nplt.grid(axis='y', alpha=0.4)\ncountplt\n\n# --- Pie Chart ---\nplt.subplot(1, 2, 2)\nplt.title('Pie Chart', fontweight='bold', fontsize=14, fontfamily='sans-serif', color=black_grad[0])\nplt.pie(nyra_2019_complete['track_condition'].value_counts(), colors=colors, labels=order, pctdistance=0.67, autopct='%.2f%%', \n        wedgeprops=dict(alpha=0.8, edgecolor=black_grad[1]), textprops={'fontsize':12})\ncentre=plt.Circle((0, 0), 0.45, fc='white', edgecolor=black_grad[1])\nplt.gcf().gca().add_artist(centre);\n\n# --- Count Categorical Labels w/out Dropping Null Walues ---\nprint('\\033[36m*' * 30)\nprint('\\033[1m'+'.: track_condition Total :.'+'\\033[0m')\nprint('\\033[36m*' * 30+'\\033[0m')\nnyra_2019_complete.track_condition.value_counts(dropna=False)","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:13:07.443386Z","iopub.execute_input":"2022-08-21T13:13:07.444138Z","iopub.status.idle":"2022-08-21T13:13:11.871073Z","shell.execute_reply.started":"2022-08-21T13:13:07.444089Z","shell.execute_reply":"2022-08-21T13:13:11.869815Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# --- Setting Colors, Labels, Order ---\n\ncolors=color_mix\nlabels=nyra_2019_complete['race_type'].dropna().unique()\norder=nyra_2019_complete['race_type'].value_counts().index\n\n# --- Size for Both Figures ---\nplt.figure(figsize=(30, 25))\nplt.suptitle('Race Type Distribution', fontweight='heavy', fontsize='16', fontfamily='sans-serif', \n             color=black_grad[0])\n\n# --- Histogram ---\ncountplt = plt.subplot(1, 2, 1)\nplt.title('Histogram', fontweight='bold', fontsize=14, fontfamily='sans-serif', color=black_grad[0])\nax = sns.countplot(x='race_type', data=nyra_2019_complete, palette=colors, order=order, edgecolor=black_grad[2], alpha=0.85)\nfor rect in ax.patches:\n    ax.text (rect.get_x()+rect.get_width()/2, rect.get_height()+20,rect.get_height(), horizontalalignment='center', \n             fontsize=12, bbox=dict(facecolor='none', edgecolor=black_grad[0], linewidth=0.15, boxstyle='round'))\nplt.tight_layout(rect=[0, 0.04, 1, 0.965])\nplt.xlabel('Race Type Distribution', fontweight='bold', fontsize=11, fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('Total', fontweight='bold', fontsize=11, fontfamily='sans-serif', color=black_grad[1])\nplt.grid(axis='y', alpha=0.4)\ncountplt\n\n# --- Pie Chart ---\nplt.subplot(1, 2, 2)\nplt.title('Pie Chart', fontweight='bold', fontsize=14, fontfamily='sans-serif', color=black_grad[0])\nplt.pie(nyra_2019_complete['race_type'].value_counts(), colors=colors, labels=order, pctdistance=0.67, autopct='%.2f%%', \n        wedgeprops=dict(alpha=0.8, edgecolor=black_grad[1]), textprops={'fontsize':12})\ncentre=plt.Circle((0, 0), 0.45, fc='white', edgecolor=black_grad[1])\nplt.gcf().gca().add_artist(centre);\n\n# --- Count Categorical Labels w/out Dropping Null Walues ---\nprint('\\033[36m*' * 30)\nprint('\\033[1m'+'.: race_type Total :.'+'\\033[0m')\nprint('\\033[36m*' * 30+'\\033[0m')\nnyra_2019_complete.race_type.value_counts(dropna=False)","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:13:11.872603Z","iopub.execute_input":"2022-08-21T13:13:11.873165Z","iopub.status.idle":"2022-08-21T13:13:16.372125Z","shell.execute_reply.started":"2022-08-21T13:13:11.873127Z","shell.execute_reply":"2022-08-21T13:13:16.370978Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# --- Setting Colors, Labels, Order ---\n\ncolors=color_mix\n#labels=nyra_2019_complete['jockey'].dropna().unique()\norder=nyra_2019_complete['jockey'].value_counts().iloc[:10].index\n\n# --- Size for Both Figures ---\nplt.figure(figsize=(30, 25))\nplt.suptitle('Jockey Type Distribution', fontweight='heavy', fontsize='16', fontfamily='sans-serif', \n             color=black_grad[0])\n\n# --- Histogram ---\ncountplt = plt.subplot(1, 2, 1)\nplt.title('Histogram', fontweight='bold', fontsize=14, fontfamily='sans-serif', color=black_grad[0])\nax = sns.countplot(x='jockey', data=nyra_2019_complete, palette=colors, order=order, edgecolor=black_grad[2], alpha=0.85)\nfor rect in ax.patches:\n    ax.text (rect.get_x()+rect.get_width()/2, rect.get_height()+20,rect.get_height(), horizontalalignment='center', \n             fontsize=12, bbox=dict(facecolor='none', edgecolor=black_grad[0], linewidth=0.15, boxstyle='round'))\nplt.tight_layout(rect=[0, 0.04, 1, 0.965])\nplt.xlabel('Jockey Distribution', fontweight='bold', fontsize=11, fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('Total', fontweight='bold', fontsize=11, fontfamily='sans-serif', color=black_grad[1])\nplt.grid(axis='y', alpha=0.4)\ncountplt\n\n# --- Pie Chart ---\nplt.subplot(1, 2, 2)\nplt.title('Pie Chart', fontweight='bold', fontsize=14, fontfamily='sans-serif', color=black_grad[0])\nplt.pie(nyra_2019_complete['jockey'].value_counts().iloc[:10], colors=colors,labels=order, pctdistance=0.67, autopct='%.2f%%', \n        wedgeprops=dict(alpha=0.8, edgecolor=black_grad[1]), textprops={'fontsize':12})\ncentre=plt.Circle((0, 0), 0.45, fc='white', edgecolor=black_grad[1])\nplt.gcf().gca().add_artist(centre);\n\n# --- Count Categorical Labels w/out Dropping Null Walues ---\nprint('\\033[36m*' * 30)\nprint('\\033[1m'+'.: jockey Total :.'+'\\033[0m')\nprint('\\033[36m*' * 30+'\\033[0m')\nnyra_2019_complete.jockey.value_counts(dropna=False)","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:13:16.374231Z","iopub.execute_input":"2022-08-21T13:13:16.374853Z","iopub.status.idle":"2022-08-21T13:13:20.180685Z","shell.execute_reply.started":"2022-08-21T13:13:16.374817Z","shell.execute_reply":"2022-08-21T13:13:20.179136Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# <div style=\"font-family: Trebuchet MS; background-color: #00FF7F; color: #FFFFFF; padding: 12px; line-height: 1.5;\">Univariate analysis of Numerical Data 🔍</div>\n<div style=\"font-family: Segoe UI; line-height: 2; color: #000000; text-align: justify\">\n    👉 This section will focused on <b>Numerical data analysis</b> before applying ML models.\n</div>","metadata":{}},{"cell_type":"code","source":"# --- Variable, Color & Plot Size ---\nvar = 'race_number'\ncolor = color_mix[0]\nfig=plt.figure(figsize=(12, 12))\n\n# --- Skewness & Kurtosis ---\nprint('\\033[1m'+'.: Race number Column Skewness & Kurtosis :.'+'\\033[0m')\nprint('*' * 40)\nprint('Skewness:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].skew(axis = 0, skipna = True)))\nprint('\\033[0m'+'Kurtosis:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].kurt(axis = 0, skipna = True)))\nprint('\\n')\n\n# --- General Title ---\nfig.suptitle('Race_number Column Distribution', fontweight='bold', fontsize=16, \n             fontfamily='sans-serif', color=black_grad[0])\nfig.subplots_adjust(top=0.9)\n\n# --- Histogram ---\nax_1=fig.add_subplot(2, 2, 2)\nplt.title('Histogram Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nsns.distplot(nyra_2019_complete[var], kde=True, color=color)\nplt.xlabel('Total', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('race_number', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\n# --- Q-Q Plot ---\nax_2=fig.add_subplot(2, 2, 4)\nplt.title('Q-Q Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nqqplot(nyra_2019_complete[var], fit=True, line='45', ax=ax_2, markerfacecolor=color, \n       markeredgecolor=color, alpha=0.6)\nplt.xlabel('Theoritical Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('Sample Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\n\n# --- Box Plot ---\nax_3=fig.add_subplot(1, 2, 1)\nplt.title('Box Plot', fontweight='bold', fontsize=14, fontfamily='sans-serif', \n          color=black_grad[1])\nsns.boxplot(data=nyra_2019_complete, y=var, color=color, boxprops=dict(alpha=0.8), linewidth=1.5)\nplt.ylabel('Race Number', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:41:12.791423Z","iopub.execute_input":"2022-08-21T13:41:12.791940Z","iopub.status.idle":"2022-08-21T13:41:45.601801Z","shell.execute_reply.started":"2022-08-21T13:41:12.791880Z","shell.execute_reply":"2022-08-21T13:41:45.600362Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# --- Variable, Color & Plot Size ---\nvar = 'distance_id'\ncolor = color_mix[0]\nfig=plt.figure(figsize=(12, 12))\n\n# --- Skewness & Kurtosis ---\nprint('\\033[1m'+'.: Distance Id Column Skewness & Kurtosis :.'+'\\033[0m')\nprint('*' * 40)\nprint('Skewness:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].skew(axis = 0, skipna = True)))\nprint('\\033[0m'+'Kurtosis:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].kurt(axis = 0, skipna = True)))\nprint('\\n')\n\n# --- General Title ---\nfig.suptitle('Distance ID  Column Distribution', fontweight='bold', fontsize=16, \n             fontfamily='sans-serif', color=black_grad[0])\nfig.subplots_adjust(top=0.9)\n\n# --- Histogram ---\nax_1=fig.add_subplot(2, 2, 2)\nplt.title('Histogram Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nsns.distplot(nyra_2019_complete[var], kde=True, color=color)\nplt.xlabel('Total', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('Trakus Index', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\n# --- Q-Q Plot ---\nax_2=fig.add_subplot(2, 2, 4)\nplt.title('Q-Q Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nqqplot(nyra_2019_complete[var], fit=True, line='45', ax=ax_2, markerfacecolor=color, \n       markeredgecolor=color, alpha=0.6)\nplt.xlabel('Theoritical Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('Sample Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\n\n# --- Box Plot ---\nax_3=fig.add_subplot(1, 2, 1)\nplt.title('Box Plot', fontweight='bold', fontsize=14, fontfamily='sans-serif', \n          color=black_grad[1])\nsns.boxplot(data=nyra_2019_complete, y=var, color=color, boxprops=dict(alpha=0.8), linewidth=1.5)\nplt.ylabel('Distance ID ', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:43:54.419167Z","iopub.execute_input":"2022-08-21T13:43:54.420394Z","iopub.status.idle":"2022-08-21T13:44:26.357127Z","shell.execute_reply.started":"2022-08-21T13:43:54.420341Z","shell.execute_reply":"2022-08-21T13:44:26.355623Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# --- Variable, Color & Plot Size ---\nvar = 'trakus_index'\ncolor = color_mix[0]\nfig=plt.figure(figsize=(12, 12))\n\n# --- Skewness & Kurtosis ---\nprint('\\033[1m'+'.: trakus_index Column Skewness & Kurtosis :.'+'\\033[0m')\nprint('*' * 40)\nprint('Skewness:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].skew(axis = 0, skipna = True)))\nprint('\\033[0m'+'Kurtosis:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].kurt(axis = 0, skipna = True)))\nprint('\\n')\n\n# --- General Title ---\nfig.suptitle('trakus_index  Column Distribution', fontweight='bold', fontsize=16, \n             fontfamily='sans-serif', color=black_grad[0])\nfig.subplots_adjust(top=0.9)\n\n# --- Histogram ---\nax_1=fig.add_subplot(2, 2, 2)\nplt.title('Histogram Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nsns.distplot(nyra_2019_complete[var], kde=True, color=color)\nplt.xlabel('Total', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('Trakus Index', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\n# --- Q-Q Plot ---\nax_2=fig.add_subplot(2, 2, 4)\nplt.title('Q-Q Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nqqplot(nyra_2019_complete[var], fit=True, line='45', ax=ax_2, markerfacecolor=color, \n       markeredgecolor=color, alpha=0.6)\nplt.xlabel('Theoritical Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('Sample Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\n\n# --- Box Plot ---\nax_3=fig.add_subplot(1, 2, 1)\nplt.title('Box Plot', fontweight='bold', fontsize=14, fontfamily='sans-serif', \n          color=black_grad[1])\nsns.boxplot(data=nyra_2019_complete, y=var, color=color, boxprops=dict(alpha=0.8), linewidth=1.5)\nplt.ylabel('trakus_index ', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:48:27.002103Z","iopub.execute_input":"2022-08-21T13:48:27.002541Z","iopub.status.idle":"2022-08-21T13:48:58.998169Z","shell.execute_reply.started":"2022-08-21T13:48:27.002504Z","shell.execute_reply":"2022-08-21T13:48:58.996982Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# --- Variable, Color & Plot Size ---\nvar = 'run_up_distance'\ncolor = color_mix[0]\nfig=plt.figure(figsize=(12, 12))\n\n# --- Skewness & Kurtosis ---\nprint('\\033[1m'+'.: run_up_distance Column Skewness & Kurtosis :.'+'\\033[0m')\nprint('*' * 40)\nprint('Skewness:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].skew(axis = 0, skipna = True)))\nprint('\\033[0m'+'Kurtosis:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].kurt(axis = 0, skipna = True)))\nprint('\\n')\n\n# --- General Title ---\nfig.suptitle('run_up_distance  Column Distribution', fontweight='bold', fontsize=16, \n             fontfamily='sans-serif', color=black_grad[0])\nfig.subplots_adjust(top=0.9)\n\n# --- Histogram ---\nax_1=fig.add_subplot(2, 2, 2)\nplt.title('Histogram Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nsns.distplot(nyra_2019_complete[var], kde=True, color=color)\nplt.xlabel('Total', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('run_up_distance', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\n# --- Q-Q Plot ---\nax_2=fig.add_subplot(2, 2, 4)\nplt.title('Q-Q Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nqqplot(nyra_2019_complete[var], fit=True, line='45', ax=ax_2, markerfacecolor=color, \n       markeredgecolor=color, alpha=0.6)\nplt.xlabel('Theoritical Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('Sample Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\n\n# --- Box Plot ---\nax_3=fig.add_subplot(1, 2, 1)\nplt.title('Box Plot', fontweight='bold', fontsize=14, fontfamily='sans-serif', \n          color=black_grad[1])\nsns.boxplot(data=nyra_2019_complete, y=var, color=color, boxprops=dict(alpha=0.8), linewidth=1.5)\nplt.ylabel('run_up_distance', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:58:02.708127Z","iopub.execute_input":"2022-08-21T13:58:02.708580Z","iopub.status.idle":"2022-08-21T13:58:35.704830Z","shell.execute_reply.started":"2022-08-21T13:58:02.708533Z","shell.execute_reply":"2022-08-21T13:58:35.703580Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# --- Variable, Color & Plot Size ---\nvar = 'purse'\ncolor = color_mix[0]\nfig=plt.figure(figsize=(12, 12))\n\n# --- Skewness & Kurtosis ---\nprint('\\033[1m'+'.: purse Column Skewness & Kurtosis :.'+'\\033[0m')\nprint('*' * 40)\nprint('Skewness:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].skew(axis = 0, skipna = True)))\nprint('\\033[0m'+'Kurtosis:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].kurt(axis = 0, skipna = True)))\nprint('\\n')\n\n# --- General Title ---\nfig.suptitle('purse Column Distribution', fontweight='bold', fontsize=16, \n             fontfamily='sans-serif', color=black_grad[0])\nfig.subplots_adjust(top=0.9)\n\n# --- Histogram ---\nax_1=fig.add_subplot(2, 2, 2)\nplt.title('Histogram Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nsns.distplot(nyra_2019_complete[var], kde=True, color=color)\nplt.xlabel('Total', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('purse', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\n# --- Q-Q Plot ---\nax_2=fig.add_subplot(2, 2, 4)\nplt.title('Q-Q Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nqqplot(nyra_2019_complete[var], fit=True, line='45', ax=ax_2, markerfacecolor=color, \n       markeredgecolor=color, alpha=0.6)\nplt.xlabel('Theoritical Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('Sample Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\n\n# --- Box Plot ---\nax_3=fig.add_subplot(1, 2, 1)\nplt.title('Box Plot', fontweight='bold', fontsize=14, fontfamily='sans-serif', \n          color=black_grad[1])\nsns.boxplot(data=nyra_2019_complete, y=var, color=color, boxprops=dict(alpha=0.8), linewidth=1.5)\nplt.ylabel('purse', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:58:56.736781Z","iopub.execute_input":"2022-08-21T13:58:56.737614Z","iopub.status.idle":"2022-08-21T13:59:28.819635Z","shell.execute_reply.started":"2022-08-21T13:58:56.737573Z","shell.execute_reply":"2022-08-21T13:59:28.818426Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# --- Variable, Color & Plot Size ---\nvar = 'post_time'\ncolor = color_mix[0]\nfig=plt.figure(figsize=(12, 12))\n\n# --- Skewness & Kurtosis ---\nprint('\\033[1m'+'.: post_time Column Skewness & Kurtosis :.'+'\\033[0m')\nprint('*' * 40)\nprint('Skewness:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].skew(axis = 0, skipna = True)))\nprint('\\033[0m'+'Kurtosis:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].kurt(axis = 0, skipna = True)))\nprint('\\n')\n\n# --- General Title ---\nfig.suptitle('post_time Column Distribution', fontweight='bold', fontsize=16, \n             fontfamily='sans-serif', color=black_grad[0])\nfig.subplots_adjust(top=0.9)\n\n# --- Histogram ---\nax_1=fig.add_subplot(2, 2, 2)\nplt.title('Histogram Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nsns.distplot(nyra_2019_complete[var], kde=True, color=color)\nplt.xlabel('Total', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('post_time', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\n# --- Q-Q Plot ---\nax_2=fig.add_subplot(2, 2, 4)\nplt.title('Q-Q Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nqqplot(nyra_2019_complete[var], fit=True, line='45', ax=ax_2, markerfacecolor=color, \n       markeredgecolor=color, alpha=0.6)\nplt.xlabel('Theoritical Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('Sample Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\n\n# --- Box Plot ---\nax_3=fig.add_subplot(1, 2, 1)\nplt.title('Box Plot', fontweight='bold', fontsize=14, fontfamily='sans-serif', \n          color=black_grad[1])\nsns.boxplot(data=nyra_2019_complete, y=var, color=color, boxprops=dict(alpha=0.8), linewidth=1.5)\nplt.ylabel('post_time', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-21T13:59:49.776918Z","iopub.execute_input":"2022-08-21T13:59:49.777475Z","iopub.status.idle":"2022-08-21T14:00:22.963877Z","shell.execute_reply.started":"2022-08-21T13:59:49.777428Z","shell.execute_reply":"2022-08-21T14:00:22.962651Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# --- Variable, Color & Plot Size ---\nvar = 'weight_carried'\ncolor = color_mix[0]\nfig=plt.figure(figsize=(12, 12))\n\n# --- Skewness & Kurtosis ---\nprint('\\033[1m'+'.: weight_carried  Column Skewness & Kurtosis :.'+'\\033[0m')\nprint('*' * 40)\nprint('Skewness:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].skew(axis = 0, skipna = True)))\nprint('\\033[0m'+'Kurtosis:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].kurt(axis = 0, skipna = True)))\nprint('\\n')\n\n# --- General Title ---\nfig.suptitle('weight_carried Column Distribution', fontweight='bold', fontsize=16, \n             fontfamily='sans-serif', color=black_grad[0])\nfig.subplots_adjust(top=0.9)\n# --- Histogram ---\nax_1=fig.add_subplot(2, 2, 2)\nplt.title('Histogram Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nsns.distplot(nyra_2019_complete[var], kde=True, color=color)\nplt.xlabel('Total', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('weight_carried', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\n# --- Q-Q Plot ---\nax_2=fig.add_subplot(2, 2, 4)\nplt.title('Q-Q Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nqqplot(nyra_2019_complete[var], fit=True, line='45', ax=ax_2, markerfacecolor=color, \n       markeredgecolor=color, alpha=0.6)\nplt.xlabel('Theoritical Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('Sample Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\n\n# --- Box Plot ---\nax_3=fig.add_subplot(1, 2, 1)\nplt.title('Box Plot', fontweight='bold', fontsize=14, fontfamily='sans-serif', \n          color=black_grad[1])\nsns.boxplot(data=nyra_2019_complete, y=var, color=color, boxprops=dict(alpha=0.8), linewidth=1.5)\nplt.ylabel('weight_carried', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-21T14:00:59.129243Z","iopub.execute_input":"2022-08-21T14:00:59.129761Z","iopub.status.idle":"2022-08-21T14:01:31.526759Z","shell.execute_reply.started":"2022-08-21T14:00:59.129709Z","shell.execute_reply":"2022-08-21T14:01:31.525522Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# --- Variable, Color & Plot Size ---\nvar = 'odds'\ncolor = color_mix[0]\nfig=plt.figure(figsize=(12, 12))\n\n# --- Skewness & Kurtosis ---\nprint('\\033[1m'+'.: odds  Column Skewness & Kurtosis :.'+'\\033[0m')\nprint('*' * 40)\nprint('Skewness:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].skew(axis = 0, skipna = True)))\nprint('\\033[0m'+'Kurtosis:'+'\\033[1m {:.3f}'.format(nyra_2019_complete[var].kurt(axis = 0, skipna = True)))\nprint('\\n')\n\n# --- General Title ---\nfig.suptitle('odds Column Distribution', fontweight='bold', fontsize=16, \n             fontfamily='sans-serif', color=black_grad[0])\nfig.subplots_adjust(top=0.9)\n# --- Histogram ---\nax_1=fig.add_subplot(2, 2, 2)\nplt.title('Histogram Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nsns.distplot(nyra_2019_complete[var], kde=True, color=color)\nplt.xlabel('Total', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('odds', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\n# --- Q-Q Plot ---\nax_2=fig.add_subplot(2, 2, 4)\nplt.title('Q-Q Plot', fontweight='bold', fontsize=14, \n          fontfamily='sans-serif', color=black_grad[1])\nqqplot(nyra_2019_complete[var], fit=True, line='45', ax=ax_2, markerfacecolor=color, \n       markeredgecolor=color, alpha=0.6)\nplt.xlabel('Theoritical Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\nplt.ylabel('Sample Quantiles', fontweight='regular', fontsize=11, \n           fontfamily='sans-serif', color=black_grad[1])\n\n# --- Box Plot ---\nax_3=fig.add_subplot(1, 2, 1)\nplt.title('Box Plot', fontweight='bold', fontsize=14, fontfamily='sans-serif', \n          color=black_grad[1])\nsns.boxplot(data=nyra_2019_complete, y=var, color=color, boxprops=dict(alpha=0.8), linewidth=1.5)\nplt.ylabel('weight_carried', fontweight='regular', fontsize=11, fontfamily='sans-serif', \n           color=black_grad[1])\n\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-21T14:02:18.043067Z","iopub.execute_input":"2022-08-21T14:02:18.043485Z","iopub.status.idle":"2022-08-21T14:02:50.654941Z","shell.execute_reply.started":"2022-08-21T14:02:18.043450Z","shell.execute_reply":"2022-08-21T14:02:50.653981Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Work In Progress","metadata":{}},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}