{"cells":[{"metadata":{},"cell_type":"markdown","source":"<p style=\"text-align: center;\"><font size=\"12\">MALL CUSTOMER SEGMENTATION</font></p>\n<p style=\"text-align: center;\"><font size=\"4\">AN EXPLORATORY DATA ANALYSIS</font></p>\n\n<img src=\"https://images.unsplash.com/photo-1519567241046-7f570eee3ce6?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MXx8c2hvcHBpbmclMjBjZW50ZXJ8ZW58MHx8MHw%3D&ixlib=rb-1.2.1&w=1000&q=80\" alt=\"mall\"> \n\nIt is the number one goal of a mall to attract and retain customers. To meet that goal it is helpful to have insight into customers and their spending habits to aid in the development of marketing strategies."},{"metadata":{},"cell_type":"markdown","source":"<h3 class=\"list-group-item list-group-item-action active\" data-toggle=\"list\" role=\"tab\" aria-controls=\"home\">Table of Contents</h3>\n\n* <a href='#1'>I. LOAD LIBRARIES & PACKAGES</a>\n\n* <a href='#2'>II. DATA OVERVIEW & INSIGHTS</a>\n\n* <a href='#3'>III. FEATURE ENGINEERING</a>\n \n* <a href='#4'>IV. EXPLORATORY DATA ANALYSIS</a>\n * <a href='#4a'>IVa. Univariate Exploration</a> \n * <a href='#4b'>IVb. Bivariate Exploration</a> \n "},{"metadata":{},"cell_type":"markdown","source":"# <a id='1'>I. LOAD PACKAGES & LIBRARIES</a>"},{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"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\n!pip install seaborn==0.11.0\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport plotly.offline as py\nimport plotly.express as px\nimport missingno as msno\nimport plotly.graph_objects as go\nimport plotly.figure_factory as ff\nfrom plotly.subplots import make_subplots\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","execution_count":1,"outputs":[{"output_type":"stream","text":"Collecting seaborn==0.11.0\n Downloading seaborn-0.11.0-py3-none-any.whl (283 kB)\n\u001b[K |████████████████████████████████| 283 kB 1.3 MB/s eta 0:00:01\n\u001b[?25hRequirement already satisfied: matplotlib>=2.2 in /opt/conda/lib/python3.7/site-packages (from seaborn==0.11.0) (3.3.3)\nRequirement already satisfied: scipy>=1.0 in /opt/conda/lib/python3.7/site-packages (from seaborn==0.11.0) (1.4.1)\nRequirement already satisfied: pandas>=0.23 in /opt/conda/lib/python3.7/site-packages (from seaborn==0.11.0) (1.2.0)\nRequirement already satisfied: numpy>=1.15 in /opt/conda/lib/python3.7/site-packages (from seaborn==0.11.0) (1.19.5)\nRequirement already satisfied: cycler>=0.10 in /opt/conda/lib/python3.7/site-packages (from matplotlib>=2.2->seaborn==0.11.0) (0.10.0)\nRequirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /opt/conda/lib/python3.7/site-packages (from matplotlib>=2.2->seaborn==0.11.0) (2.4.7)\nRequirement already satisfied: python-dateutil>=2.1 in /opt/conda/lib/python3.7/site-packages (from matplotlib>=2.2->seaborn==0.11.0) (2.8.1)\nRequirement already satisfied: kiwisolver>=1.0.1 in /opt/conda/lib/python3.7/site-packages (from matplotlib>=2.2->seaborn==0.11.0) (1.3.1)\nRequirement already satisfied: pillow>=6.2.0 in /opt/conda/lib/python3.7/site-packages (from matplotlib>=2.2->seaborn==0.11.0) (7.2.0)\nRequirement already satisfied: six in /opt/conda/lib/python3.7/site-packages (from cycler>=0.10->matplotlib>=2.2->seaborn==0.11.0) (1.15.0)\nRequirement already satisfied: pytz>=2017.3 in /opt/conda/lib/python3.7/site-packages (from pandas>=0.23->seaborn==0.11.0) (2019.3)\nInstalling collected packages: seaborn\n Attempting uninstall: seaborn\n Found existing installation: seaborn 0.11.1\n Uninstalling seaborn-0.11.1:\n Successfully uninstalled seaborn-0.11.1\nSuccessfully installed seaborn-0.11.0\n\u001b[33mWARNING: You are using pip version 21.0; however, version 21.0.1 is available.\nYou should consider upgrading via the '/opt/conda/bin/python3.7 -m pip install --upgrade pip' command.\u001b[0m\n/kaggle/input/customer-segmentation-tutorial-in-python/Mall_Customers.csv\n","name":"stdout"}]},{"metadata":{},"cell_type":"markdown","source":"# <a id='2'>II. DATA OVERVIEW & INSIGHTS</a>"},{"metadata":{"trusted":true},"cell_type":"code","source":"df = pd.read_csv('/kaggle/input/customer-segmentation-tutorial-in-python/Mall_Customers.csv')\ndf.head()","execution_count":2,"outputs":[{"output_type":"execute_result","execution_count":2,"data":{"text/plain":" CustomerID Gender Age Annual Income (k$) Spending Score (1-100)\n0 1 Male 19 15 39\n1 2 Male 21 15 81\n2 3 Female 20 16 6\n3 4 Female 23 16 77\n4 5 Female 31 17 40","text/html":"<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>CustomerID</th>\n <th>Gender</th>\n <th>Age</th>\n <th>Annual Income (k$)</th>\n <th>Spending Score (1-100)</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>1</td>\n <td>Male</td>\n <td>19</td>\n <td>15</td>\n <td>39</td>\n </tr>\n <tr>\n <th>1</th>\n <td>2</td>\n <td>Male</td>\n <td>21</td>\n <td>15</td>\n <td>81</td>\n </tr>\n <tr>\n <th>2</th>\n <td>3</td>\n <td>Female</td>\n <td>20</td>\n <td>16</td>\n <td>6</td>\n </tr>\n <tr>\n <th>3</th>\n <td>4</td>\n <td>Female</td>\n <td>23</td>\n <td>16</td>\n <td>77</td>\n </tr>\n <tr>\n <th>4</th>\n <td>5</td>\n <td>Female</td>\n <td>31</td>\n <td>17</td>\n <td>40</td>\n </tr>\n </tbody>\n</table>\n</div>"},"metadata":{}}]},{"metadata":{"trusted":true},"cell_type":"code","source":"col = ['cutomer_id', 'gender', 'age', 'annual_income', 'spending_score']\ndf.columns = col\n","execution_count":3,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df.info()","execution_count":4,"outputs":[{"output_type":"stream","text":"<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 200 entries, 0 to 199\nData columns (total 5 columns):\n # Column Non-Null Count Dtype \n--- ------ -------------- ----- \n 0 cutomer_id 200 non-null int64 \n 1 gender 200 non-null object\n 2 age 200 non-null int64 \n 3 annual_income 200 non-null int64 \n 4 spending_score 200 non-null int64 \ndtypes: int64(4), object(1)\nmemory usage: 7.9+ KB\n","name":"stdout"}]},{"metadata":{"trusted":true},"cell_type":"code","source":"df.describe()","execution_count":5,"outputs":[{"output_type":"execute_result","execution_count":5,"data":{"text/plain":" cutomer_id age annual_income spending_score\ncount 200.000000 200.000000 200.000000 200.000000\nmean 100.500000 38.850000 60.560000 50.200000\nstd 57.879185 13.969007 26.264721 25.823522\nmin 1.000000 18.000000 15.000000 1.000000\n25% 50.750000 28.750000 41.500000 34.750000\n50% 100.500000 36.000000 61.500000 50.000000\n75% 150.250000 49.000000 78.000000 73.000000\nmax 200.000000 70.000000 137.000000 99.000000","text/html":"<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>cutomer_id</th>\n <th>age</th>\n <th>annual_income</th>\n <th>spending_score</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>count</th>\n <td>200.000000</td>\n <td>200.000000</td>\n <td>200.000000</td>\n <td>200.000000</td>\n </tr>\n <tr>\n <th>mean</th>\n <td>100.500000</td>\n <td>38.850000</td>\n <td>60.560000</td>\n <td>50.200000</td>\n </tr>\n <tr>\n <th>std</th>\n <td>57.879185</td>\n <td>13.969007</td>\n <td>26.264721</td>\n <td>25.823522</td>\n </tr>\n <tr>\n <th>min</th>\n <td>1.000000</td>\n <td>18.000000</td>\n <td>15.000000</td>\n <td>1.000000</td>\n </tr>\n <tr>\n <th>25%</th>\n <td>50.750000</td>\n <td>28.750000</td>\n <td>41.500000</td>\n <td>34.750000</td>\n </tr>\n <tr>\n <th>50%</th>\n <td>100.500000</td>\n <td>36.000000</td>\n <td>61.500000</td>\n <td>50.000000</td>\n </tr>\n <tr>\n <th>75%</th>\n <td>150.250000</td>\n <td>49.000000</td>\n <td>78.000000</td>\n <td>73.000000</td>\n </tr>\n <tr>\n <th>max</th>\n <td>200.000000</td>\n <td>70.000000</td>\n <td>137.000000</td>\n <td>99.000000</td>\n </tr>\n </tbody>\n</table>\n</div>"},"metadata":{}}]},{"metadata":{},"cell_type":"markdown","source":"# <a id='3'>III. FEATURE ENGINEERING</a>"},{"metadata":{"trusted":true},"cell_type":"code","source":"#Create new feature 'age_cat' to categorize values from 'age' colummn\n\ndf['age_cat'] = np.nan \n\nfor col in [df]:\n col.loc[(col['age'] >= 18) & (col['age'] <= 35), 'age_cat'] = 'young adult'\n col.loc[(col['age'] > 35) & (col['age'] <= 55), 'age_cat'] = 'middle age'\n col.loc[col['age'] > 55, 'age_cat'] = 'senior adult'\n\n \n#Create new feature 'weight_status' to categorize values from 'bmi' colummn\n\ndf[\"income_class\"] = np.nan\n\nfor col in [df]:\n col.loc[col[\"annual_income\"] < 32, \"income_class\"] = \"poor\"\n col.loc[(col[\"annual_income\"] >= 33) & (col[\"annual_income\"] <= 54), \"income_class\"] = \"lower middle\"\n col.loc[(col[\"annual_income\"] >= 55) & (col[\"annual_income\"] < 106), \"income_class\"] = \"middle\"\n col.loc[col[\"annual_income\"] >= 106, \"income_class\"] = \"upper middle\"\n \ndf.head()","execution_count":6,"outputs":[{"output_type":"execute_result","execution_count":6,"data":{"text/plain":" cutomer_id gender age annual_income spending_score age_cat \\\n0 1 Male 19 15 39 young adult \n1 2 Male 21 15 81 young adult \n2 3 Female 20 16 6 young adult \n3 4 Female 23 16 77 young adult \n4 5 Female 31 17 40 young adult \n\n income_class \n0 poor \n1 poor \n2 poor \n3 poor \n4 poor ","text/html":"<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>cutomer_id</th>\n <th>gender</th>\n <th>age</th>\n <th>annual_income</th>\n <th>spending_score</th>\n <th>age_cat</th>\n <th>income_class</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>1</td>\n <td>Male</td>\n <td>19</td>\n <td>15</td>\n <td>39</td>\n <td>young adult</td>\n <td>poor</td>\n </tr>\n <tr>\n <th>1</th>\n <td>2</td>\n <td>Male</td>\n <td>21</td>\n <td>15</td>\n <td>81</td>\n <td>young adult</td>\n <td>poor</td>\n </tr>\n <tr>\n <th>2</th>\n <td>3</td>\n <td>Female</td>\n <td>20</td>\n <td>16</td>\n <td>6</td>\n <td>young adult</td>\n <td>poor</td>\n </tr>\n <tr>\n <th>3</th>\n <td>4</td>\n <td>Female</td>\n <td>23</td>\n <td>16</td>\n <td>77</td>\n <td>young adult</td>\n <td>poor</td>\n </tr>\n <tr>\n <th>4</th>\n <td>5</td>\n <td>Female</td>\n <td>31</td>\n <td>17</td>\n <td>40</td>\n <td>young adult</td>\n <td>poor</td>\n </tr>\n </tbody>\n</table>\n</div>"},"metadata":{}}]},{"metadata":{"trusted":true},"cell_type":"code","source":"plt.figure(figsize=(8,8))\nsns.heatmap(df.corr(), cbar = True, square = True, annot=True, cmap= 'YlGnBu')\nplt.title('FEATURE VARIABLE CORRELATIONS')","execution_count":7,"outputs":[{"output_type":"execute_result","execution_count":7,"data":{"text/plain":"Text(0.5, 1.0, 'FEATURE VARIABLE CORRELATIONS')"},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"<Figure size 576x576 with 2 Axes>","image/png":"iVBORw0KGgoAAAANSUhEUgAAAdAAAAHFCAYAAABCRqgoAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAABKyElEQVR4nO3dd3wUdf7H8dcnAQwgEKpSVBARu6CgosJZwAJ6eHbUs4vt7L3reZYTRbGciqcnYsUGqCh2EAUEBAXEwk9pIr1XCfn8/pgJbsImZJPZZDf7fvKYRzIz35n5zDLZ73y+850Zc3dEREQkMVmVHYCIiEg6UgUqIiJSBqpARUREykAVqIiISBmoAhURESkDVaAiIiJloApURETSmpk9Z2YLzGxKMfPNzB41s+lm9p2Z7RPFdlWBiohIunseOKqE+UcDbcKhN/BkFBtVBSoiImnN3UcCS0oo0hN4wQNjgFwza1re7aoCFRGRqq45MDtmfE44rVyqlXcFIiIiBWpu3yvy58Oum/3qhQRNrwX6u3v/BFZhcaaVO05VoCIiktLCyjKRCrOoOcB2MeMtgLnlCgo14YqISITMsiIfIjAUODPsjXsAsNzdfy/vSpWBiohIWjOzV4BDgEZmNge4A6gO4O5PAcOA7sB0YA1wThTbVQUqIiKRsUpo2HT3XluY78ClUW9XTbgiIiJloAxUREQiE9E1y7SgClRERCKTSRVo5uypiIhIhJSBiohIZMziPbOgalIGKiIiUgbKQEVEJEKZk5epAhURkcioE5GIiIiUSBmoiIhERhmoiIiIlEgZ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20mT0PfB2W+a+7TzSzlqVc590E3x3fhV/uMyjbdVuAPQmu7eUDGwgq+zeArcxsLEFC0CsseznwRPh/UVARFXtS5u7fmNlrBPe6zySxkwSAu4BXLOgQNILgfvniLkFsth/u/ke47GNmVpPg+mdXSv/dFeXnLKWUyKP8xrr7/mY2Mexkg5l9G17fEikVM3uQ4Ishh6DyvMJLexCKFGFmMwiatBdVchxbARvdPc/MOhF0FmxXmTFVlvUbv47873mr7P1SMg1NJAOdbUG3dregx9jlhM25IqXl7tduuZRI2tkeGGRmWQSdtC7YQvkqLCXruqRIJANtRNA1vCtBU8lwguwhHR6skHRmdg6b31rzpbtfWhnxSGYys7eBVkUm3+DuwysjnkwW9tf4JM6sw6vy9+b6jeOSkIF2TMlaOaGHyYuIiJTkj/zxkVcqNbI6pGQFmkgv3B0teGLPQjNbYGZDzGzHZAYnIiKSqhJ5kMLLwCCChwg0I3iKzCslLiEiIhkmc25jSaQCNXcf6O554fAimfNQABERKQUjK/IhVSXSC/czC17L9SpBxXkK8F74QINEH60nIiKS1hLphftrzGjBQgW5tbu7roeKiGS4DfmTIm+ZrJ7VLiXbcRPJjW8A9nb3VsD/CJ7Ec4K7t1LlKSIimSaRCvRWd19hZgcTvMvxecI3N4iIiIDeB1qcgld29QCecvchFP/2ExERyUBleV3ZloZUlUgF+puZPU3wxoFh4bMfU7d7lIiISBIl0omoFsGb1Ce7+89m1hTY090/3MKiIiKSITb6lMg7EWXbHimZhupRfiIiEplMqkATuQ9URESkRKnc6SdquoYpIiJSBspARUQkQpmTgaoCFRGRyKTybSdRUxOuiIhIGSgDFRGRCGVOXpY5eyoiIhIhZaAiIhKZTLqNRQ9SEBERKQM14YqIiJSBKlAREZEyUAUqIiJSBqpARUREykAVqIiISBmoAhURESmD/wcAN8LwXgotAQAAAABJRU5ErkJggg==\n"},"metadata":{"needs_background":"light"}}]},{"metadata":{},"cell_type":"markdown","source":"# <a id='4'>IV. EXPLORATORY DATA ANALYSIS</a> "},{"metadata":{},"cell_type":"markdown","source":"We'll start by writing some plotting functions"},{"metadata":{"trusted":true},"cell_type":"code","source":"def plot_dist(feature, binsize):\n \n hist_data = [df[feature]]\n group_labels = [feature]\n colors = ['#41d9b3']\n\n fig = ff.create_distplot(hist_data, group_labels, colors = colors, show_hist = True, bin_size = binsize, curve_type='kde')\n \n fig['layout'].update(title = feature.upper())\n\n py.iplot(fig, filename = 'Distribution_plot')","execution_count":8,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"def plot_hist(feature):\n\n fig = px.histogram(df, x=feature)\n fig['layout'].update(title = feature.upper())\n fig.show()","execution_count":9,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## <a id='4a'>IVa. UNIVARIATE EXPLORATION</a>\n\nLets take a look at the distribution of our continuous variables"},{"metadata":{"trusted":true},"cell_type":"code","source":"plot_dist('age', 0)","execution_count":10,"outputs":[{"output_type":"display_data","data":{"text/html":" <script type=\"text/javascript\">\n window.PlotlyConfig = {MathJaxConfig: 'local'};\n if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}\n if (typeof require !== 'undefined') {\n require.undef(\"plotly\");\n requirejs.config({\n paths: {\n 'plotly': ['https://cdn.plot.ly/plotly-latest.min']\n }\n });\n require(['plotly'], function(Plotly) {\n window._Plotly = Plotly;\n });\n }\n </script>\n "},"metadata":{}},{"output_type":"display_data","data":{"text/html":"<div> <div id=\"2d750ee2-42a1-43e3-8048-5dc06dff7112\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"2d750ee2-42a1-43e3-8048-5dc06dff7112\")) { Plotly.newPlot( \"2d750ee2-42a1-43e3-8048-5dc06dff7112\", [{\"autobinx\": false, \"histnorm\": \"probability density\", \"legendgroup\": \"age\", \"marker\": {\"color\": \"#41d9b3\"}, \"name\": \"age\", \"opacity\": 0.7, \"type\": \"histogram\", \"x\": [19, 21, 20, 23, 31, 22, 35, 23, 64, 30, 67, 35, 58, 24, 37, 22, 35, 20, 52, 35, 35, 25, 46, 31, 54, 29, 45, 35, 40, 23, 60, 21, 53, 18, 49, 21, 42, 30, 36, 20, 65, 24, 48, 31, 49, 24, 50, 27, 29, 31, 49, 33, 31, 59, 50, 47, 51, 69, 27, 53, 70, 19, 67, 54, 63, 18, 43, 68, 19, 32, 70, 47, 60, 60, 59, 26, 45, 40, 23, 49, 57, 38, 67, 46, 21, 48, 55, 22, 34, 50, 68, 18, 48, 40, 32, 24, 47, 27, 48, 20, 23, 49, 67, 26, 49, 21, 66, 54, 68, 66, 65, 19, 38, 19, 18, 19, 63, 49, 51, 50, 27, 38, 40, 39, 23, 31, 43, 40, 59, 38, 47, 39, 25, 31, 20, 29, 44, 32, 19, 35, 57, 32, 28, 32, 25, 28, 48, 32, 34, 34, 43, 39, 44, 38, 47, 27, 37, 30, 34, 30, 56, 29, 19, 31, 50, 36, 42, 33, 36, 32, 40, 28, 36, 36, 52, 30, 58, 27, 59, 35, 37, 32, 46, 29, 41, 30, 54, 28, 41, 36, 34, 32, 33, 38, 47, 35, 45, 32, 32, 30], \"xaxis\": \"x\", \"xbins\": {\"end\": 70.0, \"size\": 0, \"start\": 18.0}, \"yaxis\": \"y\"}, {\"legendgroup\": \"age\", \"marker\": {\"color\": \"#41d9b3\"}, \"mode\": \"lines\", \"name\": \"age\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [18.0, 18.104, 18.208, 18.312, 18.416, 18.52, 18.624, 18.728, 18.832, 18.936, 19.04, 19.144, 19.248, 19.352, 19.456, 19.56, 19.664, 19.768, 19.872, 19.976, 20.08, 20.184, 20.288, 20.392, 20.496, 20.6, 20.704, 20.808, 20.912, 21.016, 21.12, 21.224, 21.328, 21.432, 21.536, 21.64, 21.744, 21.848, 21.951999999999998, 22.056, 22.16, 22.264, 22.368000000000002, 22.472, 22.576, 22.68, 22.784, 22.887999999999998, 22.992, 23.096, 23.2, 23.304000000000002, 23.408, 23.512, 23.616, 23.72, 23.823999999999998, 23.928, 24.032, 24.136, 24.240000000000002, 24.344, 24.448, 24.552, 24.656, 24.759999999999998, 24.864, 24.968, 25.072, 25.176000000000002, 25.28, 25.384, 25.488, 25.592, 25.695999999999998, 25.8, 25.904, 26.008, 26.112000000000002, 26.216, 26.32, 26.424, 26.528, 26.631999999999998, 26.736, 26.84, 26.944000000000003, 27.048000000000002, 27.152, 27.256, 27.36, 27.464, 27.567999999999998, 27.672, 27.776, 27.880000000000003, 27.984, 28.088, 28.192, 28.296, 28.4, 28.503999999999998, 28.608, 28.712, 28.816000000000003, 28.92, 29.024, 29.128, 29.232, 29.336, 29.439999999999998, 29.544, 29.648, 29.752000000000002, 29.856, 29.96, 30.064, 30.168, 30.272, 30.375999999999998, 30.48, 30.584, 30.688000000000002, 30.792, 30.896, 31.0, 31.104, 31.208, 31.311999999999998, 31.416, 31.52, 31.624000000000002, 31.728, 31.832, 31.936, 32.04, 32.144, 32.248, 32.352000000000004, 32.456, 32.56, 32.664, 32.768, 32.872, 32.976, 33.08, 33.184, 33.288, 33.391999999999996, 33.496, 33.6, 33.704, 33.808, 33.912, 34.016, 34.120000000000005, 34.224000000000004, 34.328, 34.432, 34.536, 34.64, 34.744, 34.848, 34.952, 35.056, 35.16, 35.263999999999996, 35.367999999999995, 35.472, 35.576, 35.68, 35.784, 35.888000000000005, 35.992000000000004, 36.096000000000004, 36.2, 36.304, 36.408, 36.512, 36.616, 36.72, 36.824, 36.928, 37.032, 37.135999999999996, 37.239999999999995, 37.344, 37.448, 37.552, 37.656, 37.760000000000005, 37.864000000000004, 37.968, 38.072, 38.176, 38.28, 38.384, 38.488, 38.592, 38.696, 38.8, 38.903999999999996, 39.007999999999996, 39.111999999999995, 39.216, 39.32, 39.424, 39.528, 39.632000000000005, 39.736000000000004, 39.84, 39.944, 40.048, 40.152, 40.256, 40.36, 40.464, 40.568, 40.672, 40.775999999999996, 40.879999999999995, 40.984, 41.088, 41.192, 41.296, 41.4, 41.504000000000005, 41.608000000000004, 41.712, 41.816, 41.92, 42.024, 42.128, 42.232, 42.336, 42.44, 42.544, 42.647999999999996, 42.751999999999995, 42.856, 42.96, 43.064, 43.168, 43.272, 43.376000000000005, 43.480000000000004, 43.584, 43.688, 43.792, 43.896, 44.0, 44.104, 44.208, 44.312, 44.416, 44.519999999999996, 44.623999999999995, 44.728, 44.832, 44.936, 45.04, 45.144, 45.248000000000005, 45.352000000000004, 45.456, 45.56, 45.664, 45.768, 45.872, 45.976, 46.08, 46.184, 46.288, 46.391999999999996, 46.495999999999995, 46.6, 46.704, 46.808, 46.912, 47.016, 47.120000000000005, 47.224000000000004, 47.328, 47.432, 47.536, 47.64, 47.744, 47.848, 47.952, 48.056, 48.16, 48.263999999999996, 48.367999999999995, 48.472, 48.576, 48.68, 48.784, 48.888000000000005, 48.992000000000004, 49.096000000000004, 49.2, 49.304, 49.408, 49.512, 49.616, 49.72, 49.824, 49.928, 50.032, 50.136, 50.24, 50.344, 50.448, 50.552, 50.656, 50.76, 50.864, 50.968, 51.072, 51.176, 51.28, 51.384, 51.488, 51.592, 51.696, 51.8, 51.904, 52.008, 52.112, 52.216, 52.32, 52.424, 52.528, 52.632, 52.736, 52.84, 52.944, 53.048, 53.152, 53.256, 53.36, 53.464, 53.568, 53.672, 53.776, 53.88, 53.984, 54.088, 54.192, 54.296, 54.4, 54.504, 54.608, 54.712, 54.816, 54.92, 55.024, 55.128, 55.232, 55.336, 55.44, 55.544, 55.648, 55.752, 55.856, 55.96, 56.064, 56.168, 56.272, 56.376, 56.48, 56.584, 56.688, 56.792, 56.896, 57.0, 57.104, 57.208, 57.312, 57.416, 57.52, 57.624, 57.728, 57.832, 57.936, 58.04, 58.144, 58.248, 58.352, 58.456, 58.56, 58.664, 58.768, 58.872, 58.976, 59.08, 59.184, 59.288, 59.392, 59.496, 59.6, 59.704, 59.808, 59.912, 60.016, 60.12, 60.224, 60.328, 60.432, 60.536, 60.64, 60.744, 60.848, 60.952, 61.056, 61.16, 61.264, 61.368, 61.472, 61.576, 61.68, 61.784, 61.888, 61.992, 62.096, 62.2, 62.304, 62.408, 62.512, 62.616, 62.72, 62.824, 62.928, 63.032, 63.136, 63.24, 63.344, 63.448, 63.552, 63.656, 63.76, 63.864, 63.968, 64.072, 64.176, 64.28, 64.384, 64.488, 64.592, 64.696, 64.8, 64.904, 65.00800000000001, 65.112, 65.21600000000001, 65.32, 65.424, 65.52799999999999, 65.632, 65.73599999999999, 65.84, 65.944, 66.048, 66.152, 66.256, 66.36, 66.464, 66.568, 66.672, 66.77600000000001, 66.88, 66.98400000000001, 67.088, 67.19200000000001, 67.29599999999999, 67.4, 67.50399999999999, 67.608, 67.712, 67.816, 67.92, 68.024, 68.128, 68.232, 68.336, 68.44, 68.544, 68.648, 68.75200000000001, 68.856, 68.96000000000001, 69.064, 69.168, 69.27199999999999, 69.376, 69.47999999999999, 69.584, 69.688, 69.792, 69.896], \"xaxis\": \"x\", \"y\": [0.013318187087528502, 0.013513164946991042, 0.01370720956056663, 0.013900245792918039, 0.014092200984327738, 0.014283005082891716, 0.014472590770497737, 0.014660893582193638, 0.014847852018568202, 0.01503340765078692, 0.01521750521794343, 0.015400092716410173, 0.015581121480892995, 0.015760546256919486, 0.01593832526451378, 0.016114420252838237, 0.01628879654560674, 0.01646142307710342, 0.016632272418668173, 0.016801320795537745, 0.016968548093962425, 0.017133937858546, 0.017297477279787126, 0.017459157171830636, 0.0176189719404666, 0.01777691954144544, 0.0179330014292074, 0.01808722249615383, 0.0182395910026177, 0.01839011849771913, 0.0185388197313203, 0.018685712557321658, 0.018830817828568505, 0.018974159283663042, 0.01911576342600171, 0.019255659395382735, 0.0193938788325506, 0.019530455737067607, 0.01966542631892162, 0.019798828844299763, 0.019930703475974552, 0.02006109210876693, 0.02019003820056359, 0.0203175865993813, 0.020443783366981667, 0.020568675599549738, 0.020692311245959546, 0.020814738924154832, 0.020936007736179884, 0.021056167082397586, 0.021175266475433933, 0.021293355354388546, 0.02141048289984789, 0.02152669785023542, 0.021642048320027155, 0.021756581620354213, 0.021870344082505714, 0.021983380884835167, 0.022095735883561694, 0.022207451447944046, 0.02231856830029172, 0.022429125361260144, 0.02253915960086041, 0.022648705895594746, 0.022757796892110247, 0.022866462877740253, 0.02297473165828338, 0.023082628443344532, 0.023190175739540696, 0.023297393251847907, 0.023404297793340575, 0.023510903203550024, 0.023617220275639218, 0.023723256692567262, 0.023829016972387075, 0.023934502422793658, 0.024039711105011578, 0.02414463780708321, 0.02424927402659093, 0.024353607962818893, 0.024457624518332693, 0.02456130530992781, 0.02466462868887103, 0.02476756977033264, 0.024870100471881776, 0.024972189560891766, 0.025073802710677752, 0.02517490256516677, 0.025275448811874917, 0.025375398262947553, 0.025474704943995855, 0.025573320190443394, 0.025671192751078212, 0.025768268898488877, 0.02586449254604518, 0.025959805371071218, 0.026054146943842497, 0.026147454862028668, 0.026239664890190653, 0.026330711103931693, 0.02642052603829404, 0.0265090408399852, 0.02659618542301249, 0.026681888627300122, 0.026766078379861186, 0.026848681858093266, 0.02692962565476896, 0.02700883594429138, 0.027086238649789006, 0.027161759610626654, 0.027235324749914955, 0.027306860241607046, 0.027376292676778033, 0.027443549228691178, 0.027508557816265204, 0.02757124726556557, 0.027631547468956606, 0.027689389541561377, 0.02774470597468994, 0.02779743078591205, 0.027847499665461645, 0.027894850118679083, 0.027939421604210722, 0.027981155667701433, 0.028019996070734212, 0.0280558889147856, 0.02808878275998427, 0.028118628738477314, 0.02814538066222596, 0.02816899512506998, 0.028189431598918305, 0.028206652523939866, 0.02822062339264691, 0.028231312827779582, 0.028238692653917794, 0.028242737962762852, 0.028243427172047482, 0.028240742078048654, 0.028234667901693593, 0.02822519332826232, 0.02821231054070691, 0.02819601524661911, 0.028176306698892165, 0.0281531877101345, 0.028126664660905357, 0.02809674750185236, 0.028063449749842765, 0.028026788478187546, 0.027986784301069635, 0.027943461352291518, 0.027896847258468853, 0.02784697310680019, 0.027793873407550986, 0.027737586051394047, 0.027678152261753197, 0.027615616542301588, 0.02755002661976779, 0.027481433382206946, 0.027409890812894466, 0.0273354559200031, 0.027258188662222464, 0.02717815187048324, 0.027095411165945316, 0.027010034874411032, 0.026922093937321454, 0.026831661819493945, 0.026738814413756768, 0.026643629942634764, 0.026546188857237786, 0.026446573733501906, 0.02634486916593002, 0.026241161658976574, 0.02613553951621867, 0.026028092727452365, 0.025918912853851603, 0.025808092911323532, 0.02569572725219263, 0.02558191144534284, 0.025466742154945776, 0.025350317017900408, 0.025232734520108532, 0.025114093871708498, 0.02499449488138899, 0.02487403782990344, 0.024752823342905454, 0.0246309522632251, 0.024508525522706406, 0.024385644013726376, 0.024262408460517162, 0.024138919290413747, 0.024015276505151242, 0.023891579552336985, 0.023767927197225525, 0.023644417394926898, 0.023521147163179712, 0.0233982124558257, 0.023275708037123706, 0.02315372735704472, 0.02303236242769368, 0.022911703701006245, 0.02279183994787321, 0.022672858138848458, 0.022554843326600075, 0.02243787853026819, 0.022322044621895965, 0.022207420215105085, 0.022094081556188177, 0.021982102417796193, 0.02187155399539953, 0.021762504806705427, 0.021655020594216208, 0.02154916423111438, 0.021444995630662052, 0.021342571659303956, 0.02124194605366202, 0.021143169341611326, 0.021046288767624897, 0.020951348222574336, 0.02085838817817095, 0.020767445626229602, 0.020678554022933802, 0.02059174323827664, 0.020507039510846932, 0.02042446540812504, 0.02034403979244537, 0.020265777792776277, 0.02018969078245925, 0.020115786363041073, 0.02004406835432273, 0.019974536790738486, 0.019907187924167433, 0.019842014233267796, 0.01977900443941176, 0.019718143529285585, 0.019659412784204525, 0.019602789816179283, 0.019548248610754094, 0.019495759576620662, 0.019445289601997543, 0.01939680211774552, 0.019350257167174093, 0.019305611482476004, 0.019262818567709047, 0.01922182878822653, 0.01918258946643918, 0.01914504498377407, 0.019109136888676322, 0.019074804010483098, 0.019041982578979273, 0.019010606349428368, 0.018980606732852786, 0.01895191293132232, 0.018924452077990532, 0.01889814938160546, 0.018872928275201883, 0.01884871056867108, 0.018825416604885778, 0.018802965419048443, 0.018781274900914663, 0.018760261959534463, 0.01873984269014189, 0.01871993254281432, 0.018700446492513765, 0.01868129921011545, 0.018662405234021892, 0.018643679141956384, 0.018625035722525336, 0.018606390146136787, 0.0185876581348606, 0.0185687561308166, 0.018549601462678075, 0.01853011250988052, 0.0185102088641306, 0.018489811487814478, 0.01846884286891298, 0.01844722717203873, 0.018424890385219054, 0.018401760462061236, 0.01837776745894698, 0.018352843666917525, 0.01832692373792458, 0.01829994480513894, 0.018271846597024053, 0.01824257154490103, 0.018212064883749598, 0.018180274746009247, 0.018147152248165394, 0.01811265156992736, 0.018076730025825518, 0.01803934812907925, 0.018000469647608885, 0.01796006165208956, 0.01791809455596847, 0.017874542147390208, 0.01782938161300135, 0.017782593553627192, 0.017734161991840185, 0.017684074371462605, 0.01763232154907051, 0.017578897777589707, 0.017523800682097888, 0.017467031227970244, 0.01740859368152771, 0.017348495563369357, 0.017286747594590892, 0.017223363636112172, 0.017158360621355003, 0.01709175848253163, 0.01702358007082203, 0.016953851070732853, 0.016882599908948057, 0.016809857657994053, 0.016735657935054615, 0.01666003679628395, 0.0165830326269744, 0.016504686027945612, 0.016425039698528758, 0.016344138316525456, 0.016262028415526122, 0.01617875825997491, 0.016094377718371067, 0.016008938134995973, 0.015922492200555242, 0.015835093822121563, 0.01574679799276095, 0.01565766066121983, 0.015567738602043546, 0.015477089286489411, 0.015385770754588324, 0.01529384148869858, 0.015201360288884426, 0.0151083861504396, 0.015014978143861494, 0.014921195297569165, 0.01482709648364083, 0.014732740306832056, 0.014638184997118062, 0.01454348830598573, 0.014448707406683966, 0.014353898798620287, 0.014259118216074914, 0.014164420541381388, 0.01406985972270518, 0.013975488696530442, 0.013881359314945715, 0.01378752227779885, 0.01369402706977143, 0.01360092190240343, 0.013508253661079082, 0.013416067856964926, 0.013324408583873713, 0.013233318480007087, 0.013142838694514408, 0.013053008858785837, 0.012963867062382464, 0.012875449833489688, 0.012787792123765374, 0.0127009272974396, 0.012614887124510248, 0.01252970177786558, 0.01244539983415405, 0.012362008278211364, 0.012279552510845278, 0.012198056359770636, 0.012117542093480453, 0.012038030437832577, 0.01195954059512689, 0.01188209026544509, 0.011805695670021753, 0.0117303715764151, 0.011656131325245457, 0.01158298685827071, 0.011510948747570183, 0.011440026225611948, 0.011370227215982857, 0.011301558364566299, 0.011234025070958999, 0.011167631519925763, 0.011102380712699374, 0.011038274497942396, 0.010975313602197227, 0.010913497659662133, 0.010852825241141983, 0.01079329388203501, 0.010734900109229433, 0.01067763946679694, 0.010621506540383773, 0.010566494980214154, 0.010512597522635093, 0.010459806010145668, 0.010408111409869355, 0.010357503830441544, 0.010307972537299839, 0.010259505966378833, 0.010212091736225441, 0.010165716658565083, 0.01012036674736263, 0.010076027226435285, 0.01003268253568811, 0.009990316336054043, 0.009948911513233493, 0.009908450180338629, 0.009868913679558396, 0.00983028258296967, 0.009792536692629469, 0.009755655040089914, 0.009719615885486253, 0.009684396716352975, 0.009649974246329287, 0.009616324413919032, 0.00958342238147304, 0.009551242534565029, 0.009519758481931977, 0.009488943056151116, 0.0094587683152243, 0.009429205545238321, 0.009400225264267119, 0.009371797227677583, 0.009343890434995719, 0.009316473138483546, 0.009289512853571191, 0.00926297637127935, 0.009236829772760012, 0.00921103844607272, 0.00918556710530422, 0.009160379812127514, 0.009135439999885442, 0.00911071050027109, 0.009086153572664684, 0.009061730936173568, 0.009037403804407505, 0.009013132923008392, 0.008988878609938245, 0.00896460079851555, 0.008940259083174895, 0.008915812767910283, 0.008891220917348038, 0.008866442410380294, 0.008841435996275872, 0.008816160353171107, 0.008790574148829295, 0.008764636103544098, 0.008738305055049026, 0.008711540025282814, 0.008684300288848236, 0.008656545442991251, 0.008628235478916009, 0.00859933085424184, 0.008569792566399621, 0.008539582226755656, 0.008508662135245308, 0.008476995355290878, 0.008444545788773782, 0.008411278250826163, 0.008377158544203685, 0.008342153532998785, 0.008306231215452584, 0.008269360795622788, 0.008231512753666181, 0.008192658914495636, 0.008152772514574544, 0.008111828266615445, 0.008069802421954137, 0.008026672830377037, 0.007982418997185313, 0.00793702213728807, 0.00789046522612487, 0.00784273304722722, 0.00779381223623959, 0.007743691321230649, 0.007692360759138034, 0.0076398129682017386, 0.007586042356254672, 0.0075310453447520204, 0.007474820388435866, 0.00741736799054503, 0.007358690713495851, 0.007298793184974141, 0.007237682099394455, 0.0071753662146974845, 0.007111856344473449, 0.007047165345413345, 0.006981308100106894, 0.006914301495220913, 0.006846164395107063, 0.006776917610903702, 0.006706583865210698, 0.006635187752430918, 0.006562755694886049, 0.00648931589482816, 0.006414898282481149, 0.006339534460259283, 0.006263257643321051, 0.006186102596629075, 0.0061081055686956435, 0.006029304222205242, 0.005949737561712298, 0.00586944585862274, 0.005788470573673269, 0.005706854277130746], \"yaxis\": \"y\"}, {\"legendgroup\": \"age\", \"marker\": {\"color\": \"#41d9b3\", \"symbol\": \"line-ns-open\"}, \"mode\": \"markers\", \"name\": \"age\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [19, 21, 20, 23, 31, 22, 35, 23, 64, 30, 67, 35, 58, 24, 37, 22, 35, 20, 52, 35, 35, 25, 46, 31, 54, 29, 45, 35, 40, 23, 60, 21, 53, 18, 49, 21, 42, 30, 36, 20, 65, 24, 48, 31, 49, 24, 50, 27, 29, 31, 49, 33, 31, 59, 50, 47, 51, 69, 27, 53, 70, 19, 67, 54, 63, 18, 43, 68, 19, 32, 70, 47, 60, 60, 59, 26, 45, 40, 23, 49, 57, 38, 67, 46, 21, 48, 55, 22, 34, 50, 68, 18, 48, 40, 32, 24, 47, 27, 48, 20, 23, 49, 67, 26, 49, 21, 66, 54, 68, 66, 65, 19, 38, 19, 18, 19, 63, 49, 51, 50, 27, 38, 40, 39, 23, 31, 43, 40, 59, 38, 47, 39, 25, 31, 20, 29, 44, 32, 19, 35, 57, 32, 28, 32, 25, 28, 48, 32, 34, 34, 43, 39, 44, 38, 47, 27, 37, 30, 34, 30, 56, 29, 19, 31, 50, 36, 42, 33, 36, 32, 40, 28, 36, 36, 52, 30, 58, 27, 59, 35, 37, 32, 46, 29, 41, 30, 54, 28, 41, 36, 34, 32, 33, 38, 47, 35, 45, 32, 32, 30], \"xaxis\": \"x\", \"y\": [\"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\", \"age\"], \"yaxis\": \"y2\"}], {\"barmode\": \"overlay\", \"hovermode\": \"closest\", \"legend\": {\"traceorder\": \"reversed\"}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"title\": {\"text\": \"AGE\"}, \"xaxis\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0], \"zeroline\": false}, \"yaxis\": {\"anchor\": \"free\", \"domain\": [0.35, 1], \"position\": 0.0}, \"yaxis2\": {\"anchor\": \"x\", \"domain\": [0, 0.25], \"dtick\": 1, \"showticklabels\": false}}, {\"responsive\": true} ).then(function(){\n \nvar gd = document.getElementById('2d750ee2-42a1-43e3-8048-5dc06dff7112');\nvar x = new MutationObserver(function (mutations, observer) {{\n var display = window.getComputedStyle(gd).display;\n if (!display || display === 'none') {{\n console.log([gd, 'removed!']);\n Plotly.purge(gd);\n observer.disconnect();\n }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n x.observe(outputEl, {childList: true});\n}}\n\n }) }; }); </script> </div>"},"metadata":{}}]},{"metadata":{"trusted":true},"cell_type":"code","source":"plot_dist('annual_income',0)","execution_count":11,"outputs":[{"output_type":"display_data","data":{"text/html":"<div> <div id=\"e2d13df5-9fe2-4831-8d79-3599b240c8f8\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"e2d13df5-9fe2-4831-8d79-3599b240c8f8\")) { Plotly.newPlot( \"e2d13df5-9fe2-4831-8d79-3599b240c8f8\", [{\"autobinx\": false, \"histnorm\": \"probability density\", \"legendgroup\": \"annual_income\", \"marker\": {\"color\": \"#41d9b3\"}, \"name\": \"annual_income\", \"opacity\": 0.7, \"type\": \"histogram\", \"x\": [15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 23, 23, 24, 24, 25, 25, 28, 28, 28, 28, 29, 29, 30, 30, 33, 33, 33, 33, 34, 34, 37, 37, 38, 38, 39, 39, 39, 39, 40, 40, 40, 40, 42, 42, 43, 43, 43, 43, 44, 44, 46, 46, 46, 46, 47, 47, 48, 48, 48, 48, 48, 48, 49, 49, 50, 50, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 57, 57, 58, 58, 59, 59, 60, 60, 60, 60, 60, 60, 61, 61, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 64, 64, 65, 65, 65, 65, 67, 67, 67, 67, 69, 69, 70, 70, 71, 71, 71, 71, 71, 71, 72, 72, 73, 73, 73, 73, 74, 74, 75, 75, 76, 76, 77, 77, 77, 77, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 79, 79, 81, 81, 85, 85, 86, 86, 87, 87, 87, 87, 87, 87, 88, 88, 88, 88, 93, 93, 97, 97, 98, 98, 99, 99, 101, 101, 103, 103, 103, 103, 113, 113, 120, 120, 126, 126, 137, 137], \"xaxis\": \"x\", \"xbins\": {\"end\": 137.0, \"size\": 0, \"start\": 15.0}, \"yaxis\": \"y\"}, {\"legendgroup\": \"annual_income\", \"marker\": {\"color\": \"#41d9b3\"}, \"mode\": \"lines\", \"name\": \"annual_income\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [15.0, 15.244, 15.488, 15.732, 15.975999999999999, 16.22, 16.464, 16.708, 16.951999999999998, 17.196, 17.44, 17.684, 17.928, 18.172, 18.416, 18.66, 18.904, 19.148, 19.392, 19.636, 19.88, 20.124, 20.368000000000002, 20.612000000000002, 20.856, 21.1, 21.344, 21.588, 21.832, 22.076, 22.32, 22.564, 22.808, 23.052, 23.296, 23.54, 23.784, 24.028, 24.272, 24.516, 24.759999999999998, 25.003999999999998, 25.247999999999998, 25.492, 25.736, 25.98, 26.224, 26.468, 26.712, 26.956, 27.2, 27.444000000000003, 27.688000000000002, 27.932000000000002, 28.176000000000002, 28.42, 28.664, 28.908, 29.152, 29.396, 29.64, 29.884, 30.128, 30.372, 30.616, 30.86, 31.104, 31.348, 31.592, 31.836, 32.08, 32.324, 32.568, 32.812, 33.056, 33.3, 33.544, 33.788, 34.032, 34.275999999999996, 34.519999999999996, 34.763999999999996, 35.007999999999996, 35.251999999999995, 35.495999999999995, 35.739999999999995, 35.984, 36.228, 36.472, 36.716, 36.96, 37.204, 37.448, 37.692, 37.936, 38.18, 38.424, 38.668, 38.912, 39.156, 39.4, 39.644, 39.888000000000005, 40.132000000000005, 40.376000000000005, 40.620000000000005, 40.864000000000004, 41.108000000000004, 41.352000000000004, 41.596000000000004, 41.84, 42.084, 42.328, 42.572, 42.816, 43.06, 43.304, 43.548, 43.792, 44.036, 44.28, 44.524, 44.768, 45.012, 45.256, 45.5, 45.744, 45.988, 46.232, 46.476, 46.72, 46.964, 47.208, 47.452, 47.696, 47.94, 48.184, 48.428, 48.672, 48.916, 49.16, 49.404, 49.648, 49.892, 50.136, 50.38, 50.624, 50.868, 51.112, 51.356, 51.6, 51.844, 52.088, 52.332, 52.576, 52.82, 53.064, 53.308, 53.552, 53.796, 54.04, 54.284, 54.528, 54.772, 55.016, 55.26, 55.504, 55.748, 55.992, 56.236, 56.48, 56.724, 56.968, 57.212, 57.456, 57.7, 57.944, 58.188, 58.432, 58.676, 58.92, 59.164, 59.408, 59.652, 59.896, 60.14, 60.384, 60.628, 60.872, 61.116, 61.36, 61.604, 61.848, 62.092, 62.336, 62.58, 62.824, 63.068, 63.312, 63.556, 63.8, 64.044, 64.288, 64.532, 64.77600000000001, 65.02000000000001, 65.26400000000001, 65.50800000000001, 65.75200000000001, 65.99600000000001, 66.24000000000001, 66.48400000000001, 66.72800000000001, 66.97200000000001, 67.21600000000001, 67.46000000000001, 67.70400000000001, 67.94800000000001, 68.19200000000001, 68.436, 68.68, 68.924, 69.168, 69.412, 69.656, 69.9, 70.144, 70.388, 70.632, 70.876, 71.12, 71.364, 71.608, 71.852, 72.096, 72.34, 72.584, 72.828, 73.072, 73.316, 73.56, 73.804, 74.048, 74.292, 74.536, 74.78, 75.024, 75.268, 75.512, 75.756, 76.0, 76.244, 76.488, 76.732, 76.976, 77.22, 77.464, 77.708, 77.952, 78.196, 78.44, 78.684, 78.928, 79.172, 79.416, 79.66, 79.904, 80.148, 80.392, 80.636, 80.88, 81.124, 81.368, 81.612, 81.856, 82.1, 82.344, 82.588, 82.832, 83.076, 83.32, 83.564, 83.808, 84.052, 84.296, 84.54, 84.784, 85.028, 85.272, 85.516, 85.76, 86.004, 86.248, 86.492, 86.736, 86.98, 87.224, 87.468, 87.712, 87.956, 88.2, 88.444, 88.688, 88.932, 89.176, 89.42, 89.664, 89.908, 90.152, 90.396, 90.64, 90.884, 91.128, 91.372, 91.616, 91.86, 92.104, 92.348, 92.592, 92.836, 93.08, 93.324, 93.568, 93.812, 94.056, 94.3, 94.544, 94.788, 95.032, 95.276, 95.52, 95.764, 96.008, 96.252, 96.496, 96.74, 96.984, 97.228, 97.472, 97.716, 97.96, 98.204, 98.448, 98.692, 98.936, 99.18, 99.424, 99.668, 99.912, 100.156, 100.4, 100.644, 100.888, 101.132, 101.376, 101.62, 101.864, 102.108, 102.352, 102.596, 102.84, 103.084, 103.328, 103.572, 103.816, 104.06, 104.304, 104.548, 104.792, 105.036, 105.28, 105.524, 105.768, 106.012, 106.256, 106.5, 106.744, 106.988, 107.232, 107.476, 107.72, 107.964, 108.208, 108.452, 108.696, 108.94, 109.184, 109.428, 109.672, 109.916, 110.16, 110.404, 110.648, 110.892, 111.136, 111.38, 111.624, 111.868, 112.112, 112.356, 112.6, 112.844, 113.088, 113.332, 113.576, 113.82, 114.064, 114.308, 114.552, 114.796, 115.04, 115.284, 115.528, 115.772, 116.016, 116.26, 116.504, 116.748, 116.992, 117.236, 117.48, 117.724, 117.968, 118.212, 118.456, 118.7, 118.944, 119.188, 119.432, 119.676, 119.92, 120.164, 120.408, 120.652, 120.896, 121.14, 121.384, 121.628, 121.872, 122.116, 122.36, 122.604, 122.848, 123.092, 123.336, 123.58, 123.824, 124.068, 124.312, 124.556, 124.8, 125.044, 125.288, 125.532, 125.776, 126.02, 126.264, 126.508, 126.752, 126.996, 127.24, 127.484, 127.728, 127.972, 128.216, 128.45999999999998, 128.704, 128.94799999999998, 129.192, 129.436, 129.68, 129.924, 130.168, 130.412, 130.656, 130.9, 131.144, 131.388, 131.632, 131.876, 132.12, 132.364, 132.608, 132.852, 133.096, 133.34, 133.584, 133.828, 134.072, 134.316, 134.56, 134.804, 135.048, 135.292, 135.536, 135.78, 136.024, 136.268, 136.512, 136.756], \"xaxis\": \"x\", \"y\": [0.005273604235236655, 0.005368608886597834, 0.005462753222966647, 0.005555963986811321, 0.0056481703486830305, 0.0057393041105365675, 0.005829299900970369, 0.00591809536155778, 0.006005631323477733, 0.00609185197369417, 0.006176705009977196, 0.006260141784108256, 0.006342117432662903, 0.006422590994820244, 0.0065015255167055, 0.006578888141833124, 0.006654650187280639, 0.006728787205286965, 0.006801279030036536, 0.006872109809455937, 0.006941268021919116, 0.007008746477823949, 0.007074542306072617, 0.007138656925553973, 0.007201096001795456, 0.007261869389014951, 0.00732099105787018, 0.007378479009263125, 0.007434355174618926, 0.007488645303115484, 0.007541378836395603, 0.007592588771344985, 0.007642311511568461, 0.007690586708241988, 0.007737457091059699, 0.007782968290032064, 0.00782716864892653, 0.007870109031169753, 0.00791184261905756, 0.007952424707138259, 0.007991912490652835, 0.008030364849927578, 0.008067842131622184, 0.008104405927740855, 0.008140118853312792, 0.008175044323644154, 0.008209246332034173, 0.008242789228835784, 0.008275737502724355, 0.008308155565017331, 0.00834010753786442, 0.00837165704709984, 0.008402867020518736, 0.008433799492305391, 0.008464515414305724, 0.008495074474797297, 0.008525534925369381, 0.008555953416482407, 0.008586384842231362, 0.008616882194791379, 0.008647496428975388, 0.008678276337285348, 0.00870926843578792, 0.008740516861095709, 0.008772063278683353, 0.008803946802716829, 0.008836203927523371, 0.008868868470777488, 0.008901971528428587, 0.008935541441345526, 0.008969603773603854, 0.00900418130229322, 0.009039294018675724, 0.009074959140479646, 0.00911119113506846, 0.009148001753183485, 0.009185400072915965, 0.009223392553526503, 0.009261983098692455, 0.009301173128728687, 0.00934096166129525, 0.009381345400074551, 0.009422318830873171, 0.009463874324578627, 0.009506002246378003, 0.009548691070626137, 0.009591927500733498, 0.00963569659342971, 0.009679981886747064, 0.009724765531059817, 0.009770028422508877, 0.009815750338139423, 0.00986191007207818, 0.009908485572080631, 0.009955454075784246, 0.01000279224601218, 0.01005047630448427, 0.010098482163305483, 0.01014678555362021, 0.010195362150840185, 0.010244187695875994, 0.010293238111827604, 0.010342489615616743, 0.0103919188240734, 0.010441502854020995, 0.01049121941593879, 0.01054104690081581, 0.010590964459849096, 0.01064095207667733, 0.010690990631883243, 0.010741061959538724, 0.010791148895611443, 0.010841235318094574, 0.01089130617876704, 0.010941347526535814, 0.010991346522359028, 0.011041291445791903, 0.011091171693245081, 0.011140977768088147, 0.011190701262776161, 0.01124033483321942, 0.011289872165659763, 0.01133930793635645, 0.011388637764423665, 0.01143785815819958, 0.011486966455560675, 0.011535960758628427, 0.011584839863345794, 0.011633603184427108, 0.011682250676210978, 0.01173078274996612, 0.011779200188217917, 0.01182750405667992, 0.011875695614383269, 0.011923776222606819, 0.011971747253213426, 0.012019609996998493, 0.01206736557265322, 0.012115014836937636, 0.012162558296647042, 0.012209996022941483, 0.01225732756858802, 0.012304551888644561, 0.012351667265087763, 0.012398671235858662, 0.0124455605287679, 0.012492331000666943, 0.012538977582253816, 0.012585494228842512, 0.012631873877380613, 0.012678108409957629, 0.012724188623997955, 0.012770104209286572, 0.01281584373192531, 0.01286139462526973, 0.012906743187845657, 0.012951874588195397, 0.012996772876554399, 0.013041421003209786, 0.013085800843345924, 0.013129893228135375, 0.013173677981788973, 0.013217133964238474, 0.013260239119083618, 0.013302970526400469, 0.013345304459973532, 0.013387216448484049, 0.013428681340160375, 0.01346967337037457, 0.013510166231649245, 0.013550133145525816, 0.013589546935735136, 0.013628380102105493, 0.013666604894643258, 0.013704193387223812, 0.013741117550340793, 0.013777349322372612, 0.013812860678843625, 0.013847623699179747, 0.01388161063048231, 0.013914793947876472, 0.013947146411021828, 0.01397864111641182, 0.014009251545128158, 0.014038951605759763, 0.01406771567224242, 0.014095518616422246, 0.014122335835196679, 0.014148143272137322, 0.014172917433551624, 0.014196635398992196, 0.014219274826275422, 0.014240813951122998, 0.014261231581591595, 0.014280507087505065, 0.014298620385152266, 0.01431555191755889, 0.014331282630685572, 0.014345793945944166, 0.01435906772946166, 0.01437108625855309, 0.014381832185896013, 0.01439128850192151, 0.014399438495958886, 0.014406265716686037, 0.014411753932448049, 0.014415887092012513, 0.014418649286330526, 0.014420024711868049, 0.014419997636062398, 0.01441855236544406, 0.01441567321694501, 0.014411344492889654, 0.014405550460136233, 0.014398275333803078, 0.014389503265976872, 0.01437921833975936, 0.014367404568964208, 0.014354045903727772, 0.014339126242249551, 0.01432262944882261, 0.014304539378263231, 0.014284839906791916, 0.014263514969362227, 0.014240548603377687, 0.014215924998679795, 0.014189628553635378, 0.014161643937095998, 0.014131956155949211, 0.01410055062793012, 0.014067413259312957, 0.014032530527056344, 0.013995889564932992, 0.013957478253134743, 0.01391728531080977, 0.013875300390955378, 0.013831514177064463, 0.013785918480900355, 0.013738506340757206, 0.013689272119550228, 0.01363821160207177, 0.013585322090746867, 0.013530602499222718, 0.013474053443134492, 0.013415677327400368, 0.013355478429415887, 0.013293462977537498, 0.01322963922427151, 0.013164017513612162, 0.013096610342006963, 0.01302743241246299, 0.012956500681347558, 0.012883834397479643, 0.01280945513315255, 0.012733386806776483, 0.0126556556968774, 0.012576290447239612, 0.012495322063030626, 0.012412783897797867, 0.012328711631280157, 0.012243143238027415, 0.012156118946874298, 0.012067681191363642, 0.011977874551264884, 0.011886745685380446, 0.011794343255879343, 0.011700717844440623, 0.011605921860531854, 0.011510009442186029, 0.011413036349677556, 0.01131505985253134, 0.01121613861032918, 0.011116332547806291, 0.011015702724754065, 0.010914311201266947, 0.010812220898889493, 0.010709495458233858, 0.010606199093649637, 0.010502396445536896, 0.010398152430897811, 0.010293532092724924, 0.010188600448823689, 0.01008342234066297, 0.00997806228284184, 0.009872584313751775, 0.009767051848002778, 0.009661527531169074, 0.009556073097393761, 0.00945074923037594, 0.009345615428244051, 0.009240729872798753, 0.009136149303587148, 0.009031928897246227, 0.008928122152529404, 0.008824780781404383, 0.00872195460658399, 0.008619691465824758, 0.008518037123299706, 0.008417035188323575, 0.008316727041679831, 0.008217151769768921, 0.008118346106768266, 0.008020344384963664, 0.00792317849338243, 0.00782687784482756, 0.007731469351382536, 0.007636977408425386, 0.0075434238871606345, 0.007450828135647447, 0.007359206988271998, 0.007268574783582212, 0.007178943390373434, 0.007090322241883787, 0.007002718377929428, 0.006916136494780759, 0.006830579002552715, 0.006746046089854658, 0.006662535795418452, 0.006580044086396815, 0.006498564942999012, 0.0064180904491061945, 0.0063386108884853215, 0.006260114846198289, 0.006182589314781732, 0.00610601980475347, 0.006030390458982983, 0.005955684170447049, 0.005881882702876483, 0.005808966813787048, 0.005736916379376327, 0.0056657105207593905, 0.005595327731009236, 0.005525746002463161, 0.00545694295375417, 0.005388895956026539, 0.00532158225779734, 0.005254979107930787, 0.00518906387620029, 0.005123814170923109, 0.005059207953165752, 0.004995223647033602, 0.00493184024557658, 0.004869037411862959, 0.004806795574796868, 0.004745096019280134, 0.004683920970346962, 0.004623253670929621, 0.004563078452945102, 0.004503380801426355, 0.004444147411456752, 0.004385366237703357, 0.004327026536382172, 0.004269118899527805, 0.004211635281479394, 0.004154569017535259, 0.004097914834768983, 0.004041668855040701, 0.003985828590277399, 0.003930392930136502, 0.003875362122205975, 0.0038207377449327976, 0.0037665226735087705, 0.0037127210389782846, 0.003659338180867002, 0.003606380593662324, 0.0035538558675069507, 0.003501772623494472, 0.0034501404439815594, 0.0033989697983539875, 0.0033482719647039846, 0.003298058947893531, 0.0032483433944926958, 0.003199138505093238, 0.003150457944506138, 0.003102315750356704, 0.0030547262405931056, 0.0030077039204230507, 0.002961263389189333, 0.0029154192476879112, 0.0028701860064221916, 0.002825577995274531, 0.0027816092750603764, 0.0027382935514127156, 0.002695644091423854, 0.0026536736434491807, 0.002612394360452738, 0.0025718177272480475, 0.0025319544919593343, 0.0024928146019988543, 0.0024544071448249862, 0.0024167402937141196, 0.002379821258746516, 0.0023436562431733356, 0.002308250405298315, 0.002273607825974039, 0.0022397314817791626, 0.002206623223909667, 0.002174283762784578, 0.002142712658334474, 0.0021119083159100768, 0.0020818679877180665, 0.002052587779662569, 0.002024062663443198, 0.0019962864937347865, 0.0019692520302495224, 0.0019429509644598583, 0.0019173739507397905, 0.001892510641663515, 0.001868349727183655, 0.0018448789773966498, 0.0018220852885903363, 0.0017999547322582138, 0.0017784726067566425, 0.0017576234912748574, 0.00173739130178365, 0.001717759348626371, 0.0016987103954159005, 0.0016802267189030523, 0.0016622901694857022, 0.0016448822320334607, 0.0016279840867100877, 0.0016115766694847803, 0.001595640732033987, 0.0015801569007473481, 0.0015651057345646608, 0.00155046778138525, 0.0015362236328067026, 0.0015223539769665538, 0.0015088396492778594, 0.0014956616808678113, 0.001482801344547254, 0.0014702401981582418, 0.001457960125166322, 0.0014459433723840996, 0.001434172584732517, 0.001422630836966277, 0.0014113016623095696, 0.0014001690779679194, 0.0013892176075011248, 0.0013784323000611296, 0.0013677987465168576, 0.0013573030925057132, 0.0013469320484683276, 0.0013366728967392218, 0.001326513495781331, 0.0013164422816665453, 0.0013064482669177748, 0.0012965210368401767, 0.0012866507434803637, 0.0012768280973622765, 0.0012670443571572351, 0.001257291317453162, 0.001247561294794325, 0.0012378471121679577, 0.0012281420821179598, 0.0012184399886683798, 0.001208735068240723, 0.0011990219897491604, 0.0011892958340566097, 0.001179552072972325, 0.0011697865479681623, 0.0011599954487861732, 0.0011501752921045138, 0.001140322900422104, 0.0011304353813148893, 0.001120510107208187, 0.0011105446958003201, 0.0011005369912629147, 0.00109048504633249, 0.001080387105397008, 0.0010702415886692227, 0.0010600470775268035, 0.00104980230108678, 0.0010395061240693353, 0.0010291575359933317, 0.001018755641733209, 0.001008299653454309, 0.0009977888839311365, 0.000987222741240868, 0.0009766007248124312, 0.0009659224228000148, 0.0009551875107387547, 0.0009443957514299315, 0.0009335469959930818, 0.0009226411860133233, 0.0009116783567037261, 0.0009006586409949887, 0.000889582274457885, 0.000878449600958093, 0.0008672610789380565, 0.0008560172882165128, 0.0008447189371933022, 0.0008333668703449687, 0.0008219620758956038, 0.0008105056935472175, 0.0007989990221547986, 0.0007874435272329419, 0.000775840848183647, 0.0007641928051383925, 0.000752501405312023], \"yaxis\": \"y\"}, {\"legendgroup\": \"annual_income\", \"marker\": {\"color\": \"#41d9b3\", \"symbol\": \"line-ns-open\"}, \"mode\": \"markers\", \"name\": \"annual_income\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 23, 23, 24, 24, 25, 25, 28, 28, 28, 28, 29, 29, 30, 30, 33, 33, 33, 33, 34, 34, 37, 37, 38, 38, 39, 39, 39, 39, 40, 40, 40, 40, 42, 42, 43, 43, 43, 43, 44, 44, 46, 46, 46, 46, 47, 47, 48, 48, 48, 48, 48, 48, 49, 49, 50, 50, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 57, 57, 58, 58, 59, 59, 60, 60, 60, 60, 60, 60, 61, 61, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 64, 64, 65, 65, 65, 65, 67, 67, 67, 67, 69, 69, 70, 70, 71, 71, 71, 71, 71, 71, 72, 72, 73, 73, 73, 73, 74, 74, 75, 75, 76, 76, 77, 77, 77, 77, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 79, 79, 81, 81, 85, 85, 86, 86, 87, 87, 87, 87, 87, 87, 88, 88, 88, 88, 93, 93, 97, 97, 98, 98, 99, 99, 101, 101, 103, 103, 103, 103, 113, 113, 120, 120, 126, 126, 137, 137], \"xaxis\": \"x\", \"y\": [\"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\", \"annual_income\"], \"yaxis\": \"y2\"}], {\"barmode\": \"overlay\", \"hovermode\": \"closest\", \"legend\": {\"traceorder\": \"reversed\"}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"title\": {\"text\": \"ANNUAL_INCOME\"}, \"xaxis\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0], \"zeroline\": false}, \"yaxis\": {\"anchor\": \"free\", \"domain\": [0.35, 1], \"position\": 0.0}, \"yaxis2\": {\"anchor\": \"x\", \"domain\": [0, 0.25], \"dtick\": 1, \"showticklabels\": false}}, {\"responsive\": true} ).then(function(){\n \nvar gd = document.getElementById('e2d13df5-9fe2-4831-8d79-3599b240c8f8');\nvar x = new MutationObserver(function (mutations, observer) {{\n var display = window.getComputedStyle(gd).display;\n if (!display || display === 'none') {{\n console.log([gd, 'removed!']);\n Plotly.purge(gd);\n observer.disconnect();\n }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n x.observe(outputEl, {childList: true});\n}}\n\n }) }; }); </script> </div>"},"metadata":{}}]},{"metadata":{"trusted":true},"cell_type":"code","source":"plot_dist('spending_score',0)","execution_count":12,"outputs":[{"output_type":"display_data","data":{"text/html":"<div> <div id=\"27e62729-16f0-4240-9605-11bcdf20c749\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"27e62729-16f0-4240-9605-11bcdf20c749\")) { Plotly.newPlot( \"27e62729-16f0-4240-9605-11bcdf20c749\", [{\"autobinx\": false, \"histnorm\": \"probability density\", \"legendgroup\": \"spending_score\", \"marker\": {\"color\": \"#41d9b3\"}, \"name\": \"spending_score\", \"opacity\": 0.7, \"type\": \"histogram\", \"x\": [39, 81, 6, 77, 40, 76, 6, 94, 3, 72, 14, 99, 15, 77, 13, 79, 35, 66, 29, 98, 35, 73, 5, 73, 14, 82, 32, 61, 31, 87, 4, 73, 4, 92, 14, 81, 17, 73, 26, 75, 35, 92, 36, 61, 28, 65, 55, 47, 42, 42, 52, 60, 54, 60, 45, 41, 50, 46, 51, 46, 56, 55, 52, 59, 51, 59, 50, 48, 59, 47, 55, 42, 49, 56, 47, 54, 53, 48, 52, 42, 51, 55, 41, 44, 57, 46, 58, 55, 60, 46, 55, 41, 49, 40, 42, 52, 47, 50, 42, 49, 41, 48, 59, 55, 56, 42, 50, 46, 43, 48, 52, 54, 42, 46, 48, 50, 43, 59, 43, 57, 56, 40, 58, 91, 29, 77, 35, 95, 11, 75, 9, 75, 34, 71, 5, 88, 7, 73, 10, 72, 5, 93, 40, 87, 12, 97, 36, 74, 22, 90, 17, 88, 20, 76, 16, 89, 1, 78, 1, 73, 35, 83, 5, 93, 26, 75, 20, 95, 27, 63, 13, 75, 10, 92, 13, 86, 15, 69, 14, 90, 32, 86, 15, 88, 39, 97, 24, 68, 17, 85, 23, 69, 8, 91, 16, 79, 28, 74, 18, 83], \"xaxis\": \"x\", \"xbins\": {\"end\": 99.0, \"size\": 0, \"start\": 1.0}, \"yaxis\": \"y\"}, {\"legendgroup\": \"spending_score\", \"marker\": {\"color\": \"#41d9b3\"}, \"mode\": \"lines\", \"name\": \"spending_score\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [1.0, 1.196, 1.392, 1.588, 1.784, 1.98, 2.176, 2.372, 2.568, 2.7640000000000002, 2.96, 3.156, 3.352, 3.548, 3.744, 3.94, 4.136, 4.332, 4.5280000000000005, 4.724, 4.92, 5.116, 5.312, 5.508, 5.704, 5.9, 6.096, 6.292, 6.488, 6.684, 6.88, 7.076, 7.272, 7.468, 7.664, 7.86, 8.056000000000001, 8.251999999999999, 8.448, 8.644, 8.84, 9.036, 9.232, 9.428, 9.624, 9.82, 10.016, 10.212, 10.408, 10.604, 10.8, 10.996, 11.192, 11.388, 11.584, 11.78, 11.976, 12.172, 12.368, 12.564, 12.76, 12.956, 13.152, 13.348, 13.544, 13.74, 13.936, 14.132, 14.328, 14.524, 14.72, 14.916, 15.112, 15.308, 15.504, 15.7, 15.896, 16.092, 16.288, 16.484, 16.68, 16.875999999999998, 17.072, 17.268, 17.464, 17.66, 17.856, 18.052, 18.248, 18.444, 18.64, 18.836, 19.032, 19.228, 19.424, 19.62, 19.816, 20.012, 20.208, 20.404, 20.6, 20.796, 20.992, 21.188, 21.384, 21.58, 21.776, 21.972, 22.168, 22.364, 22.56, 22.756, 22.952, 23.148, 23.344, 23.54, 23.736, 23.932, 24.128, 24.324, 24.52, 24.716, 24.912, 25.108, 25.304, 25.5, 25.696, 25.892, 26.088, 26.284, 26.48, 26.676, 26.872, 27.068, 27.264, 27.46, 27.656, 27.852, 28.048, 28.244, 28.44, 28.636, 28.832, 29.028, 29.224, 29.42, 29.616, 29.812, 30.008, 30.204, 30.4, 30.596, 30.792, 30.988, 31.184, 31.38, 31.576, 31.772, 31.968, 32.164, 32.36, 32.556, 32.751999999999995, 32.948, 33.144, 33.34, 33.536, 33.732, 33.928, 34.124, 34.32, 34.516, 34.712, 34.908, 35.104, 35.3, 35.496, 35.692, 35.888, 36.084, 36.28, 36.476, 36.672, 36.868, 37.064, 37.26, 37.456, 37.652, 37.848, 38.044, 38.24, 38.436, 38.632, 38.828, 39.024, 39.22, 39.416, 39.612, 39.808, 40.004, 40.2, 40.396, 40.592, 40.788, 40.984, 41.18, 41.376, 41.572, 41.768, 41.964, 42.16, 42.356, 42.552, 42.748, 42.944, 43.14, 43.336, 43.532, 43.728, 43.924, 44.12, 44.316, 44.512, 44.708, 44.904, 45.1, 45.296, 45.492, 45.688, 45.884, 46.08, 46.276, 46.472, 46.668, 46.864, 47.06, 47.256, 47.452, 47.648, 47.844, 48.04, 48.236, 48.432, 48.628, 48.824, 49.02, 49.216, 49.412, 49.608, 49.804, 50.0, 50.196, 50.392, 50.588, 50.784, 50.98, 51.176, 51.372, 51.568, 51.764, 51.96, 52.156, 52.352, 52.548, 52.744, 52.94, 53.136, 53.332, 53.528, 53.724, 53.92, 54.116, 54.312, 54.508, 54.704, 54.9, 55.096, 55.292, 55.488, 55.684, 55.88, 56.076, 56.272, 56.468, 56.664, 56.86, 57.056, 57.252, 57.448, 57.644, 57.84, 58.036, 58.232, 58.428, 58.624, 58.82, 59.016, 59.212, 59.408, 59.604, 59.8, 59.996, 60.192, 60.388, 60.584, 60.78, 60.976, 61.172, 61.368, 61.564, 61.76, 61.956, 62.152, 62.348, 62.544, 62.74, 62.936, 63.132, 63.328, 63.524, 63.72, 63.916, 64.112, 64.30799999999999, 64.50399999999999, 64.7, 64.896, 65.092, 65.288, 65.484, 65.68, 65.876, 66.072, 66.268, 66.464, 66.66, 66.856, 67.052, 67.248, 67.444, 67.64, 67.836, 68.032, 68.228, 68.424, 68.62, 68.816, 69.012, 69.208, 69.404, 69.6, 69.796, 69.992, 70.188, 70.384, 70.58, 70.776, 70.972, 71.168, 71.364, 71.56, 71.756, 71.952, 72.148, 72.344, 72.54, 72.736, 72.932, 73.128, 73.324, 73.52, 73.716, 73.912, 74.108, 74.304, 74.5, 74.696, 74.892, 75.088, 75.284, 75.48, 75.676, 75.872, 76.068, 76.264, 76.46, 76.656, 76.852, 77.048, 77.244, 77.44, 77.636, 77.832, 78.028, 78.224, 78.42, 78.616, 78.812, 79.008, 79.204, 79.4, 79.596, 79.792, 79.988, 80.184, 80.38, 80.576, 80.772, 80.968, 81.164, 81.36, 81.556, 81.752, 81.948, 82.144, 82.34, 82.536, 82.732, 82.928, 83.124, 83.32, 83.516, 83.712, 83.908, 84.104, 84.3, 84.496, 84.692, 84.888, 85.084, 85.28, 85.476, 85.672, 85.868, 86.064, 86.26, 86.456, 86.652, 86.848, 87.044, 87.24, 87.436, 87.632, 87.828, 88.024, 88.22, 88.416, 88.612, 88.808, 89.004, 89.2, 89.396, 89.592, 89.788, 89.984, 90.18, 90.376, 90.572, 90.768, 90.964, 91.16, 91.356, 91.552, 91.748, 91.944, 92.14, 92.336, 92.532, 92.728, 92.924, 93.12, 93.316, 93.512, 93.708, 93.904, 94.1, 94.296, 94.492, 94.688, 94.884, 95.08, 95.276, 95.472, 95.668, 95.864, 96.06, 96.256, 96.452, 96.648, 96.844, 97.04, 97.236, 97.432, 97.628, 97.824, 98.02, 98.216, 98.412, 98.608, 98.804], \"xaxis\": \"x\", \"y\": [0.004421796577386015, 0.004499472616351305, 0.004577067581778797, 0.004654537919088537, 0.004731839854125525, 0.004808929447159402, 0.004885762647585881, 0.004962295349248927, 0.005038483446302041, 0.0051142828895265405, 0.00518964974302451, 0.0052645402412038345, 0.005338910845972748, 0.00541271830406136, 0.005485919704387801, 0.005558472535386816, 0.005630334742219206, 0.005701464783780715, 0.005771821689429568, 0.005841365115352476, 0.005910055400489558, 0.005977853621939302, 0.0060447216497653495, 0.006110622201127923, 0.006175518893663237, 0.006239376298035394, 0.006302159989585925, 0.00636383659900729, 0.006424373861967435, 0.006483740667613712, 0.00654190710588527, 0.006598844513564395, 0.00665452551899803, 0.006708924085422342, 0.006762015552823839, 0.006813776678272325, 0.00686418567466193, 0.006913222247797999, 0.006960867631768949, 0.00700710462254392, 0.0070519176097382655, 0.0070952926064910184, 0.007137217277399941, 0.007177680964461818, 0.00721667471096741, 0.007254191283302907, 0.0072902251906115075, 0.007324772702271526, 0.007357831863149466, 0.0073894025065895114, 0.007419486265103104, 0.007448086578725878, 0.007475208701011302, 0.007500859702634571, 0.007525048472582617, 0.00754778571691035, 0.007569083955046294, 0.007588957513634795, 0.007607422517905698, 0.0076244968805664745, 0.007640200288215794, 0.007654554185281753, 0.007667581755492411, 0.00767930790089055, 0.00768975921840909, 0.007698963974028176, 0.007706952074539609, 0.00771375503694874, 0.007719405955548839, 0.007723939466707468, 0.0077273917114089865, 0.007729800295602219, 0.007731204248406438, 0.0077316439782337265, 0.007731161226889957, 0.007729799021721005, 0.007727601625874934, 0.007724614486755005, 0.007720884182742131, 0.007716458368269197, 0.007711385717332968, 0.007705715865532761, 0.007699499350727993, 0.007692787552409493, 0.007685632629882012, 0.007678087459357638, 0.00767020557006169, 0.007662041079454518, 0.007653648627673698, 0.007645083311302587, 0.007636400616571412, 0.007627656352098032, 0.007618906581275219, 0.007610207554411144, 0.00760161564072949, 0.007593187260334304, 0.007584978816243976, 0.0075770466265969475, 0.007569446857130178, 0.00756223545402921, 0.007555468077246649, 0.007549200034382795, 0.007543486215219967, 0.007538381026998479, 0.0075339383305195115, 0.007530211377156081, 0.007527252746850354, 0.00752511428717142, 0.007523847053503722, 0.007523501250432739, 0.007524126174390113, 0.007525770157616401, 0.007528480513495581, 0.007532303483311116, 0.007537284184469395, 0.007543466560232074, 0.007550893330994802, 0.0075596059471459975, 0.007569644543535069, 0.0075810478955759646, 0.007593853377008143, 0.0076080969193334635, 0.00762381297294419, 0.007641034469954054, 0.007659792788741218, 0.007680117720209401, 0.007702037435770358, 0.007725578457048827, 0.007750765627308849, 0.007777622084597984, 0.007806169236604737, 0.007836426737222311, 0.007868412464811235, 0.007902142502151271, 0.00793763111807329, 0.007974890750759961, 0.008013931992704386, 0.008054763577315022, 0.008097392367155353, 0.008141823343806486, 0.008188059599341322, 0.008236102329399045, 0.008285950827848953, 0.008337602483033668, 0.008391052775581633, 0.008446295277780173, 0.008503321654500696, 0.008562121665668465, 0.008622683170270281, 0.00868499213189407, 0.00874903262579511, 0.00881478684748469, 0.008882235122837104, 0.00895135591971215, 0.009022125861090604, 0.009094519739720211, 0.009168510534271078, 0.009244069426998533, 0.009321165822912404, 0.009399767370451331, 0.009479839983660837, 0.009561347865873189, 0.009644253534887225, 0.009728517849645263, 0.009814100038403797, 0.00990095772839368, 0.00998904697696425, 0.010078322304205283, 0.010168736727038689, 0.010260241794770617, 0.010352787626093329, 0.01044632294752401, 0.01054079513326625, 0.010636150246477669, 0.01073233308192551, 0.010829287210009496, 0.01092695502212936, 0.011025277777372186, 0.011124195650492337, 0.011223647781154466, 0.01132357232440799, 0.01142390650235879, 0.011524586657001927, 0.011625548304176718, 0.011726726188603246, 0.011828054339957927, 0.011929466129942282, 0.012030894330298672, 0.012132271171723993, 0.012233528403630503, 0.01233459735470173, 0.012435408994189788, 0.012535893993898786, 0.01263598279079809, 0.012735605650207878, 0.01283469272949881, 0.012933174142246342, 0.01303098002278019, 0.013128040591068436, 0.013224286217875953, 0.013319647490136043, 0.013414055276474839, 0.01350744079282763, 0.013599735668086622, 0.01369087200972031, 0.013780782469304536, 0.013869400307906472, 0.013956659461263168, 0.01404249460469676, 0.014126841217710004, 0.014209635648205758, 0.014290815176275612, 0.014370318077503533, 0.01444808368573088, 0.014524052455231144, 0.014598166022242365, 0.014670367265806828, 0.014740600367868222, 0.01480881087257708, 0.014874945744756, 0.014938953427476689, 0.015000783898701247, 0.01506038872694047, 0.015117721125882217, 0.015172736007942715, 0.015225390036693603, 0.015275641678117622, 0.01532345125064527, 0.015368780973923735, 0.015411595016269618, 0.015451859540755515, 0.015489542749879575, 0.015524614928766585, 0.015557048486846834, 0.015586817997958982, 0.015613900238820694, 0.015638274225809372, 0.015659921249994317, 0.015678824910359324, 0.015694971145153006, 0.015708348261302834, 0.015718946961826692, 0.015726760371174382, 0.015731784058429378, 0.01573401605830003, 0.015733456889827673, 0.01573010957273761, 0.015723979641358278, 0.015715075156032026, 0.01570340671194107, 0.015688987445270954, 0.015671833036634, 0.0156519617116749, 0.01562939423878143, 0.015604153923823432, 0.01557626660184465, 0.015545760625633643, 0.015512666851101494, 0.01547701861939663, 0.015438851735690035, 0.015398204444567472, 0.015355117401968486, 0.015309633643617643, 0.015261798549896542, 0.015211659807112383, 0.015159267365123123, 0.01510467339128679, 0.015047932220708844, 0.014989100302769238, 0.01492823614391882, 0.014865400246742766, 0.01480065504529814, 0.014734064836742122, 0.014665695709276253, 0.014595615466444048, 0.014523893547827895, 0.014450600946203878, 0.014375810121223277, 0.014299594909700996, 0.014222030432603982, 0.014143192998843038, 0.014063160005984916, 0.013982009838012097, 0.013899821760271672, 0.013816675811765102, 0.013732652694943299, 0.013647833663183825, 0.01356230040613753, 0.013476134933144437, 0.013389419454928799, 0.013302236263794521, 0.013214667612552236, 0.013126795592418652, 0.013038702010138499, 0.01295046826458747, 0.012862175223122687, 0.012773903097953959, 0.012685731322816009, 0.012597738430226801, 0.012510001929621787, 0.01242259818665803, 0.012335602303984054, 0.012249088003774134, 0.01216312751232504, 0.012077791447014053, 0.011993148705915285, 0.011909266360367942, 0.011826209550787996, 0.011744041386008567, 0.01166282284642906, 0.011582612691245801, 0.011503467370029006, 0.011425440938900789, 0.011348584981559849, 0.011272948535385489, 0.011198578022842333, 0.011125517188392784, 0.011053807041110171, 0.01098348580316978, 0.010914588864379174, 0.010847148742891268, 0.010781195052226663, 0.010716754474712422, 0.01065385074142562, 0.010592504618709982, 0.01053273390131409, 0.010474553412178294, 0.01041797500887713, 0.0103630075967024, 0.010309657148350887, 0.010257926730159005, 0.01020781653480558, 0.010159323920382326, 0.010112443455710628, 0.010067166971762501, 0.010023483619022952, 0.009981379930611198, 0.009940839890958763, 0.009901845009823766, 0.00986437440140254, 0.00982840486828283, 0.00979391098996635, 0.009760865215673098, 0.009729237961125686, 0.009698997708998796, 0.009670111112706707, 0.009642543103191164, 0.009616256998362434, 0.00959121461483808, 0.009567376381617271, 0.009544701455323093, 0.009523147836641167, 0.009502672487580476, 0.0094832314491814, 0.009464779959295951, 0.009447272570067538, 0.009430663264740553, 0.009414905573435252, 0.009399952687529332, 0.009385757572295384, 0.00937227307745251, 0.00935945204530068, 0.009347247416118086, 0.009335612330514631, 0.009324500228449014, 0.00931386494463176, 0.009303660800053074, 0.009293842689391643, 0.009284366164078605, 0.009275187510809997, 0.009266263825320739, 0.009257553081253438, 0.009249014193976687, 0.009240607079228339, 0.009232292706481784, 0.009224033146954563, 0.009215791616201565, 0.00920753251125695, 0.009199221442311544, 0.009190825258934372, 0.009182312070869185, 0.009173651263458366, 0.009164813507767967, 0.009155770765508152, 0.009146496288863784, 0.0091369646153691, 0.009127151557979215, 0.00911703419050926, 0.009106590828628518, 0.00909580100661335, 0.009084645450077408, 0.009073106044911374, 0.009061165802677353, 0.009048808822714428, 0.009036020251221978, 0.009022786237596472, 0.00900909388830502, 0.008994931218585106, 0.008980287102264893, 0.008965151220002453, 0.008949514006243657, 0.008933366595200089, 0.008916700766147362, 0.00889950888834254, 0.008881783865856025, 0.00886351908260907, 0.008844708347901974, 0.00882534584271165, 0.008805426067028282, 0.008784943788492566, 0.008763893992583918, 0.008742271834599143, 0.008720072593648714, 0.008697291628884614, 0.008673924338159883, 0.008649966119305255, 0.008625412334192728, 0.008600258275740739, 0.008574499137998029, 0.008548129989427682, 0.008521145749494589, 0.00849354116864304, 0.008465310811732825, 0.00843644904498505, 0.008406950026470902, 0.008376807700159082, 0.008346015793519979, 0.008314567818667837, 0.008282457077004604, 0.008249676667313273, 0.008216219497231744, 0.00818207829802325, 0.008147245642544012, 0.00811171396629444, 0.008075475591426682, 0.008038522753568329, 0.008000847631309859, 0.007962442378192236, 0.00792329915702067, 0.007883410176320967, 0.007842767728746435, 0.007801364231235689, 0.007759192266715152, 0.007716244627134393, 0.007672514357617975, 0.007627994801513829, 0.007582679646115756, 0.0075365629688360775, 0.0074896392836038906, 0.007441903587265105, 0.007393351405761564, 0.007343978839869499, 0.007293782610280188, 0.0072427601018107465, 0.007190909406537578, 0.0071382293656511555, 0.00708471960983762, 0.007030380598000077, 0.006975213654140803, 0.006919221002234425, 0.006862405798931598, 0.006804772163942845, 0.006746325207962665, 0.006687071058005222, 0.006627016880034131, 0.006566170898780918, 0.006504542414658349, 0.00644214181768768, 0.006378980598370805, 0.006315071355451261, 0.006250427800520466, 0.006185064759438408, 0.00611899817055035, 0.006052245079694144, 0.005984823632004454, 0.005916753060533055, 0.005848053671715793, 0.005778746827728819, 0.005708854925787754, 0.005638401374454681, 0.00556741056702818, 0.005495907852101834, 0.0054239195013863215, 0.0053514726748991265, 0.00527859538363479, 0.005205316449836275, 0.0051316654649958375, 0.005057672745720392, 0.004983369287602545, 0.0049087867172442875, 0.004833957242585088, 0.0047589136016905, 0.004683689010160951, 0.004608317107323587, 0.004532831901372064, 0.0044572677136212125, 0.004381659122044166, 0.004306040904260291, 0.004230447980141901, 0.00415491535420664], \"yaxis\": \"y\"}, {\"legendgroup\": \"spending_score\", \"marker\": {\"color\": \"#41d9b3\", \"symbol\": \"line-ns-open\"}, \"mode\": \"markers\", \"name\": \"spending_score\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [39, 81, 6, 77, 40, 76, 6, 94, 3, 72, 14, 99, 15, 77, 13, 79, 35, 66, 29, 98, 35, 73, 5, 73, 14, 82, 32, 61, 31, 87, 4, 73, 4, 92, 14, 81, 17, 73, 26, 75, 35, 92, 36, 61, 28, 65, 55, 47, 42, 42, 52, 60, 54, 60, 45, 41, 50, 46, 51, 46, 56, 55, 52, 59, 51, 59, 50, 48, 59, 47, 55, 42, 49, 56, 47, 54, 53, 48, 52, 42, 51, 55, 41, 44, 57, 46, 58, 55, 60, 46, 55, 41, 49, 40, 42, 52, 47, 50, 42, 49, 41, 48, 59, 55, 56, 42, 50, 46, 43, 48, 52, 54, 42, 46, 48, 50, 43, 59, 43, 57, 56, 40, 58, 91, 29, 77, 35, 95, 11, 75, 9, 75, 34, 71, 5, 88, 7, 73, 10, 72, 5, 93, 40, 87, 12, 97, 36, 74, 22, 90, 17, 88, 20, 76, 16, 89, 1, 78, 1, 73, 35, 83, 5, 93, 26, 75, 20, 95, 27, 63, 13, 75, 10, 92, 13, 86, 15, 69, 14, 90, 32, 86, 15, 88, 39, 97, 24, 68, 17, 85, 23, 69, 8, 91, 16, 79, 28, 74, 18, 83], \"xaxis\": \"x\", \"y\": [\"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\", \"spending_score\"], \"yaxis\": \"y2\"}], {\"barmode\": \"overlay\", \"hovermode\": \"closest\", \"legend\": {\"traceorder\": \"reversed\"}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"title\": {\"text\": \"SPENDING_SCORE\"}, \"xaxis\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0], \"zeroline\": false}, \"yaxis\": {\"anchor\": \"free\", \"domain\": [0.35, 1], \"position\": 0.0}, \"yaxis2\": {\"anchor\": \"x\", \"domain\": [0, 0.25], \"dtick\": 1, \"showticklabels\": false}}, {\"responsive\": true} ).then(function(){\n \nvar gd = document.getElementById('27e62729-16f0-4240-9605-11bcdf20c749');\nvar x = new MutationObserver(function (mutations, observer) {{\n var display = window.getComputedStyle(gd).display;\n if (!display || display === 'none') {{\n console.log([gd, 'removed!']);\n Plotly.purge(gd);\n observer.disconnect();\n }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n x.observe(outputEl, {childList: true});\n}}\n\n }) }; }); </script> </div>"},"metadata":{}}]},{"metadata":{},"cell_type":"markdown","source":"#### We'll use bar and pie plots to visualize categorical variables"},{"metadata":{},"cell_type":"markdown","source":"### GENDER COUNT AND PERCENTAGES"},{"metadata":{"trusted":true},"cell_type":"code","source":"df_gender = df.groupby(['gender'])[['gender']].count()\ndf_gender.rename(columns={'gender':'count'}, inplace=True)\ndf_gender = df_gender.reset_index()\ndf_gender\n\nfig = make_subplots(rows=1, \n cols=2, \n specs=[[{\"type\": \"xy\"}, {\"type\": \"domain\"}]], \n subplot_titles=(\"Gender Count\",\"Gender Percentages\"))\n\nbar_colors=['#c73062','#41d9b3']\npie_colors=['#c73062','#41d9b3']\n\nfig.add_trace(go.Bar(x=df_gender['gender'], \n y=df_gender['count'],\n text=df_gender['count'],\n textposition = 'auto',\n name='Gender Count',\n opacity = 0.8, \n marker=dict(color=bar_colors, line=dict(color='#000000',width=1))), row=1, col=1)\n\nfig.add_trace(go.Pie(labels=df_gender['gender'], \n values=df_gender['count'],\n textfont=dict(size=15), opacity = 0.8,\n hole = 0.5, \n hoverinfo = \"label+percent+name\",\n domain = dict(x = [.0,.48]),\n name = \"Gender Percent\",\n marker = dict(colors = pie_colors, line = dict(width = 1.5))), \n row=1, col=2)\n\nfig.update_layout(height=500, showlegend=True)\n\nfig.show()","execution_count":33,"outputs":[{"output_type":"display_data","data":{"text/html":"<div> <div id=\"d1dfdf05-a475-4fb4-93c2-8db17fa46033\" class=\"plotly-graph-div\" style=\"height:500px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"d1dfdf05-a475-4fb4-93c2-8db17fa46033\")) { Plotly.newPlot( \"d1dfdf05-a475-4fb4-93c2-8db17fa46033\", [{\"marker\": {\"color\": [\"#c73062\", \"#41d9b3\"], \"line\": {\"color\": \"#000000\", \"width\": 1}}, \"name\": \"Gender Count\", \"opacity\": 0.8, \"text\": [112.0, 88.0], \"textposition\": \"auto\", \"type\": \"bar\", \"x\": [\"Female\", \"Male\"], \"xaxis\": \"x\", \"y\": [112, 88], \"yaxis\": \"y\"}, {\"domain\": {\"x\": [0.55, 1.0], \"y\": [0.0, 1.0]}, \"hole\": 0.5, \"hoverinfo\": \"label+percent+name\", \"labels\": [\"Female\", \"Male\"], \"marker\": {\"colors\": [\"#c73062\", \"#41d9b3\"], \"line\": {\"width\": 1.5}}, \"name\": \"Gender Percent\", \"opacity\": 0.8, \"textfont\": {\"size\": 15}, \"type\": \"pie\", \"values\": [112, 88]}], {\"annotations\": [{\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Gender Count\", \"x\": 0.225, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 1.0, \"yanchor\": \"bottom\", \"yref\": \"paper\"}, {\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Gender Percentages\", \"x\": 0.775, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 1.0, \"yanchor\": \"bottom\", \"yref\": \"paper\"}], \"height\": 500, \"showlegend\": true, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 0.45]}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.0, 1.0]}}, {\"responsive\": true} ).then(function(){\n \nvar gd = document.getElementById('d1dfdf05-a475-4fb4-93c2-8db17fa46033');\nvar x = new MutationObserver(function (mutations, observer) {{\n var display = window.getComputedStyle(gd).display;\n if (!display || display === 'none') {{\n console.log([gd, 'removed!']);\n Plotly.purge(gd);\n observer.disconnect();\n }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n x.observe(outputEl, {childList: true});\n}}\n\n }) }; }); </script> </div>"},"metadata":{}}]},{"metadata":{},"cell_type":"markdown","source":"### AGE CATEGORY COUNT AND PERCENTAGES"},{"metadata":{"trusted":true},"cell_type":"code","source":"df_age_cat = df.groupby(['age_cat'])[['age_cat']].count()\ndf_age_cat.rename(columns={'age_cat':'count'}, inplace=True)\ndf_age_cat = df_age_cat.reset_index()\ndf_age_cat.sort_values(by='count', ascending=False, inplace=True)\n\nfig = make_subplots(rows=1, \n cols=2, \n specs=[[{\"type\": \"xy\"}, {\"type\": \"domain\"}]], \n subplot_titles=(\"Age Category Count\",\"Age Category Percentages\"))\n\nbar_colors=['#8fd8ff','#40b1ed', '#0075b3']\npie_colors=['#8fd8ff','#40b1ed', '#0075b3']\n\nfig.add_trace(go.Bar(x=df_age_cat['age_cat'], \n y=df_age_cat['count'],\n text=df_age_cat['count'],\n textposition = 'auto',\n name='Age Cateogry Count',\n opacity = 0.8, \n marker=dict(color=bar_colors, line=dict(color='#000000',width=1))), row=1, col=1)\n\nfig.add_trace(go.Pie(labels=df_age_cat['age_cat'], \n values=df_age_cat['count'],\n textfont=dict(size=15), opacity = 0.8,\n hole = 0.5, \n hoverinfo = \"label+percent+name\",\n domain = dict(x = [.0,.48]),\n name = \"Age Category Percent\",\n marker = dict(colors = pie_colors, line = dict(width = 1.5))), \n row=1, col=2)\n\nfig.update_layout(height=500, showlegend=True)\n\nfig.show()","execution_count":32,"outputs":[{"output_type":"display_data","data":{"text/html":"<div> <div id=\"59b4b653-9bc2-464c-98bf-a6b4333c36ab\" class=\"plotly-graph-div\" style=\"height:500px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"59b4b653-9bc2-464c-98bf-a6b4333c36ab\")) { Plotly.newPlot( \"59b4b653-9bc2-464c-98bf-a6b4333c36ab\", [{\"marker\": {\"color\": [\"#8fd8ff\", \"#40b1ed\", \"#0075b3\"], \"line\": {\"color\": \"#000000\", \"width\": 1}}, \"name\": \"Age Cateogry Count\", \"opacity\": 0.8, \"text\": [98.0, 73.0, 29.0], \"textposition\": \"auto\", \"type\": \"bar\", \"x\": [\"young adult\", \"middle age\", \"senior adult\"], \"xaxis\": \"x\", \"y\": [98, 73, 29], \"yaxis\": \"y\"}, {\"domain\": {\"x\": [0.55, 1.0], \"y\": [0.0, 1.0]}, \"hole\": 0.5, \"hoverinfo\": \"label+percent+name\", \"labels\": [\"young adult\", \"middle age\", \"senior adult\"], \"marker\": {\"colors\": [\"#8fd8ff\", \"#40b1ed\", \"#0075b3\"], \"line\": {\"width\": 1.5}}, \"name\": \"Age Category Percent\", \"opacity\": 0.8, \"textfont\": {\"size\": 15}, \"type\": \"pie\", \"values\": [98, 73, 29]}], {\"annotations\": [{\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Age Category Count\", \"x\": 0.225, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 1.0, \"yanchor\": \"bottom\", \"yref\": \"paper\"}, {\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Age Category Percentages\", \"x\": 0.775, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 1.0, \"yanchor\": \"bottom\", \"yref\": \"paper\"}], \"height\": 500, \"showlegend\": true, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 0.45]}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.0, 1.0]}}, {\"responsive\": true} ).then(function(){\n \nvar gd = document.getElementById('59b4b653-9bc2-464c-98bf-a6b4333c36ab');\nvar x = new MutationObserver(function (mutations, observer) {{\n var display = window.getComputedStyle(gd).display;\n if (!display || display === 'none') {{\n console.log([gd, 'removed!']);\n Plotly.purge(gd);\n observer.disconnect();\n }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n x.observe(outputEl, {childList: true});\n}}\n\n }) }; }); </script> </div>"},"metadata":{}}]},{"metadata":{},"cell_type":"markdown","source":"### INCOME CLASS COUNT AND PERCENTAGES"},{"metadata":{"trusted":true},"cell_type":"code","source":"df_income = df.groupby(['income_class'])[['income_class']].count()\ndf_income.rename(columns={'income_class':'count'}, inplace=True)\ndf_income = df_income.reset_index()\ndf_income.sort_values(by='count', ascending=False, inplace=True)\n\nfig = make_subplots(rows=1, \n cols=2, \n specs=[[{\"type\": \"xy\"}, {\"type\": \"domain\"}]], \n subplot_titles=(\"Income Class Count\",\"Income Class Percentages\"))\n\nbar_colors=['#29cf42', '#5fe373', '#9cf0a9', '#00ad1a']\npie_colors=['#29cf42', '#5fe373', '#9cf0a9', '#00ad1a']\n\nfig.add_trace(go.Bar(x=df_income['income_class'], \n y=df_income['count'],\n text=df_income['count'],\n textposition = 'auto',\n name='Income Class Count',\n opacity = 0.8, \n marker=dict(color=bar_colors, line=dict(color='#000000',width=1))), row=1, col=1)\n\nfig.add_trace(go.Pie(labels=df_income['income_class'], \n values=df_income['count'],\n textfont=dict(size=15), opacity = 0.8,\n hole = 0.5, \n hoverinfo = \"label+percent+name\",\n domain = dict(x = [.0,.48]),\n name = \"Income Class Percent\",\n marker = dict(colors = pie_colors, line = dict(width = 1.5))), \n row=1, col=2)\n\nfig.update_layout(height=500, showlegend=True)\n\nfig.show()","execution_count":31,"outputs":[{"output_type":"display_data","data":{"text/html":"<div> <div id=\"d2e76e47-e610-4b47-bc6a-3060b66042ca\" class=\"plotly-graph-div\" style=\"height:500px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"d2e76e47-e610-4b47-bc6a-3060b66042ca\")) { Plotly.newPlot( \"d2e76e47-e610-4b47-bc6a-3060b66042ca\", [{\"marker\": {\"color\": [\"#29cf42\", \"#5fe373\", \"#9cf0a9\", \"#00ad1a\"], \"line\": {\"color\": \"#000000\", \"width\": 1}}, \"name\": \"Income Class Count\", \"opacity\": 0.8, \"text\": [106.0, 54.0, 32.0, 8.0], \"textposition\": \"auto\", \"type\": \"bar\", \"x\": [\"middle\", \"lower middle\", \"poor\", \"upper middle\"], \"xaxis\": \"x\", \"y\": [106, 54, 32, 8], \"yaxis\": \"y\"}, {\"domain\": {\"x\": [0.55, 1.0], \"y\": [0.0, 1.0]}, \"hole\": 0.5, \"hoverinfo\": \"label+percent+name\", \"labels\": [\"middle\", \"lower middle\", \"poor\", \"upper middle\"], \"marker\": {\"colors\": [\"#29cf42\", \"#5fe373\", \"#9cf0a9\", \"#00ad1a\"], \"line\": {\"width\": 1.5}}, \"name\": \"Income Class Percent\", \"opacity\": 0.8, \"textfont\": {\"size\": 15}, \"type\": \"pie\", \"values\": [106, 54, 32, 8]}], {\"annotations\": [{\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Income Class Count\", \"x\": 0.225, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 1.0, \"yanchor\": \"bottom\", \"yref\": \"paper\"}, {\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Income Class Percentages\", \"x\": 0.775, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 1.0, \"yanchor\": \"bottom\", \"yref\": \"paper\"}], \"height\": 500, \"showlegend\": true, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 0.45]}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.0, 1.0]}}, {\"responsive\": true} ).then(function(){\n \nvar gd = document.getElementById('d2e76e47-e610-4b47-bc6a-3060b66042ca');\nvar x = new MutationObserver(function (mutations, observer) {{\n var display = window.getComputedStyle(gd).display;\n if (!display || display === 'none') {{\n console.log([gd, 'removed!']);\n Plotly.purge(gd);\n observer.disconnect();\n }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n x.observe(outputEl, {childList: true});\n}}\n\n }) }; }); </script> </div>"},"metadata":{}}]},{"metadata":{},"cell_type":"markdown","source":"## <a id='4b'>IVb. BIVARIATE EXPLORATION</a>"},{"metadata":{},"cell_type":"markdown","source":"### SPENDING SCORES BY GENDER"},{"metadata":{"trusted":true},"cell_type":"code","source":"gender_spend_sum = df.groupby(['gender'])[['spending_score']].sum().reset_index()\ngender_spend_avg = df.groupby(['gender'])[['spending_score']].mean().reset_index()\n\ngender_age_spend = df.groupby(['gender','age_cat'])[['spending_score']].sum().reset_index()\ngender_age_spend.sort_values(by='spending_score', ascending=False, inplace=True)","execution_count":16,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"fig = px.histogram(df, \n x=\"spending_score\", \n color=\"gender\", \n marginal=\"box\", \n hover_data=df.columns,\n nbins = 50,\n color_discrete_sequence=['#41d9b3','#c73062'])\nfig.show()","execution_count":17,"outputs":[{"output_type":"display_data","data":{"text/html":"<div> <div id=\"f1889d45-16a4-462c-9d3b-553d7788e5be\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"f1889d45-16a4-462c-9d3b-553d7788e5be\")) { Plotly.newPlot( \"f1889d45-16a4-462c-9d3b-553d7788e5be\", [{\"alignmentgroup\": \"True\", \"bingroup\": \"x\", \"hovertemplate\": \"gender=Male<br>spending_score=%{x}<br>count=%{y}<extra></extra>\", \"legendgroup\": \"Male\", \"marker\": {\"color\": \"#41d9b3\"}, \"name\": \"Male\", \"nbinsx\": 50, \"offsetgroup\": \"Male\", \"orientation\": \"v\", \"showlegend\": true, \"type\": \"histogram\", \"x\": [39, 81, 3, 14, 13, 79, 66, 29, 35, 73, 73, 82, 61, 4, 4, 92, 92, 36, 60, 60, 41, 46, 46, 56, 55, 51, 59, 59, 55, 47, 54, 48, 51, 55, 41, 46, 41, 49, 52, 42, 49, 59, 55, 56, 46, 43, 48, 52, 46, 56, 91, 35, 95, 11, 75, 9, 75, 5, 73, 10, 93, 12, 97, 36, 90, 17, 88, 1, 1, 5, 26, 20, 63, 13, 75, 10, 92, 15, 69, 14, 90, 15, 97, 68, 8, 74, 18, 83], \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"alignmentgroup\": \"True\", \"customdata\": [[1, \"Male\", 19, 15, \"young adult\", \"poor\"], [2, \"Male\", 21, 15, \"young adult\", \"poor\"], [9, \"Male\", 64, 19, \"senior adult\", \"poor\"], [11, \"Male\", 67, 19, \"senior adult\", \"poor\"], [15, \"Male\", 37, 20, \"middle age\", \"poor\"], [16, \"Male\", 22, 20, \"young adult\", \"poor\"], [18, \"Male\", 20, 21, \"young adult\", \"poor\"], [19, \"Male\", 52, 23, \"middle age\", \"poor\"], [21, \"Male\", 35, 24, \"young adult\", \"poor\"], [22, \"Male\", 25, 24, \"young adult\", \"poor\"], [24, \"Male\", 31, 25, \"young adult\", \"poor\"], [26, \"Male\", 29, 28, \"young adult\", \"poor\"], [28, \"Male\", 35, 28, \"young adult\", \"poor\"], [31, \"Male\", 60, 30, \"senior adult\", \"poor\"], [33, \"Male\", 53, 33, \"middle age\", \"lower middle\"], [34, \"Male\", 18, 33, \"young adult\", \"lower middle\"], [42, \"Male\", 24, 38, \"young adult\", \"lower middle\"], [43, \"Male\", 48, 39, \"middle age\", \"lower middle\"], [52, \"Male\", 33, 42, \"young adult\", \"lower middle\"], [54, \"Male\", 59, 43, \"senior adult\", \"lower middle\"], [56, \"Male\", 47, 43, \"middle age\", \"lower middle\"], [58, \"Male\", 69, 44, \"senior adult\", \"lower middle\"], [60, \"Male\", 53, 46, \"middle age\", \"lower middle\"], [61, \"Male\", 70, 46, \"senior adult\", \"lower middle\"], [62, \"Male\", 19, 46, \"young adult\", \"lower middle\"], [65, \"Male\", 63, 48, \"senior adult\", \"lower middle\"], [66, \"Male\", 18, 48, \"young adult\", \"lower middle\"], [69, \"Male\", 19, 48, \"young adult\", \"lower middle\"], [71, \"Male\", 70, 49, \"senior adult\", \"lower middle\"], [75, \"Male\", 59, 54, \"senior adult\", \"lower middle\"], [76, \"Male\", 26, 54, \"young adult\", \"lower middle\"], [78, \"Male\", 40, 54, \"middle age\", \"lower middle\"], [81, \"Male\", 57, 54, \"senior adult\", \"lower middle\"], [82, \"Male\", 38, 54, \"middle age\", \"lower middle\"], [83, \"Male\", 67, 54, \"senior adult\", \"lower middle\"], [86, \"Male\", 48, 54, \"middle age\", \"lower middle\"], [92, \"Male\", 18, 59, \"young adult\", \"middle\"], [93, \"Male\", 48, 60, \"middle age\", \"middle\"], [96, \"Male\", 24, 60, \"young adult\", \"middle\"], [99, \"Male\", 48, 61, \"middle age\", \"middle\"], [100, \"Male\", 20, 61, \"young adult\", \"middle\"], [103, \"Male\", 67, 62, \"senior adult\", \"middle\"], [104, \"Male\", 26, 62, \"young adult\", \"middle\"], [105, \"Male\", 49, 62, \"middle age\", \"middle\"], [108, \"Male\", 54, 63, \"middle age\", \"middle\"], [109, \"Male\", 68, 63, \"senior adult\", \"middle\"], [110, \"Male\", 66, 63, \"senior adult\", \"middle\"], [111, \"Male\", 65, 63, \"senior adult\", \"middle\"], [114, \"Male\", 19, 64, \"young adult\", \"middle\"], [121, \"Male\", 27, 67, \"young adult\", \"middle\"], [124, \"Male\", 39, 69, \"middle age\", \"middle\"], [127, \"Male\", 43, 71, \"middle age\", \"middle\"], [128, \"Male\", 40, 71, \"middle age\", \"middle\"], [129, \"Male\", 59, 71, \"senior adult\", \"middle\"], [130, \"Male\", 38, 71, \"middle age\", \"middle\"], [131, \"Male\", 47, 71, \"middle age\", \"middle\"], [132, \"Male\", 39, 71, \"middle age\", \"middle\"], [135, \"Male\", 20, 73, \"young adult\", \"middle\"], [138, \"Male\", 32, 73, \"young adult\", \"middle\"], [139, \"Male\", 19, 74, \"young adult\", \"middle\"], [142, \"Male\", 32, 75, \"young adult\", \"middle\"], [145, \"Male\", 25, 77, \"young adult\", \"middle\"], [146, \"Male\", 28, 77, \"young adult\", \"middle\"], [147, \"Male\", 48, 77, \"middle age\", \"middle\"], [150, \"Male\", 34, 78, \"young adult\", \"middle\"], [151, \"Male\", 43, 78, \"middle age\", \"middle\"], [152, \"Male\", 39, 78, \"middle age\", \"middle\"], [157, \"Male\", 37, 78, \"middle age\", \"middle\"], [159, \"Male\", 34, 78, \"young adult\", \"middle\"], [163, \"Male\", 19, 81, \"young adult\", \"middle\"], [165, \"Male\", 50, 85, \"middle age\", \"middle\"], [167, \"Male\", 42, 86, \"middle age\", \"middle\"], [170, \"Male\", 32, 87, \"young adult\", \"middle\"], [171, \"Male\", 40, 87, \"middle age\", \"middle\"], [172, \"Male\", 28, 87, \"young adult\", \"middle\"], [173, \"Male\", 36, 87, \"middle age\", \"middle\"], [174, \"Male\", 36, 87, \"middle age\", \"middle\"], [177, \"Male\", 58, 88, \"senior adult\", \"middle\"], [178, \"Male\", 27, 88, \"young adult\", \"middle\"], [179, \"Male\", 59, 93, \"senior adult\", \"middle\"], [180, \"Male\", 35, 93, \"young adult\", \"middle\"], [183, \"Male\", 46, 98, \"middle age\", \"middle\"], [186, \"Male\", 30, 99, \"young adult\", \"middle\"], [188, \"Male\", 28, 101, \"young adult\", \"middle\"], [193, \"Male\", 33, 113, \"young adult\", \"upper middle\"], [198, \"Male\", 32, 126, \"young adult\", \"upper middle\"], [199, \"Male\", 32, 137, \"young adult\", \"upper middle\"], [200, \"Male\", 30, 137, \"young adult\", \"upper middle\"]], \"hovertemplate\": \"gender=%{customdata[1]}<br>spending_score=%{x}<br>cutomer_id=%{customdata[0]}<br>age=%{customdata[2]}<br>annual_income=%{customdata[3]}<br>age_cat=%{customdata[4]}<br>income_class=%{customdata[5]}<extra></extra>\", \"legendgroup\": \"Male\", \"marker\": {\"color\": \"#41d9b3\"}, \"name\": \"Male\", \"notched\": true, \"offsetgroup\": \"Male\", \"showlegend\": false, \"type\": \"box\", \"x\": [39, 81, 3, 14, 13, 79, 66, 29, 35, 73, 73, 82, 61, 4, 4, 92, 92, 36, 60, 60, 41, 46, 46, 56, 55, 51, 59, 59, 55, 47, 54, 48, 51, 55, 41, 46, 41, 49, 52, 42, 49, 59, 55, 56, 46, 43, 48, 52, 46, 56, 91, 35, 95, 11, 75, 9, 75, 5, 73, 10, 93, 12, 97, 36, 90, 17, 88, 1, 1, 5, 26, 20, 63, 13, 75, 10, 92, 15, 69, 14, 90, 15, 97, 68, 8, 74, 18, 83], \"xaxis\": \"x2\", \"yaxis\": \"y2\"}, {\"alignmentgroup\": \"True\", \"bingroup\": \"x\", \"hovertemplate\": \"gender=Female<br>spending_score=%{x}<br>count=%{y}<extra></extra>\", \"legendgroup\": \"Female\", \"marker\": {\"color\": \"#c73062\"}, \"name\": \"Female\", \"nbinsx\": 50, \"offsetgroup\": \"Female\", \"orientation\": \"v\", \"showlegend\": true, \"type\": \"histogram\", \"x\": [6, 77, 40, 76, 6, 94, 72, 99, 15, 77, 35, 98, 5, 14, 32, 31, 87, 73, 14, 81, 17, 73, 26, 75, 35, 61, 28, 65, 55, 47, 42, 42, 52, 54, 45, 50, 51, 52, 59, 50, 48, 47, 42, 49, 56, 53, 52, 42, 44, 57, 58, 55, 60, 46, 55, 40, 42, 47, 50, 41, 48, 42, 50, 54, 42, 48, 50, 43, 59, 43, 57, 40, 58, 29, 77, 34, 71, 88, 7, 72, 5, 40, 87, 74, 22, 20, 76, 16, 89, 78, 73, 35, 83, 93, 75, 95, 27, 13, 86, 32, 86, 88, 39, 24, 17, 85, 23, 69, 91, 16, 79, 28], \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"alignmentgroup\": \"True\", \"customdata\": [[3, \"Female\", 20, 16, \"young adult\", \"poor\"], [4, \"Female\", 23, 16, \"young adult\", \"poor\"], [5, \"Female\", 31, 17, \"young adult\", \"poor\"], [6, \"Female\", 22, 17, \"young adult\", \"poor\"], [7, \"Female\", 35, 18, \"young adult\", \"poor\"], [8, \"Female\", 23, 18, \"young adult\", \"poor\"], [10, \"Female\", 30, 19, \"young adult\", \"poor\"], [12, \"Female\", 35, 19, \"young adult\", \"poor\"], [13, \"Female\", 58, 20, \"senior adult\", \"poor\"], [14, \"Female\", 24, 20, \"young adult\", \"poor\"], [17, \"Female\", 35, 21, \"young adult\", \"poor\"], [20, \"Female\", 35, 23, \"young adult\", \"poor\"], [23, \"Female\", 46, 25, \"middle age\", \"poor\"], [25, \"Female\", 54, 28, \"middle age\", \"poor\"], [27, \"Female\", 45, 28, \"middle age\", \"poor\"], [29, \"Female\", 40, 29, \"middle age\", \"poor\"], [30, \"Female\", 23, 29, \"young adult\", \"poor\"], [32, \"Female\", 21, 30, \"young adult\", \"poor\"], [35, \"Female\", 49, 33, \"middle age\", \"lower middle\"], [36, \"Female\", 21, 33, \"young adult\", \"lower middle\"], [37, \"Female\", 42, 34, \"middle age\", \"lower middle\"], [38, \"Female\", 30, 34, \"young adult\", \"lower middle\"], [39, \"Female\", 36, 37, \"middle age\", \"lower middle\"], [40, \"Female\", 20, 37, \"young adult\", \"lower middle\"], [41, \"Female\", 65, 38, \"senior adult\", \"lower middle\"], [44, \"Female\", 31, 39, \"young adult\", \"lower middle\"], [45, \"Female\", 49, 39, \"middle age\", \"lower middle\"], [46, \"Female\", 24, 39, \"young adult\", \"lower middle\"], [47, \"Female\", 50, 40, \"middle age\", \"lower middle\"], [48, \"Female\", 27, 40, \"young adult\", \"lower middle\"], [49, \"Female\", 29, 40, \"young adult\", \"lower middle\"], [50, \"Female\", 31, 40, \"young adult\", \"lower middle\"], [51, \"Female\", 49, 42, \"middle age\", \"lower middle\"], [53, \"Female\", 31, 43, \"young adult\", \"lower middle\"], [55, \"Female\", 50, 43, \"middle age\", \"lower middle\"], [57, \"Female\", 51, 44, \"middle age\", \"lower middle\"], [59, \"Female\", 27, 46, \"young adult\", \"lower middle\"], [63, \"Female\", 67, 47, \"senior adult\", \"lower middle\"], [64, \"Female\", 54, 47, \"middle age\", \"lower middle\"], [67, \"Female\", 43, 48, \"middle age\", \"lower middle\"], [68, \"Female\", 68, 48, \"senior adult\", \"lower middle\"], [70, \"Female\", 32, 48, \"young adult\", \"lower middle\"], [72, \"Female\", 47, 49, \"middle age\", \"lower middle\"], [73, \"Female\", 60, 50, \"senior adult\", \"lower middle\"], [74, \"Female\", 60, 50, \"senior adult\", \"lower middle\"], [77, \"Female\", 45, 54, \"middle age\", \"lower middle\"], [79, \"Female\", 23, 54, \"young adult\", \"lower middle\"], [80, \"Female\", 49, 54, \"middle age\", \"lower middle\"], [84, \"Female\", 46, 54, \"middle age\", \"lower middle\"], [85, \"Female\", 21, 54, \"young adult\", \"lower middle\"], [87, \"Female\", 55, 57, \"middle age\", \"middle\"], [88, \"Female\", 22, 57, \"young adult\", \"middle\"], [89, \"Female\", 34, 58, \"young adult\", \"middle\"], [90, \"Female\", 50, 58, \"middle age\", \"middle\"], [91, \"Female\", 68, 59, \"senior adult\", \"middle\"], [94, \"Female\", 40, 60, \"middle age\", \"middle\"], [95, \"Female\", 32, 60, \"young adult\", \"middle\"], [97, \"Female\", 47, 60, \"middle age\", \"middle\"], [98, \"Female\", 27, 60, \"young adult\", \"middle\"], [101, \"Female\", 23, 62, \"young adult\", \"middle\"], [102, \"Female\", 49, 62, \"middle age\", \"middle\"], [106, \"Female\", 21, 62, \"young adult\", \"middle\"], [107, \"Female\", 66, 63, \"senior adult\", \"middle\"], [112, \"Female\", 19, 63, \"young adult\", \"middle\"], [113, \"Female\", 38, 64, \"middle age\", \"middle\"], [115, \"Female\", 18, 65, \"young adult\", \"middle\"], [116, \"Female\", 19, 65, \"young adult\", \"middle\"], [117, \"Female\", 63, 65, \"senior adult\", \"middle\"], [118, \"Female\", 49, 65, \"middle age\", \"middle\"], [119, \"Female\", 51, 67, \"middle age\", \"middle\"], [120, \"Female\", 50, 67, \"middle age\", \"middle\"], [122, \"Female\", 38, 67, \"middle age\", \"middle\"], [123, \"Female\", 40, 69, \"middle age\", \"middle\"], [125, \"Female\", 23, 70, \"young adult\", \"middle\"], [126, \"Female\", 31, 70, \"young adult\", \"middle\"], [133, \"Female\", 25, 72, \"young adult\", \"middle\"], [134, \"Female\", 31, 72, \"young adult\", \"middle\"], [136, \"Female\", 29, 73, \"young adult\", \"middle\"], [137, \"Female\", 44, 73, \"middle age\", \"middle\"], [140, \"Female\", 35, 74, \"young adult\", \"middle\"], [141, \"Female\", 57, 75, \"senior adult\", \"middle\"], [143, \"Female\", 28, 76, \"young adult\", \"middle\"], [144, \"Female\", 32, 76, \"young adult\", \"middle\"], [148, \"Female\", 32, 77, \"young adult\", \"middle\"], [149, \"Female\", 34, 78, \"young adult\", \"middle\"], [153, \"Female\", 44, 78, \"middle age\", \"middle\"], [154, \"Female\", 38, 78, \"middle age\", \"middle\"], [155, \"Female\", 47, 78, \"middle age\", \"middle\"], [156, \"Female\", 27, 78, \"young adult\", \"middle\"], [158, \"Female\", 30, 78, \"young adult\", \"middle\"], [160, \"Female\", 30, 78, \"young adult\", \"middle\"], [161, \"Female\", 56, 79, \"senior adult\", \"middle\"], [162, \"Female\", 29, 79, \"young adult\", \"middle\"], [164, \"Female\", 31, 81, \"young adult\", \"middle\"], [166, \"Female\", 36, 85, \"middle age\", \"middle\"], [168, \"Female\", 33, 86, \"young adult\", \"middle\"], [169, \"Female\", 36, 87, \"middle age\", \"middle\"], [175, \"Female\", 52, 88, \"middle age\", \"middle\"], [176, \"Female\", 30, 88, \"young adult\", \"middle\"], [181, \"Female\", 37, 97, \"middle age\", \"middle\"], [182, \"Female\", 32, 97, \"young adult\", \"middle\"], [184, \"Female\", 29, 98, \"young adult\", \"middle\"], [185, \"Female\", 41, 99, \"middle age\", \"middle\"], [187, \"Female\", 54, 101, \"middle age\", \"middle\"], [189, \"Female\", 41, 103, \"middle age\", \"middle\"], [190, \"Female\", 36, 103, \"middle age\", \"middle\"], [191, \"Female\", 34, 103, \"young adult\", \"middle\"], [192, \"Female\", 32, 103, \"young adult\", \"middle\"], [194, \"Female\", 38, 113, \"middle age\", \"upper middle\"], [195, \"Female\", 47, 120, \"middle age\", \"upper middle\"], [196, \"Female\", 35, 120, \"young adult\", \"upper middle\"], [197, \"Female\", 45, 126, \"middle age\", \"upper middle\"]], \"hovertemplate\": \"gender=%{customdata[1]}<br>spending_score=%{x}<br>cutomer_id=%{customdata[0]}<br>age=%{customdata[2]}<br>annual_income=%{customdata[3]}<br>age_cat=%{customdata[4]}<br>income_class=%{customdata[5]}<extra></extra>\", \"legendgroup\": \"Female\", \"marker\": {\"color\": \"#c73062\"}, \"name\": \"Female\", \"notched\": true, \"offsetgroup\": \"Female\", \"showlegend\": false, \"type\": \"box\", \"x\": [6, 77, 40, 76, 6, 94, 72, 99, 15, 77, 35, 98, 5, 14, 32, 31, 87, 73, 14, 81, 17, 73, 26, 75, 35, 61, 28, 65, 55, 47, 42, 42, 52, 54, 45, 50, 51, 52, 59, 50, 48, 47, 42, 49, 56, 53, 52, 42, 44, 57, 58, 55, 60, 46, 55, 40, 42, 47, 50, 41, 48, 42, 50, 54, 42, 48, 50, 43, 59, 43, 57, 40, 58, 29, 77, 34, 71, 88, 7, 72, 5, 40, 87, 74, 22, 20, 76, 16, 89, 78, 73, 35, 83, 93, 75, 95, 27, 13, 86, 32, 86, 88, 39, 24, 17, 85, 23, 69, 91, 16, 79, 28], \"xaxis\": \"x2\", \"yaxis\": \"y2\"}], {\"barmode\": \"relative\", \"legend\": {\"title\": {\"text\": \"gender\"}, \"tracegroupgap\": 0}, \"margin\": {\"t\": 60}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"spending_score\"}}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0], \"matches\": \"x\", \"showgrid\": true, \"showticklabels\": false}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.0, 0.7326], \"title\": {\"text\": \"count\"}}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.7426, 1.0], \"matches\": \"y2\", \"showgrid\": false, \"showline\": false, \"showticklabels\": false, \"ticks\": \"\"}}, {\"responsive\": true} ).then(function(){\n \nvar gd = document.getElementById('f1889d45-16a4-462c-9d3b-553d7788e5be');\nvar x = new MutationObserver(function (mutations, observer) {{\n var display = window.getComputedStyle(gd).display;\n if (!display || display === 'none') {{\n console.log([gd, 'removed!']);\n Plotly.purge(gd);\n observer.disconnect();\n }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n x.observe(outputEl, {childList: true});\n}}\n\n }) }; }); </script> </div>"},"metadata":{}}]},{"metadata":{"trusted":true},"cell_type":"code","source":"fig = make_subplots(rows=2, cols=2, \n specs=[[{\"type\": \"xy\"}, {\"type\": \"domain\"}], \n [{\"type\": \"xy\"}, {\"type\": \"domain\"}]], \n subplot_titles=(\"Spending Score Sums\", \"Spending Score Sum Percentages\",\n \"Spending Score Averages\", \"Spending Score Avg Percentages\"))\n\n\nbar_colors=['#c73062','#41d9b3']\npie_colors=['#c73062','#41d9b3']\n\nfig.add_trace(go.Bar(x=gender_spend_sum['gender'], \n y=gender_spend_sum['spending_score'],\n text=gender_spend_sum['spending_score'],\n textposition = 'auto',\n name='Spending Score Sums',\n opacity = 0.8, \n marker=dict(color=bar_colors, line=dict(color='#000000',width=1))), row=1, col=1)\n\nfig.add_trace(go.Bar(x=gender_spend_avg['gender'], \n y=gender_spend_avg['spending_score'],\n text=gender_spend_avg['spending_score'].round(2),\n textposition = 'auto',\n name='Spending Score Averages',\n opacity = 0.8, \n marker=dict(color=bar_colors, line=dict(color='#000000',width=1))), row=2, col=1)\n\nfig.add_trace(go.Pie(labels=gender_spend_sum['gender'], \n values=gender_spend_sum['spending_score'],\n textfont=dict(size=15), opacity = 0.8,\n hole = 0.5, \n hoverinfo = \"label+percent+name\",\n domain = dict(x = [.0,.48]),\n name = \"Spending Score Sum Percent\",\n marker = dict(colors = pie_colors, line = dict(width = 1.5))), \n row=1, col=2)\n\nfig.add_trace(go.Pie(labels=gender_spend_avg['gender'], \n values=gender_spend_avg['spending_score'],\n textfont=dict(size=15), opacity = 0.8,\n hole = 0.5, \n hoverinfo = \"label+percent+name\",\n domain = dict(x = [.0,.48]),\n name = \"Spending Score Avg Percent\",\n marker = dict(colors = pie_colors, line = dict(width = 1.5))), \n row=2, col=2)\n\nfig.update_layout(height=800, showlegend=True)\n\nfig.show()","execution_count":30,"outputs":[{"output_type":"display_data","data":{"text/html":"<div> <div id=\"87995ece-bf53-453e-b734-866a9af72028\" class=\"plotly-graph-div\" style=\"height:800px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"87995ece-bf53-453e-b734-866a9af72028\")) { Plotly.newPlot( \"87995ece-bf53-453e-b734-866a9af72028\", [{\"marker\": {\"color\": [\"#c73062\", \"#41d9b3\"], \"line\": {\"color\": \"#000000\", \"width\": 1}}, \"name\": \"Spending Score Sums\", \"opacity\": 0.8, \"text\": [5771.0, 4269.0], \"textposition\": \"auto\", \"type\": \"bar\", \"x\": [\"Female\", \"Male\"], \"xaxis\": \"x\", \"y\": [5771, 4269], \"yaxis\": \"y\"}, {\"marker\": {\"color\": [\"#c73062\", \"#41d9b3\"], \"line\": {\"color\": \"#000000\", \"width\": 1}}, \"name\": \"Spending Score Averages\", \"opacity\": 0.8, \"text\": [51.53, 48.51], \"textposition\": \"auto\", \"type\": \"bar\", \"x\": [\"Female\", \"Male\"], \"xaxis\": \"x2\", \"y\": [51.526785714285715, 48.51136363636363], \"yaxis\": \"y2\"}, {\"domain\": {\"x\": [0.55, 1.0], \"y\": [0.625, 1.0]}, \"hole\": 0.5, \"hoverinfo\": \"label+percent+name\", \"labels\": [\"Female\", \"Male\"], \"marker\": {\"colors\": [\"#c73062\", \"#41d9b3\"], \"line\": {\"width\": 1.5}}, \"name\": \"Spending Score Sum Percent\", \"opacity\": 0.8, \"textfont\": {\"size\": 15}, \"type\": \"pie\", \"values\": [5771, 4269]}, {\"domain\": {\"x\": [0.55, 1.0], \"y\": [0.0, 0.375]}, \"hole\": 0.5, \"hoverinfo\": \"label+percent+name\", \"labels\": [\"Female\", \"Male\"], \"marker\": {\"colors\": [\"#c73062\", \"#41d9b3\"], \"line\": {\"width\": 1.5}}, \"name\": \"Spending Score Avg Percent\", \"opacity\": 0.8, \"textfont\": {\"size\": 15}, \"type\": \"pie\", \"values\": [51.526785714285715, 48.51136363636363]}], {\"annotations\": [{\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Spending Score Sums\", \"x\": 0.225, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 1.0, \"yanchor\": \"bottom\", \"yref\": \"paper\"}, {\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Spending Score Sum Percentages\", \"x\": 0.775, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 1.0, \"yanchor\": \"bottom\", \"yref\": \"paper\"}, {\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Spending Score Averages\", \"x\": 0.225, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 0.375, \"yanchor\": \"bottom\", \"yref\": \"paper\"}, {\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Spending Score Avg Percentages\", \"x\": 0.775, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 0.375, \"yanchor\": \"bottom\", \"yref\": \"paper\"}], \"height\": 800, \"showlegend\": true, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 0.45]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 0.45]}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.625, 1.0]}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.375]}}, {\"responsive\": true} ).then(function(){\n \nvar gd = document.getElementById('87995ece-bf53-453e-b734-866a9af72028');\nvar x = new MutationObserver(function (mutations, observer) {{\n var display = window.getComputedStyle(gd).display;\n if (!display || display === 'none') {{\n console.log([gd, 'removed!']);\n Plotly.purge(gd);\n observer.disconnect();\n }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n x.observe(outputEl, {childList: true});\n}}\n\n }) }; }); </script> </div>"},"metadata":{}}]},{"metadata":{},"cell_type":"markdown","source":"### SPENDING SCORE SUMS AND PERCENTAGES BY GENDER & AGE CATEGORY"},{"metadata":{"trusted":true},"cell_type":"code","source":"f_age_spend = gender_age_spend.loc[gender_age_spend['gender'] == 'Female']\nm_age_spend = gender_age_spend.loc[gender_age_spend['gender'] == 'Male']\n\nfig = make_subplots(rows=2, cols=2, \n specs=[[{\"type\": \"xy\"}, {\"type\": \"domain\"}], \n [{\"type\": \"xy\"}, {\"type\": \"domain\"}]], \n subplot_titles=(\"Female Spending Score Sums\", \"Female Spending Score Percentages\",\n \"Male Spending Score Sums\", \"Male Spending Score Percentages\"))\n\nf_bar_colors=['#ff4d94','#cc0245', '#912a53']\nm_bar_colors=['#6ecaff','#0687d1', '#0e5680']\nf_pie_colors=['#ff4d94','#cc0245', '#912a53']\nm_pie_colors=['#6ecaff','#0687d1', '#0e5680']\n\nfig.add_trace(go.Bar(x=f_age_spend['age_cat'], \n y=f_age_spend['spending_score'],\n text=f_age_spend['spending_score'],\n textposition = 'auto',\n name='Female Spending Score Sums',\n opacity = 0.8, \n marker=dict(color=f_bar_colors, line=dict(color='#000000',width=1))), row=1, col=1)\n\nfig.add_trace(go.Bar(x=m_age_spend['age_cat'], \n y=m_age_spend['spending_score'],\n text=m_age_spend['spending_score'],\n textposition = 'auto',\n name='Male Spending Score Sums',\n opacity = 0.8, \n marker=dict(color=m_bar_colors, line=dict(color='#000000',width=1))), row=2, col=1)\n\nfig.add_trace(go.Pie(labels=f_age_spend['age_cat'], \n values=f_age_spend['spending_score'],\n textfont=dict(size=15), opacity = 0.8,\n hole = 0.5, \n hoverinfo = \"label+percent+name\",\n domain = dict(x = [.0,.48]),\n name = \"Female Spending Score Percent\",\n marker = dict(colors = f_pie_colors, line = dict(width = 1.5))), \n row=1, col=2)\n\nfig.add_trace(go.Pie(labels=m_age_spend['age_cat'], \n values=m_age_spend['spending_score'],\n textfont=dict(size=15), opacity = 0.8,\n hole = 0.5, \n hoverinfo = \"label+percent+name\",\n domain = dict(x = [.0,.48]),\n name = \"Male Spending Score Percent\",\n marker = dict(colors = m_pie_colors, line = dict(width = 1.5))), \n row=2, col=2)\n\nfig.update_layout(height=800, showlegend=True)\n\nfig.show()","execution_count":29,"outputs":[{"output_type":"display_data","data":{"text/html":"<div> <div id=\"18e172be-1d66-4b0d-8290-74cb1dad4ad5\" class=\"plotly-graph-div\" style=\"height:800px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"18e172be-1d66-4b0d-8290-74cb1dad4ad5\")) { Plotly.newPlot( \"18e172be-1d66-4b0d-8290-74cb1dad4ad5\", [{\"marker\": {\"color\": [\"#ff4d94\", \"#cc0245\", \"#912a53\"], \"line\": {\"color\": \"#000000\", \"width\": 1}}, \"name\": \"Female Spending Score Sums\", \"opacity\": 0.8, \"text\": [3565.0, 1763.0, 443.0], \"textposition\": \"auto\", \"type\": \"bar\", \"x\": [\"young adult\", \"middle age\", \"senior adult\"], \"xaxis\": \"x\", \"y\": [3565, 1763, 443], \"yaxis\": \"y\"}, {\"marker\": {\"color\": [\"#6ecaff\", \"#0687d1\", \"#0e5680\"], \"line\": {\"color\": \"#000000\", \"width\": 1}}, \"name\": \"Male Spending Score Sums\", \"opacity\": 0.8, \"text\": [2390.0, 1209.0, 670.0], \"textposition\": \"auto\", \"type\": \"bar\", \"x\": [\"young adult\", \"middle age\", \"senior adult\"], \"xaxis\": \"x2\", \"y\": [2390, 1209, 670], \"yaxis\": \"y2\"}, {\"domain\": {\"x\": [0.55, 1.0], \"y\": [0.625, 1.0]}, \"hole\": 0.5, \"hoverinfo\": \"label+percent+name\", \"labels\": [\"young adult\", \"middle age\", \"senior adult\"], \"marker\": {\"colors\": [\"#ff4d94\", \"#cc0245\", \"#912a53\"], \"line\": {\"width\": 1.5}}, \"name\": \"Female Spending Score Percent\", \"opacity\": 0.8, \"textfont\": {\"size\": 15}, \"type\": \"pie\", \"values\": [3565, 1763, 443]}, {\"domain\": {\"x\": [0.55, 1.0], \"y\": [0.0, 0.375]}, \"hole\": 0.5, \"hoverinfo\": \"label+percent+name\", \"labels\": [\"young adult\", \"middle age\", \"senior adult\"], \"marker\": {\"colors\": [\"#6ecaff\", \"#0687d1\", \"#0e5680\"], \"line\": {\"width\": 1.5}}, \"name\": \"Male Spending Score Percent\", \"opacity\": 0.8, \"textfont\": {\"size\": 15}, \"type\": \"pie\", \"values\": [2390, 1209, 670]}], {\"annotations\": [{\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Female Spending Score Sums\", \"x\": 0.225, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 1.0, \"yanchor\": \"bottom\", \"yref\": \"paper\"}, {\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Female Spending Score Percentages\", \"x\": 0.775, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 1.0, \"yanchor\": \"bottom\", \"yref\": \"paper\"}, {\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Male Spending Score Sums\", \"x\": 0.225, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 0.375, \"yanchor\": \"bottom\", \"yref\": \"paper\"}, {\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Male Spending Score Percentages\", \"x\": 0.775, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 0.375, \"yanchor\": \"bottom\", \"yref\": \"paper\"}], \"height\": 800, \"showlegend\": true, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 0.45]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 0.45]}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.625, 1.0]}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.375]}}, {\"responsive\": true} ).then(function(){\n \nvar gd = document.getElementById('18e172be-1d66-4b0d-8290-74cb1dad4ad5');\nvar x = new MutationObserver(function (mutations, observer) {{\n var display = window.getComputedStyle(gd).display;\n if (!display || display === 'none') {{\n console.log([gd, 'removed!']);\n Plotly.purge(gd);\n observer.disconnect();\n }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n x.observe(outputEl, {childList: true});\n}}\n\n }) }; }); </script> </div>"},"metadata":{}}]},{"metadata":{},"cell_type":"markdown","source":"### SPENDING SCORE VS AGE"},{"metadata":{"trusted":true},"cell_type":"code","source":"fig = px.scatter(df, x=\"spending_score\", y=\"age\", color='gender')\nfig.show()","execution_count":20,"outputs":[{"output_type":"display_data","data":{"text/html":"<div> <div id=\"94eaba74-23f1-44be-b226-95d64698f294\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"94eaba74-23f1-44be-b226-95d64698f294\")) { Plotly.newPlot( \"94eaba74-23f1-44be-b226-95d64698f294\", [{\"hovertemplate\": \"gender=Male<br>spending_score=%{x}<br>age=%{y}<extra></extra>\", \"legendgroup\": \"Male\", \"marker\": {\"color\": \"#636efa\", \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"Male\", \"orientation\": \"v\", \"showlegend\": true, \"type\": \"scatter\", \"x\": [39, 81, 3, 14, 13, 79, 66, 29, 35, 73, 73, 82, 61, 4, 4, 92, 92, 36, 60, 60, 41, 46, 46, 56, 55, 51, 59, 59, 55, 47, 54, 48, 51, 55, 41, 46, 41, 49, 52, 42, 49, 59, 55, 56, 46, 43, 48, 52, 46, 56, 91, 35, 95, 11, 75, 9, 75, 5, 73, 10, 93, 12, 97, 36, 90, 17, 88, 1, 1, 5, 26, 20, 63, 13, 75, 10, 92, 15, 69, 14, 90, 15, 97, 68, 8, 74, 18, 83], \"xaxis\": \"x\", \"y\": [19, 21, 64, 67, 37, 22, 20, 52, 35, 25, 31, 29, 35, 60, 53, 18, 24, 48, 33, 59, 47, 69, 53, 70, 19, 63, 18, 19, 70, 59, 26, 40, 57, 38, 67, 48, 18, 48, 24, 48, 20, 67, 26, 49, 54, 68, 66, 65, 19, 27, 39, 43, 40, 59, 38, 47, 39, 20, 32, 19, 32, 25, 28, 48, 34, 43, 39, 37, 34, 19, 50, 42, 32, 40, 28, 36, 36, 58, 27, 59, 35, 46, 30, 28, 33, 32, 32, 30], \"yaxis\": \"y\"}, {\"hovertemplate\": \"gender=Female<br>spending_score=%{x}<br>age=%{y}<extra></extra>\", \"legendgroup\": \"Female\", \"marker\": {\"color\": \"#EF553B\", \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"Female\", \"orientation\": \"v\", \"showlegend\": true, \"type\": \"scatter\", \"x\": [6, 77, 40, 76, 6, 94, 72, 99, 15, 77, 35, 98, 5, 14, 32, 31, 87, 73, 14, 81, 17, 73, 26, 75, 35, 61, 28, 65, 55, 47, 42, 42, 52, 54, 45, 50, 51, 52, 59, 50, 48, 47, 42, 49, 56, 53, 52, 42, 44, 57, 58, 55, 60, 46, 55, 40, 42, 47, 50, 41, 48, 42, 50, 54, 42, 48, 50, 43, 59, 43, 57, 40, 58, 29, 77, 34, 71, 88, 7, 72, 5, 40, 87, 74, 22, 20, 76, 16, 89, 78, 73, 35, 83, 93, 75, 95, 27, 13, 86, 32, 86, 88, 39, 24, 17, 85, 23, 69, 91, 16, 79, 28], \"xaxis\": \"x\", \"y\": [20, 23, 31, 22, 35, 23, 30, 35, 58, 24, 35, 35, 46, 54, 45, 40, 23, 21, 49, 21, 42, 30, 36, 20, 65, 31, 49, 24, 50, 27, 29, 31, 49, 31, 50, 51, 27, 67, 54, 43, 68, 32, 47, 60, 60, 45, 23, 49, 46, 21, 55, 22, 34, 50, 68, 40, 32, 47, 27, 23, 49, 21, 66, 19, 38, 18, 19, 63, 49, 51, 50, 38, 40, 23, 31, 25, 31, 29, 44, 35, 57, 28, 32, 32, 34, 44, 38, 47, 27, 30, 30, 56, 29, 31, 36, 33, 36, 52, 30, 37, 32, 29, 41, 54, 41, 36, 34, 32, 38, 47, 35, 45], \"yaxis\": \"y\"}], {\"legend\": {\"title\": {\"text\": \"gender\"}, \"tracegroupgap\": 0}, \"margin\": {\"t\": 60}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"spending_score\"}}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"age\"}}}, {\"responsive\": true} ).then(function(){\n \nvar gd = document.getElementById('94eaba74-23f1-44be-b226-95d64698f294');\nvar x = new MutationObserver(function (mutations, observer) {{\n var display = window.getComputedStyle(gd).display;\n if (!display || display === 'none') {{\n console.log([gd, 'removed!']);\n Plotly.purge(gd);\n observer.disconnect();\n }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n x.observe(outputEl, {childList: true});\n}}\n\n }) }; }); </script> </div>"},"metadata":{}}]},{"metadata":{"trusted":true},"cell_type":"code","source":"spending_y = df[['spending_score']].loc[df['age_cat'] == 'young adult']\nspending_m = df[['spending_score']].loc[df['age_cat'] == 'middle age']\nspending_s = df[['spending_score']].loc[df['age_cat'] == 'senior adult']\n\nyoung = spending_y['spending_score']\nmiddle = spending_m['spending_score']\nsenior = spending_s['spending_score']\n \nhist_data = [young, middle, senior]\n \ngroup_labels = ['young adult', 'middle age', 'senior adult']\ncolors = ['#e8b920','#2aa8a8', '#e8204b']\n\nfig = ff.create_distplot(hist_data, group_labels, colors = colors, show_hist = True, bin_size = 0, curve_type='kde')\n \nfig['layout'].update(title = 'SPENDING SCORE x AGE CATEGORY')\n\nfig.show()\n\n# py.iplot(fig, filename = 'Density plot')","execution_count":21,"outputs":[{"output_type":"display_data","data":{"text/html":"<div> <div id=\"96317230-8dcd-43cc-91f1-6386241b296f\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"96317230-8dcd-43cc-91f1-6386241b296f\")) { Plotly.newPlot( \"96317230-8dcd-43cc-91f1-6386241b296f\", [{\"autobinx\": false, \"histnorm\": \"probability density\", \"legendgroup\": \"young adult\", \"marker\": {\"color\": \"#e8b920\"}, \"name\": \"young adult\", \"opacity\": 0.7, \"type\": \"histogram\", \"x\": [39, 81, 6, 77, 40, 76, 6, 94, 72, 99, 77, 79, 35, 66, 98, 35, 73, 73, 82, 61, 87, 73, 92, 81, 73, 75, 92, 61, 65, 47, 42, 42, 60, 54, 51, 55, 59, 59, 47, 54, 52, 57, 55, 60, 41, 42, 52, 50, 49, 41, 55, 42, 54, 46, 48, 50, 56, 29, 77, 34, 71, 5, 88, 73, 10, 72, 93, 40, 87, 12, 97, 74, 22, 90, 89, 78, 1, 73, 83, 5, 93, 95, 63, 75, 86, 69, 90, 86, 88, 97, 68, 23, 69, 8, 79, 74, 18, 83], \"xaxis\": \"x\", \"xbins\": {\"end\": 99.0, \"size\": 0, \"start\": 1.0}, \"yaxis\": \"y\"}, {\"autobinx\": false, \"histnorm\": \"probability density\", \"legendgroup\": \"middle age\", \"marker\": {\"color\": \"#2aa8a8\"}, \"name\": \"middle age\", \"opacity\": 0.7, \"type\": \"histogram\", \"x\": [13, 29, 5, 14, 32, 31, 4, 14, 17, 26, 36, 28, 55, 52, 45, 41, 50, 46, 59, 50, 42, 53, 48, 42, 55, 44, 46, 58, 46, 49, 40, 47, 42, 48, 56, 46, 42, 59, 43, 57, 40, 58, 91, 35, 95, 75, 9, 75, 7, 36, 17, 88, 20, 76, 16, 1, 26, 75, 20, 27, 13, 10, 92, 13, 32, 15, 39, 24, 17, 85, 91, 16, 28], \"xaxis\": \"x\", \"xbins\": {\"end\": 95.0, \"size\": 0, \"start\": 1.0}, \"yaxis\": \"y\"}, {\"autobinx\": false, \"histnorm\": \"probability density\", \"legendgroup\": \"senior adult\", \"marker\": {\"color\": \"#e8204b\"}, \"name\": \"senior adult\", \"opacity\": 0.7, \"type\": \"histogram\", \"x\": [3, 14, 15, 4, 35, 60, 46, 56, 52, 51, 48, 55, 49, 56, 47, 51, 41, 55, 59, 50, 43, 48, 52, 43, 11, 5, 35, 15, 14], \"xaxis\": \"x\", \"xbins\": {\"end\": 60.0, \"size\": 0, \"start\": 3.0}, \"yaxis\": \"y\"}, {\"legendgroup\": \"young adult\", \"marker\": {\"color\": \"#e8b920\"}, \"mode\": \"lines\", \"name\": \"young adult\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [1.0, 1.196, 1.392, 1.588, 1.784, 1.98, 2.176, 2.372, 2.568, 2.7640000000000002, 2.96, 3.156, 3.352, 3.548, 3.744, 3.94, 4.136, 4.332, 4.5280000000000005, 4.724, 4.92, 5.116, 5.312, 5.508, 5.704, 5.9, 6.096, 6.292, 6.488, 6.684, 6.88, 7.076, 7.272, 7.468, 7.664, 7.86, 8.056000000000001, 8.251999999999999, 8.448, 8.644, 8.84, 9.036, 9.232, 9.428, 9.624, 9.82, 10.016, 10.212, 10.408, 10.604, 10.8, 10.996, 11.192, 11.388, 11.584, 11.78, 11.976, 12.172, 12.368, 12.564, 12.76, 12.956, 13.152, 13.348, 13.544, 13.74, 13.936, 14.132, 14.328, 14.524, 14.72, 14.916, 15.112, 15.308, 15.504, 15.7, 15.896, 16.092, 16.288, 16.484, 16.68, 16.875999999999998, 17.072, 17.268, 17.464, 17.66, 17.856, 18.052, 18.248, 18.444, 18.64, 18.836, 19.032, 19.228, 19.424, 19.62, 19.816, 20.012, 20.208, 20.404, 20.6, 20.796, 20.992, 21.188, 21.384, 21.58, 21.776, 21.972, 22.168, 22.364, 22.56, 22.756, 22.952, 23.148, 23.344, 23.54, 23.736, 23.932, 24.128, 24.324, 24.52, 24.716, 24.912, 25.108, 25.304, 25.5, 25.696, 25.892, 26.088, 26.284, 26.48, 26.676, 26.872, 27.068, 27.264, 27.46, 27.656, 27.852, 28.048, 28.244, 28.44, 28.636, 28.832, 29.028, 29.224, 29.42, 29.616, 29.812, 30.008, 30.204, 30.4, 30.596, 30.792, 30.988, 31.184, 31.38, 31.576, 31.772, 31.968, 32.164, 32.36, 32.556, 32.751999999999995, 32.948, 33.144, 33.34, 33.536, 33.732, 33.928, 34.124, 34.32, 34.516, 34.712, 34.908, 35.104, 35.3, 35.496, 35.692, 35.888, 36.084, 36.28, 36.476, 36.672, 36.868, 37.064, 37.26, 37.456, 37.652, 37.848, 38.044, 38.24, 38.436, 38.632, 38.828, 39.024, 39.22, 39.416, 39.612, 39.808, 40.004, 40.2, 40.396, 40.592, 40.788, 40.984, 41.18, 41.376, 41.572, 41.768, 41.964, 42.16, 42.356, 42.552, 42.748, 42.944, 43.14, 43.336, 43.532, 43.728, 43.924, 44.12, 44.316, 44.512, 44.708, 44.904, 45.1, 45.296, 45.492, 45.688, 45.884, 46.08, 46.276, 46.472, 46.668, 46.864, 47.06, 47.256, 47.452, 47.648, 47.844, 48.04, 48.236, 48.432, 48.628, 48.824, 49.02, 49.216, 49.412, 49.608, 49.804, 50.0, 50.196, 50.392, 50.588, 50.784, 50.98, 51.176, 51.372, 51.568, 51.764, 51.96, 52.156, 52.352, 52.548, 52.744, 52.94, 53.136, 53.332, 53.528, 53.724, 53.92, 54.116, 54.312, 54.508, 54.704, 54.9, 55.096, 55.292, 55.488, 55.684, 55.88, 56.076, 56.272, 56.468, 56.664, 56.86, 57.056, 57.252, 57.448, 57.644, 57.84, 58.036, 58.232, 58.428, 58.624, 58.82, 59.016, 59.212, 59.408, 59.604, 59.8, 59.996, 60.192, 60.388, 60.584, 60.78, 60.976, 61.172, 61.368, 61.564, 61.76, 61.956, 62.152, 62.348, 62.544, 62.74, 62.936, 63.132, 63.328, 63.524, 63.72, 63.916, 64.112, 64.30799999999999, 64.50399999999999, 64.7, 64.896, 65.092, 65.288, 65.484, 65.68, 65.876, 66.072, 66.268, 66.464, 66.66, 66.856, 67.052, 67.248, 67.444, 67.64, 67.836, 68.032, 68.228, 68.424, 68.62, 68.816, 69.012, 69.208, 69.404, 69.6, 69.796, 69.992, 70.188, 70.384, 70.58, 70.776, 70.972, 71.168, 71.364, 71.56, 71.756, 71.952, 72.148, 72.344, 72.54, 72.736, 72.932, 73.128, 73.324, 73.52, 73.716, 73.912, 74.108, 74.304, 74.5, 74.696, 74.892, 75.088, 75.284, 75.48, 75.676, 75.872, 76.068, 76.264, 76.46, 76.656, 76.852, 77.048, 77.244, 77.44, 77.636, 77.832, 78.028, 78.224, 78.42, 78.616, 78.812, 79.008, 79.204, 79.4, 79.596, 79.792, 79.988, 80.184, 80.38, 80.576, 80.772, 80.968, 81.164, 81.36, 81.556, 81.752, 81.948, 82.144, 82.34, 82.536, 82.732, 82.928, 83.124, 83.32, 83.516, 83.712, 83.908, 84.104, 84.3, 84.496, 84.692, 84.888, 85.084, 85.28, 85.476, 85.672, 85.868, 86.064, 86.26, 86.456, 86.652, 86.848, 87.044, 87.24, 87.436, 87.632, 87.828, 88.024, 88.22, 88.416, 88.612, 88.808, 89.004, 89.2, 89.396, 89.592, 89.788, 89.984, 90.18, 90.376, 90.572, 90.768, 90.964, 91.16, 91.356, 91.552, 91.748, 91.944, 92.14, 92.336, 92.532, 92.728, 92.924, 93.12, 93.316, 93.512, 93.708, 93.904, 94.1, 94.296, 94.492, 94.688, 94.884, 95.08, 95.276, 95.472, 95.668, 95.864, 96.06, 96.256, 96.452, 96.648, 96.844, 97.04, 97.236, 97.432, 97.628, 97.824, 98.02, 98.216, 98.412, 98.608, 98.804], \"xaxis\": \"x\", \"y\": [0.002873528296168999, 0.0029073071603300336, 0.002940629858964594, 0.0029734764174626335, 0.003005827339801899, 0.0030376636413794035, 0.0030689668812351697, 0.00309971919360005, 0.0031299033187006903, 0.0031595026327564057, 0.00318850117710447, 0.0032168836863923026, 0.003244635615777212, 0.0032717431670766382, 0.0032981933138144064, 0.003323973825111076, 0.003349073288369317, 0.0033734811307082413, 0.003397187639103538, 0.0034201839791936544, 0.003442462212715385, 0.0034640153135357767, 0.003484837182250641, 0.0035049226593235642, 0.0035242675367429545, 0.0035428685681782356, 0.0035607234776201453, 0.0035778309664936422, 0.003594190719235853, 0.0036098034073349977, 0.003624670691830191, 0.003638795224275445, 0.0036521806461750263, 0.0036648315869008377, 0.0036767536601059257, 0.00368795345865181, 0.003698438548070514, 0.0037082174585854966, 0.003717299675718839, 0.003725695629514902, 0.0037334166824136913, 0.003740475115809819, 0.0037468841153354875, 0.0037526577549084087, 0.0037578109795877845, 0.0037623595872835333, 0.003766320209365859, 0.003769710290224037, 0.0037725480658246722, 0.003774852541321204, 0.003776643467767494, 0.003777941317989257, 0.003778767261667935, 0.0037791431396922183, 0.003779091437832649, 0.0037786352597951453, 0.0037777982997091106, 0.0037766048141057596, 0.0037750795934418744, 0.0037732479332236706, 0.00377113560478485, 0.003768768825771962, 0.003766174230389272, 0.003763378839454192, 0.003760410030312958, 0.00375729550666499, 0.0037540632683426703, 0.0037507415810917725, 0.003747358946395966, 0.0037439440713870685, 0.0037405258388807277, 0.00373713327757535, 0.0037337955324499906, 0.003730541835394967, 0.003727401476106708, 0.0037244037732763785, 0.0037215780460996485, 0.00371895358613279, 0.003716559629518262, 0.0037144253296008027, 0.0037125797299529693, 0.0037110517378271105, 0.003709870098048734, 0.003709063367364313, 0.0037086598892548143, 0.003708687769224362, 0.0037091748505718764, 0.003710148690651825, 0.0037116365376288524, 0.003713665307729547, 0.003716261562993419, 0.0037194514895239113, 0.003723260876239255, 0.0037277150941220256, 0.0037328390759653967, 0.003738657296613461, 0.003745193753692334, 0.0037524719488282944, 0.003760514869348907, 0.0037693449704628494, 0.003778984157913981, 0.003789453771105232, 0.0038007745666880635, 0.0038129667026132862, 0.0038260497226395014, 0.003840042541295737, 0.00385496342929532, 0.003870829999398672, 0.003887659192723239, 0.003905467265499577, 0.003924269776273284, 0.0039440815735533215, 0.0039649167839081205, 0.003986788800511711, 0.004009710272143064, 0.004033693092642707, 0.004058748390831653, 0.004084886520898541, 0.004112117053261869, 0.004140448765915021, 0.0041698896362627235, 0.0042004468334583215, 0.004232126711252106, 0.0042649348013616434, 0.004298875807375655, 0.004333953599203752, 0.0043701712080846805, 0.004407530822166339, 0.004446033782671101, 0.004485680580660279, 0.004526470854411825, 0.004568403387425264, 0.004611476107068147, 0.004655686083877832, 0.00470102953153251, 0.004747501807504884, 0.0047950974144115015, 0.004843810002070273, 0.0048936323702780385, 0.004944556472319225, 0.004996573419215952, 0.005049673484728868, 0.005103846111116995, 0.005159079915663782, 0.005215362697975317, 0.0052726814480553615, 0.0053310223551604995, 0.005390370817437293, 0.0054507114523418025, 0.005512028107840299, 0.005574303874388412, 0.0056375210976843115, 0.005701661392189863, 0.0057667056554119795, 0.005832634082934763, 0.0058994261841913255, 0.00596706079896227, 0.006035516114586555, 0.006104769683868324, 0.006174798443661993, 0.006245578734116172, 0.006317086318555363, 0.006389296403977094, 0.006462183662140589, 0.0065357222512216, 0.006609885838007115, 0.006684647620602067, 0.0067599803516193175, 0.006835856361823097, 0.006912247584195199, 0.006989125578392463, 0.007066461555563358, 0.007144226403490913, 0.007222390712028817, 0.0073009247987972465, 0.007379798735104548, 0.007458982372061159, 0.007538445366851773, 0.007618157209132407, 0.007698087247518698, 0.00777820471613278, 0.007858478761176086, 0.007938878467496314, 0.008019372885117467, 0.008099931055702543, 0.008180522038919683, 0.0082611149386832, 0.008341678929242317, 0.008422183281091383, 0.008502597386676759, 0.00858289078587662, 0.008663033191231441, 0.008742994512904237, 0.00882274488335102, 0.008902254681683338, 0.008981494557706353, 0.009060435455617025, 0.009139048637348891, 0.009217305705550786, 0.009295178626188734, 0.00937263975076123, 0.009449661838119627, 0.009526218075886564, 0.00960228210146645, 0.009677828022643274, 0.009752830437761898, 0.009827264455490042, 0.009901105714158915, 0.009974330400681217, 0.010046915269045935, 0.010118837658389671, 0.01019007551064493, 0.010260607387765634, 0.01033041248853093, 0.010399470664927487, 0.010467762438111242, 0.010535269013948695, 0.010601972298137897, 0.010667854910908292, 0.01073290020129853, 0.010797092261010093, 0.010860415937834083, 0.010922856848647328, 0.010984401391972896, 0.011045036760099016, 0.011104750950749075, 0.011163532778293789, 0.01122137188449578, 0.011278258748774387, 0.011334184697977808, 0.011389141915647693, 0.011443123450759558, 0.011496123225920984, 0.01154813604500769, 0.01159915760021605, 0.011649184478508897, 0.011698214167429853, 0.011746245060259859, 0.01179327646048811, 0.011839308585568108, 0.011884342569928302, 0.01192838046720535, 0.011971425251667245, 0.012013480818792121, 0.012054551984968194, 0.012094644486278991, 0.012133764976338404, 0.012171921023138459, 0.012209121104873918, 0.0122453746047069, 0.012280691804435225, 0.012315083877028909, 0.012348562877999585, 0.012381141735568531, 0.012412834239600533, 0.012443655029271784, 0.012473619579441701, 0.012502744185700796, 0.01253104594806824, 0.01255854275331568, 0.012585253255896147, 0.012611196857459766, 0.012636393684941244, 0.012660864567207109, 0.012684631010254325, 0.012707715170955841, 0.012730139829352003, 0.01275192835949156, 0.01277310469882968, 0.012793693316195103, 0.012813719178343362, 0.012833207715117055, 0.012852184783239917, 0.012870676628775451, 0.012888709848286535, 0.012906311348737286, 0.012923508306183298, 0.012940328123302033, 0.01295679838581971, 0.012972946817896444, 0.012988801236536384, 0.013004389505094218, 0.013019739485955127, 0.013034878992468643, 0.01304983574022291, 0.013064637297749274, 0.013079311036751778, 0.013093884081960048, 0.013108383260707965, 0.01312283505234387, 0.013137265537581487, 0.013151700347903675, 0.013166164615133497, 0.013180682921290161, 0.0131952792488482, 0.013209976931521109, 0.01322479860569094, 0.013239766162606694, 0.013254900701474608, 0.013270222483563493, 0.013285750887447849, 0.01330150436551076, 0.013317500401827156, 0.013333755471546395, 0.013350285001891095, 0.013367103334886438, 0.013384223691931055, 0.013401658140317692, 0.013419417561807043, 0.013437511623355113, 0.013455948750088433, 0.013474736100617623, 0.013493879544773288, 0.013513383643843262, 0.01353325163338337, 0.013553485408667737, 0.013574085512837784, 0.013595051127801901, 0.013616380067930353, 0.013638068776582593, 0.013660112325495832, 0.013682504417056337, 0.013705237389466253, 0.013728302224810512, 0.013751688560020224, 0.013775384700720013, 0.01379937763793882, 0.013823653067654382, 0.013848195413133929, 0.013872987850024339, 0.013898012334137547, 0.013923249631867531, 0.013948679353168549, 0.013974279987014908, 0.01400002893925612, 0.014025902572772921, 0.014051876249832925, 0.014077924376537494, 0.014104020449245375, 0.014130137102851716, 0.014156246160795822, 0.01418231868666554, 0.014208325037260855, 0.014234234916975166, 0.014260017433348433, 0.014285641153642852, 0.014311074162288702, 0.014336284119045301, 0.014361238317720305, 0.014385903745288815, 0.014410247141252894, 0.014434235057081704, 0.014457833915572784, 0.014481010069975537, 0.01450372986271912, 0.014525959683589261, 0.014547666027200359, 0.014568815549612273, 0.014589375123944768, 0.014609311894846422, 0.014628593331679037, 0.014647187280283849, 0.014665062013200784, 0.014682186278218257, 0.014698529345136754, 0.01471406105063646, 0.014728751841145886, 0.014742572813615882, 0.014755495754111208, 0.014767493174139295, 0.014778538344644678, 0.014788605327605108, 0.014797669005175046, 0.01480570510632962, 0.014812690230972302, 0.01481860187147755, 0.014823418431649058, 0.014827119243083315, 0.014829684578936972, 0.014831095665105376, 0.014831334688828954, 0.01483038480475238, 0.014828230138470008, 0.014824855787599974, 0.014820247820436994, 0.014814393272241991, 0.014807280139234446, 0.01479889737036058, 0.014789234856917445, 0.014778283420119779, 0.014766034796702646, 0.014752481622658763, 0.01473761741521486, 0.014721436553156386, 0.014703934255614493, 0.014685106559433095, 0.014664950295237528, 0.014643463062329406, 0.01462064320253477, 0.014596489773134562, 0.014571002519008263, 0.014544181844122305, 0.014516028782495461, 0.014486544968773354, 0.014455732608543683, 0.014423594448522786, 0.014390133746742436, 0.01435535424286397, 0.014319260128744089, 0.014281856019373929, 0.014243146924309252, 0.014203138219706252, 0.014161835621072514, 0.0141192451568388, 0.014075373142851517, 0.014030226157881038, 0.013983811020234868, 0.013936134765558895, 0.013887204625903598, 0.013837028010125785, 0.013785612485689314, 0.01373296576192196, 0.013679095674777783, 0.013624010173147903, 0.013567717306754812, 0.013510225215658204, 0.013451542121392933, 0.013391676319752258, 0.013330636175222113, 0.013268430117065095, 0.013205066637045161, 0.013140554288777388, 0.013074901688679847, 0.01300811751849779, 0.012940210529363911, 0.012871189547351886, 0.01280106348047411, 0.012729841327068609, 0.012657532185514669, 0.012584145265211084, 0.012509689898745804, 0.012434175555181339, 0.012357611854375634, 0.01228000858225409, 0.012201375706944956, 0.01212172339568673, 0.012041062032413629, 0.011959402235922482, 0.01187675487852228, 0.011793131105066221, 0.011708542352264392, 0.011623000368174768, 0.011536517231769395, 0.01144910537247288, 0.011360777589570374, 0.011271547071383236, 0.011181427414111522, 0.011090432640243944, 0.01099857721643801, 0.010905876070775058, 0.010812344609297657, 0.010717998731739746, 0.01062285484636289, 0.010526929883816047, 0.010430241309939482, 0.01033280713743808, 0.010234645936353298, 0.010135776843267672, 0.010036219569180743, 0.00993599440599992, 0.00983512223159526, 0.00973362451337216, 0.00963152331032172, 0.0095288412735136, 0.009425601645002318, 0.00932182825512316, 0.009217545518159962, 0.009112778426372497, 0.009007552542376996, 0.00890189398987925, 0.008795829442765139, 0.008689386112559132, 0.008582591734267044, 0.008475474550624364, 0.008368063294777229, 0.00826038717142792, 0.00815247583648205, 0.008044359375239335, 0.007936068279174535, 0.007827633421359635, 0.007719086030582673, 0.007610457664222528, 0.007501780179942841, 0.007393085706272029, 0.007284406612139103, 0.0071757754754388095, 0.007067225050701685, 0.0069587882359475614, 0.006850498038803227, 0.0067423875419665], \"yaxis\": \"y\"}, {\"legendgroup\": \"middle age\", \"marker\": {\"color\": \"#2aa8a8\"}, \"mode\": \"lines\", \"name\": \"middle age\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [1.0, 1.188, 1.376, 1.564, 1.752, 1.94, 2.128, 2.316, 2.504, 2.692, 2.88, 3.068, 3.256, 3.444, 3.632, 3.82, 4.008, 4.196, 4.384, 4.572, 4.76, 4.948, 5.136, 5.324, 5.512, 5.7, 5.888, 6.076, 6.264, 6.452, 6.64, 6.828, 7.016, 7.204, 7.392, 7.58, 7.768, 7.956, 8.144, 8.332, 8.52, 8.708, 8.896, 9.084, 9.272, 9.46, 9.648, 9.836, 10.024, 10.212, 10.4, 10.588, 10.776, 10.964, 11.152, 11.34, 11.528, 11.716, 11.904, 12.092, 12.28, 12.468, 12.656, 12.844, 13.032, 13.22, 13.408, 13.596, 13.784, 13.972, 14.16, 14.348, 14.536, 14.724, 14.912, 15.1, 15.288, 15.476, 15.664, 15.852, 16.04, 16.228, 16.416, 16.604, 16.792, 16.98, 17.168, 17.356, 17.544, 17.732, 17.92, 18.108, 18.296, 18.484, 18.672, 18.86, 19.048, 19.236, 19.424, 19.612, 19.8, 19.988, 20.176, 20.364, 20.552, 20.74, 20.928, 21.116, 21.304, 21.492, 21.68, 21.868, 22.056, 22.244, 22.432, 22.62, 22.808, 22.996, 23.184, 23.372, 23.56, 23.748, 23.936, 24.124, 24.312, 24.5, 24.688, 24.876, 25.064, 25.252, 25.44, 25.628, 25.816, 26.004, 26.192, 26.38, 26.568, 26.756, 26.944, 27.132, 27.32, 27.508, 27.696, 27.884, 28.072, 28.26, 28.448, 28.636, 28.824, 29.012, 29.2, 29.388, 29.576, 29.764, 29.952, 30.14, 30.328, 30.516, 30.704, 30.892, 31.08, 31.268, 31.456, 31.644, 31.832, 32.019999999999996, 32.208, 32.396, 32.584, 32.772, 32.96, 33.148, 33.336, 33.524, 33.712, 33.9, 34.088, 34.276, 34.464, 34.652, 34.84, 35.028, 35.216, 35.404, 35.592, 35.78, 35.968, 36.156, 36.344, 36.532, 36.72, 36.908, 37.096, 37.284, 37.472, 37.66, 37.848, 38.036, 38.224, 38.412, 38.6, 38.788, 38.976, 39.164, 39.352, 39.54, 39.728, 39.916, 40.104, 40.292, 40.48, 40.668, 40.856, 41.044, 41.232, 41.42, 41.608, 41.796, 41.984, 42.172, 42.36, 42.548, 42.736, 42.924, 43.112, 43.3, 43.488, 43.676, 43.864, 44.052, 44.24, 44.428, 44.616, 44.804, 44.992, 45.18, 45.368, 45.556, 45.744, 45.932, 46.12, 46.308, 46.496, 46.684, 46.872, 47.06, 47.248, 47.436, 47.624, 47.812, 48.0, 48.188, 48.376, 48.564, 48.752, 48.94, 49.128, 49.316, 49.504, 49.692, 49.88, 50.068, 50.256, 50.444, 50.632, 50.82, 51.008, 51.196, 51.384, 51.572, 51.76, 51.948, 52.136, 52.324, 52.512, 52.7, 52.888, 53.076, 53.264, 53.452, 53.64, 53.828, 54.016, 54.204, 54.392, 54.58, 54.768, 54.956, 55.144, 55.332, 55.52, 55.708, 55.896, 56.084, 56.272, 56.46, 56.648, 56.836, 57.024, 57.212, 57.4, 57.588, 57.776, 57.964, 58.152, 58.34, 58.528, 58.716, 58.904, 59.092, 59.28, 59.468, 59.656, 59.844, 60.032, 60.22, 60.408, 60.596, 60.784, 60.972, 61.16, 61.348, 61.536, 61.724, 61.912, 62.1, 62.288, 62.476, 62.664, 62.852, 63.04, 63.228, 63.416, 63.604, 63.792, 63.98, 64.168, 64.356, 64.544, 64.732, 64.92, 65.108, 65.296, 65.484, 65.672, 65.86, 66.048, 66.236, 66.424, 66.612, 66.8, 66.988, 67.176, 67.364, 67.552, 67.74, 67.928, 68.116, 68.304, 68.492, 68.68, 68.868, 69.056, 69.244, 69.432, 69.62, 69.808, 69.996, 70.184, 70.372, 70.56, 70.748, 70.936, 71.124, 71.312, 71.5, 71.688, 71.876, 72.064, 72.252, 72.44, 72.628, 72.816, 73.004, 73.192, 73.38, 73.568, 73.756, 73.944, 74.132, 74.32, 74.508, 74.696, 74.884, 75.072, 75.26, 75.448, 75.636, 75.824, 76.012, 76.2, 76.388, 76.576, 76.764, 76.952, 77.14, 77.328, 77.516, 77.704, 77.892, 78.08, 78.268, 78.456, 78.644, 78.832, 79.02, 79.208, 79.396, 79.584, 79.772, 79.96, 80.148, 80.336, 80.524, 80.712, 80.9, 81.088, 81.276, 81.464, 81.652, 81.84, 82.028, 82.216, 82.404, 82.592, 82.78, 82.968, 83.156, 83.344, 83.532, 83.72, 83.908, 84.096, 84.284, 84.472, 84.66, 84.848, 85.036, 85.224, 85.412, 85.6, 85.788, 85.976, 86.164, 86.352, 86.54, 86.728, 86.916, 87.104, 87.292, 87.48, 87.668, 87.856, 88.044, 88.232, 88.42, 88.608, 88.796, 88.984, 89.172, 89.36, 89.548, 89.736, 89.924, 90.112, 90.3, 90.488, 90.676, 90.864, 91.052, 91.24, 91.428, 91.616, 91.804, 91.992, 92.18, 92.368, 92.556, 92.744, 92.932, 93.12, 93.308, 93.496, 93.684, 93.872, 94.06, 94.248, 94.436, 94.624, 94.812], \"xaxis\": \"x\", \"y\": [0.005413904002633897, 0.005511702085436948, 0.005610016447964181, 0.0057088155910416105, 0.0058080673428541, 0.005907738882311953, 0.006007796763674474, 0.006108206942419304, 0.006208934802344091, 0.006309945183884227, 0.006411202413627918, 0.006512670335007037, 0.00661431234013967, 0.00671609140279737, 0.006817970112467583, 0.006919910709478763, 0.007021875121153126, 0.007123824998949149, 0.007225721756553141, 0.007327526608876693, 0.007429200611913887, 0.007530704703409727, 0.007631999744288469, 0.007733046560788209, 0.007833805987245276, 0.007934238909470051, 0.00803430630865296, 0.008133969305737676, 0.008233189206196069, 0.008331927545137575, 0.008430146132683733, 0.008527807099536894, 0.008624872942670326, 0.008721306571065564, 0.008817071351421476, 0.008912131153758203, 0.009006450396838249, 0.00909999409332599, 0.00919272789460623, 0.009284618135181898, 0.00937563187657065, 0.009465736950620009, 0.00955490200216064, 0.009643096530917765, 0.009730290932600884, 0.009816456539093013, 0.009901565657661001, 0.009985591609110013, 0.010068508764806082, 0.01015029258249248, 0.010230919640826874, 0.010310367672568507, 0.010388615596346306, 0.010465643546941275, 0.010541432904018863, 0.01061596631924955, 0.010689227741758638, 0.010761202441849348, 0.010831877032946101, 0.0109012394917083, 0.010969279176268311, 0.01103598684255077, 0.011101354658633916, 0.01116537621711764, 0.011228046545466466, 0.011289362114299853, 0.011349320843606172, 0.011407922106860634, 0.011465166733031875, 0.01152105700646577, 0.01157559666463948, 0.011628790893782852, 0.011680646322368567, 0.011731171012476586, 0.011780374449042706, 0.011828267527005163, 0.011874862536367374, 0.011920173145198842, 0.011964214380600432, 0.012007002607663906, 0.012048555506459535, 0.012088892047089307, 0.012128032462846794, 0.012165998221528083, 0.01220281199494176, 0.012238497626668829, 0.012273080098126632, 0.012306585492993679, 0.012339040960054807, 0.012370474674528982, 0.012400915797943907, 0.01243039443662423, 0.012458941598861694, 0.012486589150837744, 0.012513369771370327, 0.012539316905558278, 0.012564464717397748, 0.012588848041446247, 0.012612502333610534, 0.012635463621135398, 0.012657768451870628, 0.012679453842893961, 0.012700557228567553, 0.012721116408105842, 0.012741169492731923, 0.01276075485249963, 0.012779911062857498, 0.012798676851030385, 0.012817091042293446, 0.012835192506212305, 0.01285302010292197, 0.012870612629516066, 0.012888008766616298, 0.012905247025190835, 0.012922365693688867, 0.012939402785556489, 0.012956395987198176, 0.012973382606445632, 0.012990399521594465, 0.013007483131067275, 0.013024669303759649, 0.013041993330124067, 0.01305948987404456, 0.013077192925553077, 0.013095135754436932, 0.013113350864784512, 0.01313186995051471, 0.013150723851933738, 0.013169942513361241, 0.013189554941865621, 0.013209589167147208, 0.013230072202605704, 0.013251030007627214, 0.01327248745112427, 0.013294468276360851, 0.013316995067092986, 0.013340089215054, 0.013363770888812278, 0.013388059004027963, 0.013412971195133771, 0.013438523788464255, 0.013464731776856052, 0.01349160879574121, 0.013519167100754348, 0.013547417546873334, 0.013576369569112325, 0.013606031164785115, 0.013636408877355647, 0.013667507781891713, 0.013699331472137291, 0.013731882049217417, 0.013765160111989487, 0.013799164749053182, 0.013833893532431021, 0.013869342512930155, 0.01390550621719538, 0.013942377646462336, 0.01397994827701875, 0.014018208062380844, 0.014057145437190562, 0.014096747322838632, 0.014136999134816875, 0.014177884791802178, 0.014219386726473193, 0.014261485898059537, 0.014304161806621585, 0.014347392509057793, 0.014391154636834635, 0.014435423415432668, 0.014480172685500507, 0.014525374925706675, 0.014571001277277493, 0.014617021570206805, 0.014663404351122095, 0.01471011691278849, 0.014757125325230665, 0.014804394468450189, 0.014851888066713495, 0.014899568724383293, 0.014947397963264258, 0.014995336261430495, 0.01504334309350093, 0.015091376972325342, 0.015139395492041777, 0.015187355372463298, 0.015235212504749688, 0.01528292199831697, 0.01533043822893537, 0.015377714887963748, 0.015424705032665817, 0.015471361137551827, 0.01551763514668605, 0.015563478526899039, 0.015608842321840977, 0.015653677206810154, 0.0156979335442893, 0.015741561440119903, 0.015784510800243044, 0.01582673138793398, 0.015868172881455617, 0.015908784932055, 0.015948517222225775, 0.015987319524157915, 0.016025141758296026, 0.01606193405192561, 0.01609764679770739, 0.01613223071207812, 0.016165636893437155, 0.01619781688003703, 0.0162287227074974, 0.01625830696586116, 0.016286522856112696, 0.016313324246078575, 0.016338665725631793, 0.016362502661122352, 0.016384791248957198, 0.016405488568255078, 0.016424552632502424, 0.016441942440139135, 0.016457618024003945, 0.0164715404995725, 0.016483672111922004, 0.016493976281359936, 0.016502417647656007, 0.016508962112819815, 0.01651357688236851, 0.01651623050503276, 0.016516892910851143, 0.016515535447607144, 0.016512130915564957, 0.016506653600464535, 0.01649907930473865, 0.01648938537691869, 0.016477550739198567, 0.016463555913129934, 0.01644738304342499, 0.016429015919846312, 0.01640843999716684, 0.01638564241318596, 0.016360612004791223, 0.01633333932205818, 0.01630381664038405, 0.016272037970654032, 0.01623799906744186, 0.016201697435249525, 0.016163132332793418, 0.016122304775347127, 0.01607921753515396, 0.01603387513992432, 0.015986283869435777, 0.015936451750255966, 0.015884388548610615, 0.015830105761420844, 0.015773616605536202, 0.01571493600519143, 0.015654080577716556, 0.015591068617532063, 0.015525920078461439, 0.015458656554395546, 0.015389301258343988, 0.015317878999909886, 0.015244416161225509, 0.015168940671386985, 0.015091481979427083, 0.015012071025865957, 0.01493074021287987, 0.01484752337312907, 0.014762455737285556, 0.014675573900302873, 0.0145869157864693, 0.01449652061328675, 0.014404428854217624, 0.014310682200342017, 0.014215323520967545, 0.01411839682323463, 0.014019947210759784, 0.013920020841359161, 0.01381866488389555, 0.013715927474290934, 0.013611857670747778, 0.01350650540822129, 0.013399921452185767, 0.013292157351737591, 0.013183265392077998, 0.013073298546418487, 0.01296231042735209, 0.012850355237734002, 0.012737487721114972, 0.01262376311177157, 0.012509237084377196, 0.012393965703358606, 0.012278005371982838, 0.012161412781219617, 0.012044244858425403, 0.011926558715895081, 0.011808411599328128, 0.011689860836256841, 0.011570963784484323, 0.011451777780580824, 0.011332360088487842, 0.011212767848279303, 0.011093058025130631, 0.010973287358546512, 0.010853512311899065, 0.01073378902232847, 0.010614173251058968, 0.010494720334183518, 0.01037548513397067, 0.010256521990747993, 0.010137884675416618, 0.01001962634265156, 0.009901799484843016, 0.009784455886833753, 0.009667646581507766, 0.009551421806285402, 0.009435830960579903, 0.00932092256426991, 0.00920674421724243, 0.0090933425600597, 0.008980763235803107, 0.008869050853146319, 0.00875824895070883, 0.008648399962740005, 0.008539545186182402, 0.00843172474916181, 0.008324977580949744, 0.008219341383442347, 0.008114852604197911, 0.008011546411073031, 0.007909456668495119, 0.0078086159154067535, 0.007709055344914731, 0.007610804785673977, 0.007513892685033637, 0.007418346093969836, 0.007324190653826188, 0.007231450584880264, 0.007140148676750695, 0.007050306280655962, 0.006961943303532871, 0.006875078204018559, 0.006789727990296412, 0.006705908219802517, 0.0066236330007854085, 0.006542914995707839, 0.006463765426475819, 0.006386194081475699, 0.006310209324396747, 0.006235818104812311, 0.00616302597048912, 0.006091837081390283, 0.006022254225333886, 0.005954278835265346, 0.00588791100809819, 0.00582314952507426, 0.005759991873591222, 0.0056984342704417676, 0.00563847168640604, 0.0055800978721356285, 0.005523305385264964, 0.0054680856186831795, 0.005414428829897153, 0.005362324171414352, 0.005311759722071972, 0.00526272251923724, 0.005215198591802167, 0.0051691729938947535, 0.0051246298392276495, 0.0050815523360044045, 0.005039922822303022, 0.004999722801856163, 0.00496093298014729, 0.00492353330074243, 0.0048875029817775925, 0.00485282055252268, 0.004819463889943802, 0.004787410255187046, 0.004756636329908428, 0.0047271182523763895, 0.004698831653275218, 0.004671751691140106, 0.004645853087356817, 0.004621110160661769, 0.004597496861081117, 0.004574986803250421, 0.004553553299059796, 0.004533169389572836, 0.004513807876170966, 0.004495441350878824, 0.004478042225829793, 0.004461582761834922, 0.004446035096022278, 0.00443137126851799, 0.0044175632481442215, 0.004404582957113552, 0.0043924022947034146, 0.004380993159898304, 0.0043703274729918595, 0.0043603771961447805, 0.004351114352898886, 0.004342511046651474, 0.004334539478098157, 0.004327171961656207, 0.004320380940884154, 0.004314139002916973, 0.0043084188919397795, 0.004303193521726093, 0.004298435987270048, 0.004294119575544763, 0.0042902177754219895, 0.004286704286790609, 0.0042835530289139735, 0.00428073814806826, 0.004278234024505866, 0.0042760152787895585, 0.004274056777544579, 0.004272333638677063, 0.00427082123610807, 0.0042694952040732625, 0.004268331441038685, 0.004267306113283294, 0.004266395658198872, 0.0042655767873575525, 0.0042648264893968175, 0.004264122032770836, 0.004263440968416148, 0.004262761132378376, 0.0042620606484451975, 0.004261317930829111, 0.004260511686941676, 0.004259620920298838, 0.004258624933594594, 0.004257503331978007, 0.0042562360265658026, 0.004254803238220185, 0.004253185501618605, 0.0042513636696392305, 0.004249318918082809, 0.004247032750748441, 0.004244487004877576, 0.004241663856977202, 0.0042385458290299435, 0.004235115795095339, 0.004231356988303299, 0.004227253008237353, 0.004222787828701924, 0.004217945805864662, 0.004212711686761538, 0.004207070618149323, 0.004201008155686876, 0.004194510273423815, 0.004187563373572084, 0.004180154296533377, 0.004172270331152552, 0.004163899225164841, 0.004155029195802281, 0.004145648940522576, 0.004135747647821777, 0.004125315008090194, 0.004114341224469485, 0.0041028170236673735, 0.004090733666685298, 0.0040780829594132964, 0.004064857263045599, 0.004051049504269917, 0.004036653185182986, 0.004021662392884826, 0.004006071808704281, 0.003989876717008676, 0.003973073013550894, 0.003955657213308049, 0.003937626457766679, 0.003918978521610615, 0.003899711818769047, 0.003879825407783716, 0.003859318996455933, 0.0038381929457360436, 0.003816448272819867, 0.0037940866534189755, 0.0037711104231739623, 0.003747522578182288, 0.0037233267746150356, 0.003698527327399456, 0.0036731292079471584, 0.0036471380409106345, 0.003620560099953797, 0.0035934023025253553, 0.003565672203626839, 0.0035373779885703423, 0.003508528464724155, 0.0034791330522477505, 0.0034492017738206237, 0.003418745243372843, 0.0033877746538282256, 0.003356301763874169, 0.00332433888377534, 0.003291898860251275, 0.0032589950604410916, 0.0032256413549812055, 0.0031918521002247584], \"yaxis\": \"y\"}, {\"legendgroup\": \"senior adult\", \"marker\": {\"color\": \"#e8204b\"}, \"mode\": \"lines\", \"name\": \"senior adult\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [3.0, 3.114, 3.228, 3.342, 3.456, 3.57, 3.684, 3.798, 3.912, 4.026, 4.14, 4.254, 4.368, 4.482, 4.596, 4.71, 4.824, 4.938, 5.052, 5.166, 5.279999999999999, 5.394, 5.508, 5.622, 5.736000000000001, 5.85, 5.964, 6.077999999999999, 6.192, 6.306, 6.42, 6.534, 6.648, 6.7620000000000005, 6.8759999999999994, 6.99, 7.104, 7.218, 7.332, 7.446, 7.56, 7.674, 7.788, 7.902, 8.016, 8.129999999999999, 8.244, 8.358, 8.472000000000001, 8.586, 8.7, 8.814, 8.928, 9.042, 9.155999999999999, 9.27, 9.384, 9.498000000000001, 9.612, 9.725999999999999, 9.84, 9.954, 10.068, 10.182, 10.296, 10.41, 10.524000000000001, 10.638, 10.751999999999999, 10.866, 10.98, 11.094, 11.208, 11.322, 11.436, 11.55, 11.664, 11.778, 11.892, 12.006, 12.12, 12.234, 12.348, 12.462, 12.576, 12.69, 12.804, 12.918, 13.032, 13.146, 13.26, 13.374, 13.488, 13.602, 13.716, 13.83, 13.944, 14.058, 14.172, 14.286, 14.4, 14.514, 14.628, 14.742, 14.856, 14.97, 15.084, 15.198, 15.312, 15.426, 15.54, 15.654, 15.768, 15.882, 15.996, 16.11, 16.224, 16.338, 16.451999999999998, 16.566000000000003, 16.68, 16.794, 16.908, 17.022, 17.136, 17.25, 17.364, 17.478, 17.592, 17.706, 17.82, 17.933999999999997, 18.048000000000002, 18.162, 18.276, 18.39, 18.503999999999998, 18.618000000000002, 18.732, 18.846, 18.96, 19.074, 19.188, 19.302, 19.416, 19.53, 19.644, 19.758, 19.872, 19.986, 20.1, 20.214, 20.328, 20.442, 20.556, 20.67, 20.784, 20.898, 21.012, 21.126, 21.24, 21.354, 21.468, 21.582, 21.696, 21.81, 21.924, 22.038, 22.152, 22.266, 22.38, 22.494, 22.608, 22.722, 22.836, 22.95, 23.064, 23.178, 23.292, 23.406, 23.52, 23.634, 23.748, 23.862, 23.976, 24.09, 24.204, 24.318, 24.432, 24.546, 24.66, 24.774, 24.888, 25.002, 25.116, 25.23, 25.344, 25.458, 25.572, 25.686, 25.8, 25.914, 26.028, 26.142, 26.256, 26.37, 26.484, 26.598, 26.712, 26.826, 26.94, 27.054, 27.168, 27.282, 27.396, 27.51, 27.624, 27.738, 27.852, 27.966, 28.08, 28.194, 28.308, 28.422, 28.536, 28.65, 28.764, 28.878, 28.992, 29.106, 29.22, 29.334, 29.448, 29.562, 29.676, 29.79, 29.904, 30.018, 30.132, 30.246, 30.36, 30.474, 30.588, 30.702, 30.816, 30.93, 31.044, 31.158, 31.272, 31.386, 31.5, 31.614, 31.728, 31.842, 31.956, 32.07, 32.184, 32.298, 32.412, 32.525999999999996, 32.64, 32.754000000000005, 32.867999999999995, 32.982, 33.096000000000004, 33.21, 33.324, 33.438, 33.552, 33.666, 33.78, 33.894, 34.007999999999996, 34.122, 34.236000000000004, 34.35, 34.464, 34.578, 34.692, 34.806, 34.92, 35.034, 35.148, 35.262, 35.376, 35.49, 35.604, 35.718, 35.832, 35.946, 36.06, 36.174, 36.288, 36.402, 36.516, 36.63, 36.744, 36.858, 36.972, 37.086, 37.2, 37.314, 37.428, 37.542, 37.656, 37.77, 37.884, 37.998, 38.112, 38.226, 38.34, 38.454, 38.568, 38.682, 38.796, 38.91, 39.024, 39.138, 39.252, 39.366, 39.48, 39.594, 39.708, 39.822, 39.936, 40.05, 40.164, 40.278, 40.392, 40.506, 40.62, 40.734, 40.848, 40.962, 41.076, 41.19, 41.304, 41.418, 41.532, 41.646, 41.76, 41.874, 41.988, 42.102, 42.216, 42.33, 42.444, 42.558, 42.672, 42.786, 42.9, 43.014, 43.128, 43.242, 43.356, 43.47, 43.584, 43.698, 43.812, 43.926, 44.04, 44.154, 44.268, 44.382, 44.496, 44.61, 44.724, 44.838, 44.952, 45.066, 45.18, 45.294, 45.408, 45.522, 45.636, 45.75, 45.864, 45.978, 46.092, 46.206, 46.32, 46.434, 46.548, 46.662, 46.776, 46.89, 47.004, 47.118, 47.232, 47.346, 47.46, 47.574, 47.688, 47.802, 47.916, 48.03, 48.144, 48.258, 48.372, 48.486, 48.6, 48.714, 48.828, 48.942, 49.056, 49.17, 49.284, 49.398, 49.512, 49.626, 49.74, 49.854, 49.968, 50.082, 50.196, 50.31, 50.424, 50.538, 50.652, 50.766, 50.88, 50.994, 51.108, 51.222, 51.336, 51.45, 51.564, 51.678, 51.792, 51.906, 52.02, 52.134, 52.248, 52.362, 52.476, 52.59, 52.704, 52.818, 52.932, 53.046, 53.16, 53.274, 53.388, 53.502, 53.616, 53.73, 53.844, 53.958, 54.072, 54.186, 54.3, 54.414, 54.528, 54.642, 54.756, 54.87, 54.984, 55.098, 55.212, 55.326, 55.44, 55.554, 55.668, 55.782, 55.896, 56.01, 56.124, 56.238, 56.352, 56.466, 56.58, 56.694, 56.808, 56.922, 57.036, 57.15, 57.264, 57.378, 57.492, 57.606, 57.72, 57.834, 57.948, 58.062, 58.176, 58.29, 58.404, 58.518, 58.632, 58.746, 58.86, 58.974, 59.088, 59.202, 59.316, 59.43, 59.544, 59.658, 59.772, 59.886], \"xaxis\": \"x\", \"y\": [0.008076168089485594, 0.008131161058428163, 0.008185696216109047, 0.00823976017200154, 0.008293339601358736, 0.008346421251041937, 0.00839899194537278, 0.00845103859200667, 0.008502548187825316, 0.008553507824845933, 0.008603904696144766, 0.008653726101792455, 0.00870295945479888, 0.00875159228706482, 0.00879961225533803, 0.008847007147171066, 0.008893764886878317, 0.00893987354148953, 0.00898532132669715, 0.009030096612794808, 0.009074187930604124, 0.009117583977387109, 0.00916027362274125, 0.009202245914474529, 0.009243490084457356, 0.009283995554448641, 0.009323751941892885, 0.00936274906568546, 0.009400976951902947, 0.009438425839495555, 0.009475086185938522, 0.009510948672839413, 0.009546004211498182, 0.009580243948416894, 0.009613659270755864, 0.009646241811733128, 0.009677983455963941, 0.009708876344737168, 0.009738912881225267, 0.009768085735624665, 0.009796387850223222, 0.009823812444391561, 0.00985035301949495, 0.009876003363722467, 0.009900757556830186, 0.00992460997479508, 0.009947555294376357, 0.009969588497580983, 0.009990704876030088, 0.010010900035223062, 0.010030169898695995, 0.01004851071207135, 0.010065919046995603, 0.010082391804961642, 0.010097926221012847, 0.010112519867325627, 0.010126170656667387, 0.01013887684572684, 0.010150637038313603, 0.010161450188424159, 0.010171315603171182, 0.010180232945573384, 0.010188202237202997, 0.010195223860688152, 0.010201298562067408, 0.010206427452993726, 0.010210612012785399, 0.010213854090321254, 0.010216155905777825, 0.010217520052205992, 0.010217949496944845, 0.010217447582870543, 0.01021601802947803, 0.01021366493379355, 0.010210392771116024, 0.010206206395585426, 0.010201111040576407, 0.010195112318915484, 0.010188216222920297, 0.010180429124259413, 0.010171757773631432, 0.010162209300262109, 0.010151791211218422, 0.0101405113905386, 0.010128378098177262, 0.01011539996876491, 0.010101586010181173, 0.010086945601941344, 0.01007148849339583, 0.010055224801742315, 0.01003816500985059, 0.010020319963899998, 0.010001700870829838, 0.00998231929560293, 0.009962187158282895, 0.009941316730925716, 0.009919720634286389, 0.0098974118343415, 0.009874403638628836, 0.009850709692405188, 0.009826343974623659, 0.009801320793732022, 0.009775654783293676, 0.009749360897433, 0.009722454406107044, 0.009694950890205552, 0.009666866236481567, 0.009638216632314898, 0.009609018560310994, 0.009579288792737787, 0.00954904438580326, 0.009518302673776666, 0.009487081262956361, 0.009455398025487442, 0.009423271093032471, 0.009390718850298654, 0.009357759928424993, 0.009324413198233178, 0.009290697763345783, 0.009256632953175834, 0.00922223831579161, 0.009187533610660848, 0.009152538801278497, 0.009117274047682363, 0.009081759698860993, 0.009046016285058337, 0.009010064509979692, 0.008973925242903623, 0.008937619510704615, 0.008901168489791137, 0.008864593497964179, 0.008827915986201005, 0.008791157530369232, 0.00875433982287623, 0.008717484664258953, 0.0086806139547193, 0.008643749685610224, 0.008606913930877725, 0.008570128838464038, 0.008533416621677142, 0.008496799550531977, 0.008460299943068543, 0.008423940156652182, 0.008387742579261307, 0.008351729620767882, 0.008315923704215791, 0.008280347257102421, 0.008245022702668619, 0.008209972451202183, 0.008175218891360024, 0.008140784381514091, 0.00810669124112607, 0.008072961742155908, 0.008039618100508992, 0.00800668246752695, 0.007974176921526743, 0.00794212345939289, 0.00791054398822738, 0.007879460317061838, 0.007848894148636437, 0.007818867071249869, 0.0077894005506846924, 0.0077605159222122085, 0.007732234382680888, 0.007704576982692343, 0.0076775646188686495, 0.007651218026214708, 0.007625557770579265, 0.007600604241218041, 0.007576377643462279, 0.007552897991495922, 0.007530185101244503, 0.007508258583378591, 0.007487137836434673, 0.007466842040056046, 0.007447390148356207, 0.007428800883407152, 0.00741109272885466, 0.007394283923662728, 0.007378392455989016, 0.007363436057192948, 0.007349432195978239, 0.0073363980726711105, 0.00732435061363557, 0.00731330646582687, 0.0073032819914840945, 0.007294293262962726, 0.007286356057707839, 0.007279485853368453, 0.007273697823053392, 0.007269006830728919, 0.007265427426758122, 0.007262973843582117, 0.007261659991542696, 0.007261499454846184, 0.0072625054876679545, 0.007264691010396956, 0.007268068606019536, 0.007272650516641603, 0.007278448640148168, 0.0072854745269990496, 0.007293739377159559, 0.0073032540371646805, 0.007314028997315363, 0.007326074389005234, 0.007339399982176083, 0.0073540151829002715, 0.007369929031088209, 0.007387150198318885, 0.007405686985791372, 0.007425547322395182, 0.00744673876289721, 0.007469268486242999, 0.0074931432939699385, 0.007518369608729993, 0.0075449534729194875, 0.007572900547413418, 0.0076022161104017235, 0.007632905056324917, 0.007664971894906473, 0.0076984207502792815, 0.007733255360203474, 0.007769479075373002, 0.007807094858808204, 0.007846105285331676, 0.007886512541124777, 0.007928318423362059, 0.007971524339920927, 0.008016131309163912, 0.00806213995979095, 0.008109550530758972, 0.008158362871266391, 0.008208576440799852, 0.008260190309240812, 0.008313203157029582, 0.008367613275384407, 0.008423418566573318, 0.008480616544236545, 0.008539204333757312, 0.008599178672678922, 0.008660535911166235, 0.008723272012509426, 0.00878738255366846, 0.008852862725856333, 0.008919707335159583, 0.008987910803194481, 0.009057467167797493, 0.009128370083748718, 0.009200612823527033, 0.009274188278095936, 0.009349088957719012, 0.009425306992804245, 0.00950283413477638, 0.009581661756976749, 0.009661780855590054, 0.009743182050597706, 0.009825855586757517, 0.009909791334609662, 0.00999497879150878, 0.01008140708268252, 0.010169064962316727, 0.010257940814667594, 0.010348022655201454, 0.010439298131762765, 0.010531754525771025, 0.010625378753447672, 0.010720157367073853, 0.01081607655628033, 0.010913122149370636, 0.011011279614679114, 0.011110534061965148, 0.011210870243845261, 0.011312272557264934, 0.011414725045011804, 0.011518211397272396, 0.011622714953234256, 0.011728218702735835, 0.01183470528796623, 0.011942157005217157, 0.01205055580668971, 0.012159883302358229, 0.012270120761894019, 0.012381249116651581, 0.012493248961719987, 0.01260610055804234, 0.01271978383460612, 0.012834278390707254, 0.012949563498291083, 0.013065618104372975, 0.013182420833541904, 0.013299949990549786, 0.013418183562989905, 0.01353709922406744, 0.013656674335465246, 0.013776885950308003, 0.013897710816227938, 0.014019125378535157, 0.014141105783495849, 0.014263627881721287, 0.014386667231670782, 0.014510199103271794, 0.014634198481659796, 0.014758640071041397, 0.014883498298683068, 0.015008747319028761, 0.01513436101794901, 0.01526031301712414, 0.015386576678564485, 0.01551312510926986, 0.01563993116603099, 0.015766967460375102, 0.015894206363658004, 0.016021620012304824, 0.016149180313201363, 0.016276858949238013, 0.016404627385008124, 0.016532456872662284, 0.01666031845792016, 0.016788182986241323, 0.016916021109156056, 0.01704380329075753, 0.017171499814356003, 0.017299080789295884, 0.017426516157936372, 0.017553775702795815, 0.017680829053860345, 0.017807645696056598, 0.017934194976888473, 0.018060446114237787, 0.018186368204328052, 0.018311930229850896, 0.018437101068254164, 0.018561849500190675, 0.01868614421812631, 0.018809953835105944, 0.018933246893675648, 0.019055991874959155, 0.019178157207886556, 0.019299711278573033, 0.019420622439844926, 0.019540859020910607, 0.01966038933717326, 0.019779181700182245, 0.019897204427720062, 0.02001442585402107, 0.020130814340118437, 0.020246338284315366, 0.02036096613277634, 0.020474666390234344, 0.02058740763080919, 0.020699158508932523, 0.020809887770374458, 0.020919564263366806, 0.02102815694981767, 0.021135634916611794, 0.021241967386991193, 0.02134712373201027, 0.021451073482059345, 0.021553786338450474, 0.021655232185059436, 0.021755381100017162, 0.021854203367444355, 0.021951669489222225, 0.02204775019679276, 0.02214241646298131, 0.02223563951383454, 0.02232739084046635, 0.022417642210904587, 0.022506365681930873, 0.022593533610906207, 0.022679118667574518, 0.022763093845836597, 0.022845432475486444, 0.022926108233902294, 0.023005095157684275, 0.02308236765423075, 0.023157900513245396, 0.023231668918166755, 0.023303648457512323, 0.023373815136128982, 0.023442145386341595, 0.023508616078991795, 0.023573204534358586, 0.023635888532952763, 0.023696646326177104, 0.0237554566468441, 0.023812298719543313, 0.023867152270850234, 0.023919997539368878, 0.023970815285600022, 0.02401958680162746, 0.024066293920614403, 0.024110919026102455, 0.024153445061105568, 0.02419385553699159, 0.02423213454214399, 0.024268266750396568, 0.024302237429234014, 0.024334032447751553, 0.02436363828436649, 0.02439104203427537, 0.024416231416649968, 0.024439194781565927, 0.02445992111665772, 0.024478400053494023, 0.024494621873667747, 0.024508577514594915, 0.024520258575017093, 0.024529657320202077, 0.024536766686837942, 0.024541580287615394, 0.024544092415494115, 0.02454429804764854, 0.0245421928490891, 0.024537773175954746, 0.02453103607847354, 0.02452197930358741, 0.024510601297238303, 0.02449690120631248, 0.02448087888024063, 0.02446253487225109, 0.02444187044027417, 0.024418887547495723, 0.02439358886255826, 0.024365977759408314, 0.02433605831678901, 0.02430383531737683, 0.02426931424656238, 0.024232501290874498, 0.024193403336048146, 0.024152027964735878, 0.024108383453863975, 0.024062478771633533, 0.024014323574168158, 0.023963928201809245, 0.023911303675060534, 0.02385646169018428, 0.023799414614450613, 0.023740175481042982, 0.023678757983622366, 0.023615176470553084, 0.023549445938793514, 0.02348158202745545, 0.023411601011035447, 0.023339519792322645, 0.02326535589498691, 0.02318912745585216, 0.023110853216859448, 0.02303055251672466, 0.022948245282296473, 0.02286395201961955, 0.022777693804708926, 0.022689492274041413, 0.022599369614770038, 0.022507348554667926, 0.022413452351808118, 0.02231770478398586, 0.022220130137890537, 0.022120753198034016, 0.02201959923544289, 0.02191669399612176, 0.021812063689295502, 0.0217057349754378, 0.021597734954094172, 0.02148809115150732, 0.021376831508053064, 0.021263984365494867, 0.02114957845406581, 0.021033642879386014, 0.020916207109224448, 0.02079730096011369, 0.020676954583826398, 0.020555198453722483, 0.020432063350975752, 0.020307580350689195, 0.020181780807907765, 0.020054696343538004, 0.01992635883018343, 0.01979680037790499, 0.019666053319915718, 0.019534150198218907, 0.019401123749198827, 0.01926700688917347, 0.01913183269991826, 0.018995634414170157, 0.018858445401121245, 0.018720299151910844, 0.018581229265125464, 0.018441269432315444, 0.01830045342353743, 0.018158815072931628, 0.01801638826434254, 0.01787320691699221, 0.017729304971214613, 0.017584716374259634, 0.017439475066175537, 0.017293614965777943, 0.017147169956713944, 0.017000173873629485, 0.01685266048844782], \"yaxis\": \"y\"}, {\"legendgroup\": \"young adult\", \"marker\": {\"color\": \"#e8b920\", \"symbol\": \"line-ns-open\"}, \"mode\": \"markers\", \"name\": \"young adult\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [39, 81, 6, 77, 40, 76, 6, 94, 72, 99, 77, 79, 35, 66, 98, 35, 73, 73, 82, 61, 87, 73, 92, 81, 73, 75, 92, 61, 65, 47, 42, 42, 60, 54, 51, 55, 59, 59, 47, 54, 52, 57, 55, 60, 41, 42, 52, 50, 49, 41, 55, 42, 54, 46, 48, 50, 56, 29, 77, 34, 71, 5, 88, 73, 10, 72, 93, 40, 87, 12, 97, 74, 22, 90, 89, 78, 1, 73, 83, 5, 93, 95, 63, 75, 86, 69, 90, 86, 88, 97, 68, 23, 69, 8, 79, 74, 18, 83], \"xaxis\": \"x\", \"y\": [\"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\", \"young adult\"], \"yaxis\": \"y2\"}, {\"legendgroup\": \"middle age\", \"marker\": {\"color\": \"#2aa8a8\", \"symbol\": \"line-ns-open\"}, \"mode\": \"markers\", \"name\": \"middle age\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [13, 29, 5, 14, 32, 31, 4, 14, 17, 26, 36, 28, 55, 52, 45, 41, 50, 46, 59, 50, 42, 53, 48, 42, 55, 44, 46, 58, 46, 49, 40, 47, 42, 48, 56, 46, 42, 59, 43, 57, 40, 58, 91, 35, 95, 75, 9, 75, 7, 36, 17, 88, 20, 76, 16, 1, 26, 75, 20, 27, 13, 10, 92, 13, 32, 15, 39, 24, 17, 85, 91, 16, 28], \"xaxis\": \"x\", \"y\": [\"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\", \"middle age\"], \"yaxis\": \"y2\"}, {\"legendgroup\": \"senior adult\", \"marker\": {\"color\": \"#e8204b\", \"symbol\": \"line-ns-open\"}, \"mode\": \"markers\", \"name\": \"senior adult\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [3, 14, 15, 4, 35, 60, 46, 56, 52, 51, 48, 55, 49, 56, 47, 51, 41, 55, 59, 50, 43, 48, 52, 43, 11, 5, 35, 15, 14], \"xaxis\": \"x\", \"y\": [\"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\", \"senior adult\"], \"yaxis\": \"y2\"}], {\"barmode\": \"overlay\", \"hovermode\": \"closest\", \"legend\": {\"traceorder\": \"reversed\"}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"title\": {\"text\": \"SPENDING SCORE x AGE CATEGORY\"}, \"xaxis\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0], \"zeroline\": false}, \"yaxis\": {\"anchor\": \"free\", \"domain\": [0.35, 1], \"position\": 0.0}, \"yaxis2\": {\"anchor\": \"x\", \"domain\": [0, 0.25], \"dtick\": 1, \"showticklabels\": false}}, {\"responsive\": true} ).then(function(){\n \nvar gd = document.getElementById('96317230-8dcd-43cc-91f1-6386241b296f');\nvar x = new MutationObserver(function (mutations, observer) {{\n var display = window.getComputedStyle(gd).display;\n if (!display || display === 'none') {{\n console.log([gd, 'removed!']);\n Plotly.purge(gd);\n observer.disconnect();\n }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n x.observe(outputEl, {childList: true});\n}}\n\n }) }; }); </script> </div>"},"metadata":{}}]},{"metadata":{},"cell_type":"markdown","source":"### SPENDING SCORE VS ANNUAL INCOME"},{"metadata":{"trusted":true},"cell_type":"code","source":"income_spend_sum = df.groupby(['income_class'])[['spending_score']].sum().reset_index()\nincome_spend_avg = df.groupby(['income_class'])[['spending_score']].mean().reset_index()\nincome_spend_avg","execution_count":22,"outputs":[{"output_type":"execute_result","execution_count":22,"data":{"text/plain":" income_class spending_score\n0 lower middle 50.333333\n1 middle 50.339623\n2 poor 49.656250\n3 upper middle 49.625000","text/html":"<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>income_class</th>\n <th>spending_score</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>lower middle</td>\n <td>50.333333</td>\n </tr>\n <tr>\n <th>1</th>\n <td>middle</td>\n <td>50.339623</td>\n </tr>\n <tr>\n <th>2</th>\n <td>poor</td>\n <td>49.656250</td>\n </tr>\n <tr>\n <th>3</th>\n <td>upper middle</td>\n <td>49.625000</td>\n </tr>\n </tbody>\n</table>\n</div>"},"metadata":{}}]},{"metadata":{"trusted":true},"cell_type":"code","source":"fig = px.scatter(df, x=\"spending_score\", y=\"annual_income\", color='age_cat')\nfig.show()","execution_count":23,"outputs":[{"output_type":"display_data","data":{"text/html":"<div> <div id=\"f0823a55-5096-4533-8e40-2dda2cfa93ee\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"f0823a55-5096-4533-8e40-2dda2cfa93ee\")) { Plotly.newPlot( \"f0823a55-5096-4533-8e40-2dda2cfa93ee\", [{\"hovertemplate\": \"age_cat=young adult<br>spending_score=%{x}<br>annual_income=%{y}<extra></extra>\", \"legendgroup\": \"young adult\", \"marker\": {\"color\": \"#636efa\", \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"young adult\", \"orientation\": \"v\", \"showlegend\": true, \"type\": \"scatter\", \"x\": [39, 81, 6, 77, 40, 76, 6, 94, 72, 99, 77, 79, 35, 66, 98, 35, 73, 73, 82, 61, 87, 73, 92, 81, 73, 75, 92, 61, 65, 47, 42, 42, 60, 54, 51, 55, 59, 59, 47, 54, 52, 57, 55, 60, 41, 42, 52, 50, 49, 41, 55, 42, 54, 46, 48, 50, 56, 29, 77, 34, 71, 5, 88, 73, 10, 72, 93, 40, 87, 12, 97, 74, 22, 90, 89, 78, 1, 73, 83, 5, 93, 95, 63, 75, 86, 69, 90, 86, 88, 97, 68, 23, 69, 8, 79, 74, 18, 83], \"xaxis\": \"x\", \"y\": [15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 23, 24, 24, 25, 28, 28, 29, 30, 33, 33, 34, 37, 38, 39, 39, 40, 40, 40, 42, 43, 46, 46, 48, 48, 48, 54, 54, 54, 57, 58, 59, 60, 60, 60, 61, 62, 62, 62, 63, 64, 65, 65, 67, 70, 70, 72, 72, 73, 73, 73, 74, 74, 75, 76, 76, 77, 77, 77, 78, 78, 78, 78, 78, 78, 79, 81, 81, 86, 87, 87, 88, 88, 93, 97, 98, 99, 101, 103, 103, 113, 120, 126, 137, 137], \"yaxis\": \"y\"}, {\"hovertemplate\": \"age_cat=senior adult<br>spending_score=%{x}<br>annual_income=%{y}<extra></extra>\", \"legendgroup\": \"senior adult\", \"marker\": {\"color\": \"#EF553B\", \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"senior adult\", \"orientation\": \"v\", \"showlegend\": true, \"type\": \"scatter\", \"x\": [3, 14, 15, 4, 35, 60, 46, 56, 52, 51, 48, 55, 49, 56, 47, 51, 41, 55, 59, 50, 43, 48, 52, 43, 11, 5, 35, 15, 14], \"xaxis\": \"x\", \"y\": [19, 19, 20, 30, 38, 43, 44, 46, 47, 48, 48, 49, 50, 50, 54, 54, 54, 59, 62, 63, 63, 63, 63, 65, 71, 75, 79, 88, 93], \"yaxis\": \"y\"}, {\"hovertemplate\": \"age_cat=middle age<br>spending_score=%{x}<br>annual_income=%{y}<extra></extra>\", \"legendgroup\": \"middle age\", \"marker\": {\"color\": \"#00cc96\", \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"middle age\", \"orientation\": \"v\", \"showlegend\": true, \"type\": \"scatter\", \"x\": [13, 29, 5, 14, 32, 31, 4, 14, 17, 26, 36, 28, 55, 52, 45, 41, 50, 46, 59, 50, 42, 53, 48, 42, 55, 44, 46, 58, 46, 49, 40, 47, 42, 48, 56, 46, 42, 59, 43, 57, 40, 58, 91, 35, 95, 75, 9, 75, 7, 36, 17, 88, 20, 76, 16, 1, 26, 75, 20, 27, 13, 10, 92, 13, 32, 15, 39, 24, 17, 85, 91, 16, 28], \"xaxis\": \"x\", \"y\": [20, 23, 25, 28, 28, 29, 33, 33, 34, 37, 39, 39, 40, 42, 43, 43, 44, 46, 47, 48, 49, 54, 54, 54, 54, 54, 54, 57, 58, 60, 60, 60, 61, 62, 62, 63, 64, 65, 67, 67, 67, 69, 69, 71, 71, 71, 71, 71, 73, 77, 78, 78, 78, 78, 78, 78, 85, 85, 86, 87, 87, 87, 87, 88, 97, 98, 99, 101, 103, 103, 113, 120, 126], \"yaxis\": \"y\"}], {\"legend\": {\"title\": {\"text\": \"age_cat\"}, \"tracegroupgap\": 0}, \"margin\": {\"t\": 60}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"spending_score\"}}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"annual_income\"}}}, {\"responsive\": true} ).then(function(){\n \nvar gd = document.getElementById('f0823a55-5096-4533-8e40-2dda2cfa93ee');\nvar x = new MutationObserver(function (mutations, observer) {{\n var display = window.getComputedStyle(gd).display;\n if (!display || display === 'none') {{\n console.log([gd, 'removed!']);\n Plotly.purge(gd);\n observer.disconnect();\n }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n x.observe(outputEl, {childList: true});\n}}\n\n }) }; }); </script> </div>"},"metadata":{}}]},{"metadata":{},"cell_type":"markdown","source":"### SPENDING SCORE SUMS & PERCENTAGES BY INCOME CLASS"},{"metadata":{"trusted":true},"cell_type":"code","source":"fig = make_subplots(rows=2, cols=2, \n specs=[[{\"type\": \"xy\"}, {\"type\": \"domain\"}], \n [{\"type\": \"xy\"}, {\"type\": \"domain\"}]], \n subplot_titles=(\"Spending Score Sums\", \"Spending Score Sum Percentages\",\n \"Spending Score Averages\", \"Spending Score Avg Percentages\"))\n\nbar_colors=['#29cf42', '#5fe373', '#9cf0a9', '#00ad1a']\npie_colors=['#29cf42', '#5fe373', '#9cf0a9', '#00ad1a']\n\nfig.add_trace(go.Bar(x=income_spend_sum['income_class'], \n y=income_spend_sum['spending_score'],\n text=income_spend_sum['spending_score'],\n textposition = 'auto',\n name='Spending Score Sums',\n opacity = 0.8, \n marker=dict(color=bar_colors, line=dict(color='#000000',width=1))), row=1, col=1)\n\nfig.add_trace(go.Bar(x=income_spend_avg['income_class'], \n y=income_spend_avg['spending_score'],\n text=income_spend_avg['spending_score'].round(2),\n textposition = 'auto',\n name='Spending Score Averages',\n opacity = 0.8, \n marker=dict(color=bar_colors, line=dict(color='#000000',width=1))), row=2, col=1)\n\n\nfig.add_trace(go.Pie(labels=income_spend_sum['income_class'], \n values=income_spend_sum['spending_score'],\n textfont=dict(size=15), opacity = 0.8,\n hole = 0.5, \n hoverinfo = \"label+percent+name\",\n domain = dict(x = [.0,.48]),\n name = \"Income Class Percent\",\n marker = dict(colors = pie_colors, line = dict(width = 1.5))), \n row=1, col=2)\n\n\nfig.add_trace(go.Pie(labels=income_spend_avg['income_class'], \n values=income_spend_avg['spending_score'],\n textfont=dict(size=15), opacity = 0.8,\n hole = 0.5, \n hoverinfo = \"label+percent+name\",\n domain = dict(x = [.0,.48]),\n name = \"Income Class Percent\",\n marker = dict(colors = pie_colors, line = dict(width = 1.5))), \n row=2, col=2)\n\nfig.update_layout(height=800, showlegend=True)\n\nfig.show()","execution_count":35,"outputs":[{"output_type":"display_data","data":{"text/html":"<div> <div id=\"8622b772-11ef-4f75-8cdc-528cc6d5c5a6\" class=\"plotly-graph-div\" style=\"height:800px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"8622b772-11ef-4f75-8cdc-528cc6d5c5a6\")) { Plotly.newPlot( \"8622b772-11ef-4f75-8cdc-528cc6d5c5a6\", [{\"marker\": {\"color\": [\"#29cf42\", \"#5fe373\", \"#9cf0a9\", \"#00ad1a\"], \"line\": {\"color\": \"#000000\", \"width\": 1}}, \"name\": \"Spending Score Sums\", \"opacity\": 0.8, \"text\": [2718.0, 5336.0, 1589.0, 397.0], \"textposition\": \"auto\", \"type\": \"bar\", \"x\": [\"lower middle\", \"middle\", \"poor\", \"upper middle\"], \"xaxis\": \"x\", \"y\": [2718, 5336, 1589, 397], \"yaxis\": \"y\"}, {\"marker\": {\"color\": [\"#29cf42\", \"#5fe373\", \"#9cf0a9\", \"#00ad1a\"], \"line\": {\"color\": \"#000000\", \"width\": 1}}, \"name\": \"Spending Score Averages\", \"opacity\": 0.8, \"text\": [50.33, 50.34, 49.66, 49.62], \"textposition\": \"auto\", \"type\": \"bar\", \"x\": [\"lower middle\", \"middle\", \"poor\", \"upper middle\"], \"xaxis\": \"x2\", \"y\": [50.333333333333336, 50.339622641509436, 49.65625, 49.625], \"yaxis\": \"y2\"}, {\"domain\": {\"x\": [0.55, 1.0], \"y\": [0.625, 1.0]}, \"hole\": 0.5, \"hoverinfo\": \"label+percent+name\", \"labels\": [\"lower middle\", \"middle\", \"poor\", \"upper middle\"], \"marker\": {\"colors\": [\"#29cf42\", \"#5fe373\", \"#9cf0a9\", \"#00ad1a\"], \"line\": {\"width\": 1.5}}, \"name\": \"Income Class Percent\", \"opacity\": 0.8, \"textfont\": {\"size\": 15}, \"type\": \"pie\", \"values\": [2718, 5336, 1589, 397]}, {\"domain\": {\"x\": [0.55, 1.0], \"y\": [0.0, 0.375]}, \"hole\": 0.5, \"hoverinfo\": \"label+percent+name\", \"labels\": [\"lower middle\", \"middle\", \"poor\", \"upper middle\"], \"marker\": {\"colors\": [\"#29cf42\", \"#5fe373\", \"#9cf0a9\", \"#00ad1a\"], \"line\": {\"width\": 1.5}}, \"name\": \"Income Class Percent\", \"opacity\": 0.8, \"textfont\": {\"size\": 15}, \"type\": \"pie\", \"values\": [50.333333333333336, 50.339622641509436, 49.65625, 49.625]}], {\"annotations\": [{\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Spending Score Sums\", \"x\": 0.225, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 1.0, \"yanchor\": \"bottom\", \"yref\": \"paper\"}, {\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Spending Score Sum Percentages\", \"x\": 0.775, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 1.0, \"yanchor\": \"bottom\", \"yref\": \"paper\"}, {\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Spending Score Averages\", \"x\": 0.225, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 0.375, \"yanchor\": \"bottom\", \"yref\": \"paper\"}, {\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Spending Score Avg Percentages\", \"x\": 0.775, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 0.375, \"yanchor\": \"bottom\", \"yref\": \"paper\"}], \"height\": 800, \"showlegend\": true, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 0.45]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 0.45]}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.625, 1.0]}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.375]}}, {\"responsive\": true} ).then(function(){\n \nvar gd = document.getElementById('8622b772-11ef-4f75-8cdc-528cc6d5c5a6');\nvar x = new MutationObserver(function (mutations, observer) {{\n var display = window.getComputedStyle(gd).display;\n if (!display || display === 'none') {{\n console.log([gd, 'removed!']);\n Plotly.purge(gd);\n observer.disconnect();\n }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n x.observe(outputEl, {childList: true});\n}}\n\n }) }; }); </script> </div>"},"metadata":{}}]},{"metadata":{},"cell_type":"markdown","source":"### INCOME X AGE"},{"metadata":{"trusted":true},"cell_type":"code","source":"fig = px.scatter(df, x=\"age\", y=\"annual_income\", color='income_class')\nfig.show()","execution_count":25,"outputs":[{"output_type":"display_data","data":{"text/html":"<div> <div id=\"c8207db7-0b4c-424a-be38-8988c01e1191\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"c8207db7-0b4c-424a-be38-8988c01e1191\")) { Plotly.newPlot( \"c8207db7-0b4c-424a-be38-8988c01e1191\", [{\"hovertemplate\": \"income_class=poor<br>age=%{x}<br>annual_income=%{y}<extra></extra>\", \"legendgroup\": \"poor\", \"marker\": {\"color\": \"#636efa\", \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"poor\", \"orientation\": \"v\", \"showlegend\": true, \"type\": \"scatter\", \"x\": [19, 21, 20, 23, 31, 22, 35, 23, 64, 30, 67, 35, 58, 24, 37, 22, 35, 20, 52, 35, 35, 25, 46, 31, 54, 29, 45, 35, 40, 23, 60, 21], \"xaxis\": \"x\", \"y\": [15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 23, 23, 24, 24, 25, 25, 28, 28, 28, 28, 29, 29, 30, 30], \"yaxis\": \"y\"}, {\"hovertemplate\": \"income_class=lower middle<br>age=%{x}<br>annual_income=%{y}<extra></extra>\", \"legendgroup\": \"lower middle\", \"marker\": {\"color\": \"#EF553B\", \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"lower middle\", \"orientation\": \"v\", \"showlegend\": true, \"type\": \"scatter\", \"x\": [53, 18, 49, 21, 42, 30, 36, 20, 65, 24, 48, 31, 49, 24, 50, 27, 29, 31, 49, 33, 31, 59, 50, 47, 51, 69, 27, 53, 70, 19, 67, 54, 63, 18, 43, 68, 19, 32, 70, 47, 60, 60, 59, 26, 45, 40, 23, 49, 57, 38, 67, 46, 21, 48], \"xaxis\": \"x\", \"y\": [33, 33, 33, 33, 34, 34, 37, 37, 38, 38, 39, 39, 39, 39, 40, 40, 40, 40, 42, 42, 43, 43, 43, 43, 44, 44, 46, 46, 46, 46, 47, 47, 48, 48, 48, 48, 48, 48, 49, 49, 50, 50, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54], \"yaxis\": \"y\"}, {\"hovertemplate\": \"income_class=middle<br>age=%{x}<br>annual_income=%{y}<extra></extra>\", \"legendgroup\": \"middle\", \"marker\": {\"color\": \"#00cc96\", \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"middle\", \"orientation\": \"v\", \"showlegend\": true, \"type\": \"scatter\", \"x\": [55, 22, 34, 50, 68, 18, 48, 40, 32, 24, 47, 27, 48, 20, 23, 49, 67, 26, 49, 21, 66, 54, 68, 66, 65, 19, 38, 19, 18, 19, 63, 49, 51, 50, 27, 38, 40, 39, 23, 31, 43, 40, 59, 38, 47, 39, 25, 31, 20, 29, 44, 32, 19, 35, 57, 32, 28, 32, 25, 28, 48, 32, 34, 34, 43, 39, 44, 38, 47, 27, 37, 30, 34, 30, 56, 29, 19, 31, 50, 36, 42, 33, 36, 32, 40, 28, 36, 36, 52, 30, 58, 27, 59, 35, 37, 32, 46, 29, 41, 30, 54, 28, 41, 36, 34, 32], \"xaxis\": \"x\", \"y\": [57, 57, 58, 58, 59, 59, 60, 60, 60, 60, 60, 60, 61, 61, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 64, 64, 65, 65, 65, 65, 67, 67, 67, 67, 69, 69, 70, 70, 71, 71, 71, 71, 71, 71, 72, 72, 73, 73, 73, 73, 74, 74, 75, 75, 76, 76, 77, 77, 77, 77, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 79, 79, 81, 81, 85, 85, 86, 86, 87, 87, 87, 87, 87, 87, 88, 88, 88, 88, 93, 93, 97, 97, 98, 98, 99, 99, 101, 101, 103, 103, 103, 103], \"yaxis\": \"y\"}, {\"hovertemplate\": \"income_class=upper middle<br>age=%{x}<br>annual_income=%{y}<extra></extra>\", \"legendgroup\": \"upper middle\", \"marker\": {\"color\": \"#ab63fa\", \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"upper middle\", \"orientation\": \"v\", \"showlegend\": true, \"type\": \"scatter\", \"x\": [33, 38, 47, 35, 45, 32, 32, 30], \"xaxis\": \"x\", \"y\": [113, 113, 120, 120, 126, 126, 137, 137], \"yaxis\": \"y\"}], {\"legend\": {\"title\": {\"text\": \"income_class\"}, \"tracegroupgap\": 0}, \"margin\": {\"t\": 60}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"age\"}}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"annual_income\"}}}, {\"responsive\": true} ).then(function(){\n \nvar gd = document.getElementById('c8207db7-0b4c-424a-be38-8988c01e1191');\nvar x = new MutationObserver(function (mutations, observer) {{\n var display = window.getComputedStyle(gd).display;\n if (!display || display === 'none') {{\n console.log([gd, 'removed!']);\n Plotly.purge(gd);\n observer.disconnect();\n }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n x.observe(outputEl, {childList: true});\n}}\n\n }) }; }); </script> </div>"},"metadata":{}}]},{"metadata":{"trusted":true},"cell_type":"code","source":"age_income_avg = df.groupby(['age_cat'])[['annual_income']].mean().reset_index()\n\nfig = make_subplots(rows=1, cols=2, \n specs=[[{\"type\": \"xy\"}, {\"type\": \"domain\"}]], \n subplot_titles=(\"Income Averages\", \"Income Percentages\"))\n\n\nbar_colors=['#4c98a1','#2aa8a8', '#006e6e']\npie_colors=['#4c98a1','#2aa8a8', '#006e6e']\n\nfig.add_trace(go.Bar(x=age_income_avg['age_cat'], \n y=age_income_avg['annual_income'],\n text=age_income_avg['annual_income'].round(2),\n textposition = 'auto',\n name='Income Averages',\n opacity = 0.8, \n marker=dict(color=bar_colors, line=dict(color='#000000',width=1))), row=1, col=1)\n\nfig.add_trace(go.Pie(labels=age_income_avg['age_cat'], \n values=age_income_avg['annual_income'],\n textfont=dict(size=15), opacity = 0.8,\n hole = 0.5, \n hoverinfo = \"label+percent+name\",\n domain = dict(x = [.0,.48]),\n name = \"Income Percentages\",\n marker = dict(colors = pie_colors, line = dict(width = 1.5))), \n row=1, col=2)\n\n\n\nfig.update_layout(height=500, showlegend=True)\n\nfig.show()","execution_count":27,"outputs":[{"output_type":"display_data","data":{"text/html":"<div> <div id=\"1fd91593-4ef9-4c29-a93b-e6b238bea0d2\" class=\"plotly-graph-div\" style=\"height:500px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"1fd91593-4ef9-4c29-a93b-e6b238bea0d2\")) { Plotly.newPlot( \"1fd91593-4ef9-4c29-a93b-e6b238bea0d2\", [{\"marker\": {\"color\": [\"#4c98a1\", \"#2aa8a8\", \"#006e6e\"], \"line\": {\"color\": \"#000000\", \"width\": 1}}, \"name\": \"Income Averages\", \"opacity\": 0.8, \"text\": [64.79, 53.69, 59.44], \"textposition\": \"auto\", \"type\": \"bar\", \"x\": [\"middle age\", \"senior adult\", \"young adult\"], \"xaxis\": \"x\", \"y\": [64.79452054794521, 53.689655172413794, 59.43877551020408], \"yaxis\": \"y\"}, {\"domain\": {\"x\": [0.55, 1.0], \"y\": [0.0, 1.0]}, \"hole\": 0.5, \"hoverinfo\": \"label+percent+name\", \"labels\": [\"middle age\", \"senior adult\", \"young adult\"], \"marker\": {\"colors\": [\"#4c98a1\", \"#2aa8a8\", \"#006e6e\"], \"line\": {\"width\": 1.5}}, \"name\": \"Income Percentages\", \"opacity\": 0.8, \"textfont\": {\"size\": 15}, \"type\": \"pie\", \"values\": [64.79452054794521, 53.689655172413794, 59.43877551020408]}], {\"annotations\": [{\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Income Averages\", \"x\": 0.225, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 1.0, \"yanchor\": \"bottom\", \"yref\": \"paper\"}, {\"font\": {\"size\": 16}, \"showarrow\": false, \"text\": \"Income Percentages\", \"x\": 0.775, \"xanchor\": \"center\", \"xref\": \"paper\", \"y\": 1.0, \"yanchor\": \"bottom\", \"yref\": \"paper\"}], \"height\": 500, \"showlegend\": true, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 0.45]}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.0, 1.0]}}, {\"responsive\": true} ).then(function(){\n \nvar gd = document.getElementById('1fd91593-4ef9-4c29-a93b-e6b238bea0d2');\nvar x = new MutationObserver(function (mutations, observer) {{\n var display = window.getComputedStyle(gd).display;\n if (!display || display === 'none') {{\n console.log([gd, 'removed!']);\n Plotly.purge(gd);\n observer.disconnect();\n }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n x.observe(outputEl, {childList: true});\n}}\n\n }) }; }); </script> </div>"},"metadata":{}}]}],"metadata":{"kernelspec":{"name":"python3","display_name":"Python 3","language":"python"},"language_info":{"name":"python","version":"3.7.9","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat":4,"nbformat_minor":4}