You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1134 lines
1.1 MiB
1134 lines
1.1 MiB
2 years ago
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"___\n",
|
||
|
"\n",
|
||
|
"<a href='http://www.pieriandata.com'><img src='../Pierian_Data_Logo.png'/></a>\n",
|
||
|
"___\n",
|
||
|
"<center><em>Copyright by Pierian Data Inc.</em></center>\n",
|
||
|
"<center><em>For more information, visit us at <a href='http://www.pieriandata.com'>www.pieriandata.com</a></em></center>"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Categorical Plots - Distribution within Categories"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"So far we've seen how to apply a statistical estimation (like mean or count) to categories and compare them to one another. Let's now explore how to visualize the distribution within categories. We already know about distplot() which allows to view the distribution of a single feature, now we will break down that same distribution per category."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Imports"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 2,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import numpy as np\n",
|
||
|
"import pandas as pd\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"import seaborn as sns"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## The Data"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 6,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"df = pd.read_csv(\"StudentsPerformance.csv\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 7,
|
||
|
"metadata": {
|
||
|
"scrolled": true
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"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>gender</th>\n",
|
||
|
" <th>race/ethnicity</th>\n",
|
||
|
" <th>parental level of education</th>\n",
|
||
|
" <th>lunch</th>\n",
|
||
|
" <th>test preparation course</th>\n",
|
||
|
" <th>math score</th>\n",
|
||
|
" <th>reading score</th>\n",
|
||
|
" <th>writing score</th>\n",
|
||
|
" </tr>\n",
|
||
|
" </thead>\n",
|
||
|
" <tbody>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>0</th>\n",
|
||
|
" <td>female</td>\n",
|
||
|
" <td>group B</td>\n",
|
||
|
" <td>bachelor's degree</td>\n",
|
||
|
" <td>standard</td>\n",
|
||
|
" <td>none</td>\n",
|
||
|
" <td>72</td>\n",
|
||
|
" <td>72</td>\n",
|
||
|
" <td>74</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>1</th>\n",
|
||
|
" <td>female</td>\n",
|
||
|
" <td>group C</td>\n",
|
||
|
" <td>some college</td>\n",
|
||
|
" <td>standard</td>\n",
|
||
|
" <td>completed</td>\n",
|
||
|
" <td>69</td>\n",
|
||
|
" <td>90</td>\n",
|
||
|
" <td>88</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>2</th>\n",
|
||
|
" <td>female</td>\n",
|
||
|
" <td>group B</td>\n",
|
||
|
" <td>master's degree</td>\n",
|
||
|
" <td>standard</td>\n",
|
||
|
" <td>none</td>\n",
|
||
|
" <td>90</td>\n",
|
||
|
" <td>95</td>\n",
|
||
|
" <td>93</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>3</th>\n",
|
||
|
" <td>male</td>\n",
|
||
|
" <td>group A</td>\n",
|
||
|
" <td>associate's degree</td>\n",
|
||
|
" <td>free/reduced</td>\n",
|
||
|
" <td>none</td>\n",
|
||
|
" <td>47</td>\n",
|
||
|
" <td>57</td>\n",
|
||
|
" <td>44</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>4</th>\n",
|
||
|
" <td>male</td>\n",
|
||
|
" <td>group C</td>\n",
|
||
|
" <td>some college</td>\n",
|
||
|
" <td>standard</td>\n",
|
||
|
" <td>none</td>\n",
|
||
|
" <td>76</td>\n",
|
||
|
" <td>78</td>\n",
|
||
|
" <td>75</td>\n",
|
||
|
" </tr>\n",
|
||
|
" </tbody>\n",
|
||
|
"</table>\n",
|
||
|
"</div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
" gender race/ethnicity parental level of education lunch \\\n",
|
||
|
"0 female group B bachelor's degree standard \n",
|
||
|
"1 female group C some college standard \n",
|
||
|
"2 female group B master's degree standard \n",
|
||
|
"3 male group A associate's degree free/reduced \n",
|
||
|
"4 male group C some college standard \n",
|
||
|
"\n",
|
||
|
" test preparation course math score reading score writing score \n",
|
||
|
"0 none 72 72 74 \n",
|
||
|
"1 completed 69 90 88 \n",
|
||
|
"2 none 90 95 93 \n",
|
||
|
"3 none 47 57 44 \n",
|
||
|
"4 none 76 78 75 "
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 7,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df.head()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Boxplot\n",
|
||
|
"\n",
|
||
|
"As described in the video, a boxplot display distribution through the use of quartiles and an IQR for outliers."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 17,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='parental level of education', ylabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 17,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAFzCAYAAAAe3J47AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAAs/klEQVR4nO3de5hddX33/fc3B0gwQCAJiIwYJVGLSqlEHk+lWEhuY/uIVhS81I6W3lQfm2h7V8XWW8FTUfvU3sFDxeO0UlE8VIpGEhGwKqdwCmcTNcAoQiYCBgMkId/7j7WGbCYzkz1Ze8+aPfv9uq5cs/fa6/Dda6299ie//VtrRWYiSZIkac9MqbsASZIkqZMZqCVJkqQKDNSSJElSBQZqSZIkqQIDtSRJklSBgVqSJEmqYFrdBVQxd+7cnD9/ft1lSJIkaZK75pprBjJz3nCvdXSgnj9/PmvWrKm7DEmSJE1yEXHHSK/Z5UOSJEmqwEAtSZIkVWCgliRJkiowUEuSJEkVGKglSZKkCgzUkiRJUgUGakmSJKkCA7UkSZJUgYFakiRJqqBtgToivhAR90bETQ3DDoyI1R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8dNVfSnDsfnMrT6y5CkqQO1VSgjoinAAsz8/sRMROYlpmb92SBmfnriLgrIp6RmbcDxwO3lP96gbPKv9/ek/lr8unEK4dsXbcOgBnzF9ZcSXOeTmeuZ0mSJoLdBuqI+J/AacCBwOFAD/CvFEF4Ty0Dzi2v8PFz4E0U3U++FhGnAncCr64wf00iXqVFkiRNZM20UL8VOAa4EiAz10XEsCcMNiszrwcWDfNSlZAuSZIkjbtmTkp
|
||
|
"text/plain": [
|
||
|
"<Figure size 864x432 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure(figsize=(12,6))\n",
|
||
|
"sns.boxplot(x='parental level of education',y='math score',data=df)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"### Adding hue for further segmentation"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 19,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.legend.Legend at 0x2116e6b9948>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 19,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAzwAAAFzCAYAAAD7Zwx+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAA2wElEQVR4nO3de5wcZZ3v8e93ZkgyGK5DiDgYAiYE0IBC5CgqAiburOuBdQWRFTMqLKuHTaIeVxA53LzFC+sm8bIgC0xWUCB4QcSBBAEVEUi4JSHEjBAu4RaGSwIJSWbmd/6oGtJM5tKT6Z7urv68X695TXX1U0/9uqq6un/9PPWUI0IAAAAAkEU1pQ4AAAAAAIqFhAcAAABAZpHwAAAAAMgsEh4AAAAAmUXCAwAAACCzSHgAAAAAZFZdqQMYij322CPGjx9f6jAAAACQcUuWLHkuIsaUOIY96+rqLpH0NtFw0a1L0rKOjo5TDzvssGd7K1DRCc/48eO1ePHiUocBAACAjLP9aKljqKuru+SNb3zjgWPGjHmhpqaGm2lK6urq8tq1aw96+umnL5F0bG9lyAwBAACAyvC2MWPGrCPZ2aqmpibGjBnzkpJWr97LDGM8AAAAALZfDcnOttJt0mdeQ8IDAAAAIG9f//rX99xvv/3eeuyxx+5bjPq/+MUvvumcc84ZW6j6KvoaHgAAAKBa/cvpMyc998K6EYWqb4/ddt78kx/OXTlQuf/+7/8e87vf/W7VAQccsLlQ6y4mEh4AAACgAj33wroRjzUeU7CER2t+P2CRf/7nfx73xBNPjDz22GMnfOQjH3n+4YcfHrVixYr6zs5Of/WrX33y5JNPfnHu3LkN11133a5dXV1euXJl/emnn/705s2ba6666qqGESNGdN10002rxo4d23nhhRfucdlll43ZsmWLx48fv2nBggWP7LTTTl2561u+fPnIz372s+Oef/75ulGjRnVdcsklj77jHe94dTAviy5tAAAAAPJy5ZVXPrbnnntuue222/76yiuv1B599NHrli1btuKPf/zjyrPPPnvvdevW1UjSX//61/prr7324bvvvnvFt771rcYdd9yxa8WKFQ9OmTLllYsuuqhBkj7xiU+8sGzZshUrV658cNKkSRvnzp27R8/1nXrqqfv86Ec/emz58uUrvvvd7z7xuc99btxgY6aFBwAAAMCg3XrrrTvfeOONu86dO/eNkrRp0ya3tbWNkKQjjjhi/W677da12267dY0ePbrzhBNOeFGSJk+evOGBBx7YUZKWLFlSf8455zSuX7++9pVXXql9//vf/1Ju/S+99FLNvffeO/qEE054S/e8zZs3e7BxkvAAAAAAGLSI0IIFC9oOOeSQTbnz//SnP71hxIgRr40mV1NT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89x/7bhtdXV1drqmpiYGLVo+uri5L6vOGpYzSBqAibdy4kS5iAPLC+aJyse+2sWzt2rW7pF/woSTZWbt27S6SlvVVhhYeAGWD7mEA8sX5orLlu//Yd6/X0dFx6tNPP33J008//TbRcNGtS9Kyjo6OU/sqQMIDAAAAVIDDDjvsWUnHljqOSkNmCAAAACCzSHgAAAAAZBYJDwAAAIDMIuEBAAAAkFkkPAAAAAAyi4QHAAAAQGaR8AAAAADILBIeAAAAAJlFwgMAAAAgs0h4AAAAAGQWCQ8AAACAzCLhAQAAAJBZJDwAAAAAMouEBwAAAEBm1ZU6AAAAUFrz5s1TW1tbXmXXrFkjSWpsbMyr/IQJEzRjxoztjg0AhoqEBwAA5G3jxo2lDgEABoWEBwCAKjeYFphZs2ZJkubMmVOscACgoLiGBwAAAEB
|
||
|
"text/plain": [
|
||
|
"<Figure size 864x432 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure(figsize=(12,6))\n",
|
||
|
"sns.boxplot(x='parental level of education',y='math score',data=df,hue='gender')\n",
|
||
|
"\n",
|
||
|
"# Optional move the legend outside\n",
|
||
|
"plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"### Boxplot Styling Parameters\n",
|
||
|
"\n",
|
||
|
"#### Orientation"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 26,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='math score', ylabel='parental level of education'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 26,
|
||
|
"metadata": {},
|
||
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Wz6ipnwtACSRcB/5meHw3cnV9IlZP0JuBXwERgOHBmRFwp6UBgNtlx3gWcFBFrJS0FLgcOIPsgcAJwFtAEnB0R56f9/hvwj8AmwNUR8c0SbX8A+G5qtzMiDpS0OXAxsB3ZbOUTImJRL/G/g2xYfItU/9MR8XAq/0Xa91zg5IgYU25sVp7W1lYiAoD169fT2trKySefXHGdarXVn/odHR2sXr3a13n2oq2tjY27Bs+KpH9bNYxX2tr8M+9FW1sbo0aNymXf5fwmnQQsBmYBnydbaejEXKLpvw8AT0XElIjYGbhB0kjgUuDIiNiFLIGeVLTNExGxD3B7qncEsDdwBoCk6cBkYC9gKrBH93O9krYAfgYcHhFTgI+ll74F3BsRuwJfAy7rI/4LgJkRsQdwCtm5ZYBzgHMiYk/gqaJ2+4wt1TtB0gJJC5YtW9ZHCEPX/Pnz6erK5sB1dXUxb968ftWpVlt5tGtm1VXObNu1wA/SV6O6H5idlhK8NiJulzQFWJKGmQFagc8CP0rPrynadkxErARWSlojaSwwPX3dm+qNIUtYxcsS7g3cFhFLACLi+VS+L3B4KvudpHGSNisVuKQxwLuBX0sqFG+Svu9DtsITZD3l2elxObEREReQJWamTZsWpdo3OPjgg7n++uvp6upixIgRTJ8+vV91qtVWf+oXbrxcWFHF3mjWrFmsWXpXvcOomq1Gr2fkpMn+mfciz155jz1PSb9K3++XtKj7V24R9UNKkHuQJcKzJJ0GqPet/m/Bh/W8fvWk9WQfKgScFRFT01dTRFzUbR8iW+e3u1Jt95S8hgHLi9qZGhHv6iP2cmKzMjU3N1P44DJs2DCam5v7VadabeXRrplVV2/Dtp9P3z8MfKTEV8OQtDWwKiJ+TtY
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"# NOTICE HOW WE HAVE TO SWITCH X AND Y FOR THE ORIENTATION TO MAKE SENSE!\n",
|
||
|
"sns.boxplot(x='math score',y='parental level of education',data=df,orient='h')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"#### Width"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 29,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='parental level of education', ylabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 29,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAFzCAYAAAAe3J47AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAA3eUlEQVR4nO3deZhcVZ34//cn3SELYZEmZiCIBMOwhjAQHRdkTaRHR3ABgUdNo86Xr1sSGQcRFNl+MjjydYbEcRQE6SCMCqggZloSZBlkTUggQWBoMECQgdAKEiBLJ+f3x70dKp3eq6urquv9ep48feuun7qn6tYn5557TqSUkCRJkjQwI8odgCRJklTNTKglSZKkIphQS5IkSUUwoZYkSZKKYEItSZIkFcGEWpIkSSpCfbkDKMbOO++c9thjj3KHIUmSpGFuyZIlL6aUxne1rKoT6j322IPFixeXOwxJkiQNcxHxVHfLbPIhSZIkFcGEWpIkSSqCCbUkSZJUBBNqSZIkqQgm1JIkSVIRTKglSZKkIphQS5IkSUUwoZYkSZKKYEIt9VNbWxuzZ8+mra2t3KFIkqQKULKEOiKuiIgXImJFwbydImJhRDye/31TwbIzI6I1Ih6LiGNKFZdUrObmZpYvX878+fPLHYokSaoApayhvhJo7DTvq8AtKaW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mTWu9hx4S6gj29po4LH9i+y2Udt1UmjN3U4/Z7lSQySZIkdTChrlBpxEhim20Y9dbJXS5f39oK0O1ygL2AyZO7Xy5JkqTimVBXqE2jt2fynhO45JJLulw
|
||
|
"text/plain": [
|
||
|
"<Figure size 864x432 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure(figsize=(12,6))\n",
|
||
|
"sns.boxplot(x='parental level of education',y='math score',data=df,hue='gender',width=0.3)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Violinplot\n",
|
||
|
"\n",
|
||
|
"A violin plot plays a similar role as a box and whisker plot. It shows the distribution of quantitative data across several levels of one (or more) categorical variables such that those distributions can be compared. Unlike a box plot, in which all of the plot components correspond to actual datapoints, the violin plot features a kernel density estimation of the underlying distribution."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 30,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='parental level of education', ylabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 30,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAFzCAYAAAAe3J47AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAACjHElEQVR4nOzdd3hb5dn48e9ztCzvvZI4TuLsPYAkBAqEsMLes0BZ7dsWWvqjBfq2tNBS4IUOaGlLy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qidfjVavUJuP1evnwgw8Yfohyj4giBH2E4O0331R18CbX3NyMw+LEbnGqhDrBbN26lfSODh+ZNgu7d+8mEDj4jG0yi+UK9VPAaQdcdjswV0o5GJjb8T1CiBHApcDIjt95VAhhIcmtW7eO1atW4SsafsTNiAcKlozA7/PxzjvvxDA6pTtWLF9O/+wQaYf5XzskN4jX59s7mlwxh6VLl7Ju7TpCVR3TEQ8nHyiEF158Qb0pMpH58+fT7vEwsZPrTZSSLdu2sXq1mlpqZg0NDTis6aRZ02moT722a4lKSsnmTZvIsIVfADNtVnRdZ9u2bQZHFl8xS6illJ8AB46HOwd4uuPrp4Fz97n8BSmlT0q5BdgIHB2r2Mzi5ZdfRlhtBIuGHPQz+7YvsG/74pC/p2cUomeX8vIrr6TkNCKzCQaDrFmzhiHZ374bf3adk2fXOfd+H2mlF2mtp5jDU08/hXAKZGXnK5ehoSH21O5RveBN5PVZsygUGpX7XPYOknfY//4cDdiF4I033ohneEo3NTY0kmbLIM2eSWO
|
||
|
"text/plain": [
|
||
|
"<Figure size 864x432 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure(figsize=(12,6))\n",
|
||
|
"sns.violinplot(x='parental level of education',y='math score',data=df)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 31,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='parental level of education', ylabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 31,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtYAAAF3CAYAAACBuAwQAAAAOXRFWHRTb2Z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gg+1iYmJiYmJiYmJjoRDodRUFBgBtWTIISgoKAg5Sy+GVibmJiYmJiYmDzhmEH1o6TzNzEDaxMTExMTExMTE8PyzW9+E++//77e00gKM7A2MTExMTExMTF5bBAEQbexzcDaxMTExMTExMREEf76r/8aK1euxP79+/H1r38dP/jBD9Dc3IwXX3wRmzdvxq5du1BXVwcglon+t//23+KZZ57B4sWLE1lpSim+853vYPXq1XjllVcwMDCQOP7NmzexZ88ebN68GQcPHkRvby8AYO/evfjud7+LPXv24H/+z/+p/S8ex3QFMTExMTExMTExyZgbN27ggw8+QHV1NQRBwKZNm7B582Z861vfwj/+4z9i2bJluHr1Kv7oj/4IZ86cAQD09vbi4sWLqKurw6FDh/DVr34VH330Eerr63H79m309/dj9erV+Ff/6l+B53n8yZ/8CT755BMUFRXhnXfewV/91V/hJz/5CQDA5/Ph/Pnzev4JzMDaxMTExMTExMQkcy5evIjXX38dDocDAPDaa68hHA7j0qVL+NrXvpZ4XiQSSXz9xhtvgGEYrF69Gv39/QCACxcu4Otf/zpYlkV5eTmef/55AEB9fT3u3LmD/fv3AwBEUURZWVniWP/iX/wL1X/HuTADa4X45JNPcPrMGfzHv/gLlJeX6z0dExMTExMTExNNma6btyRJ8Hq9qKmpmfY1Nptt2tdP58hBKcWaNWtw+fLlaY/lcrlSnLHymBprhfj1r3+NW7W1uHfvnt5TMTExMTExMTHRnGeffRZHjhxBOBxGIBDAsWPH4HQ6sWjRIrz33nsAYsFxbW3trMfZvXs33n77bYiiiN7eXpw9exYAsGLFCgwODiYCa57ncffuXXV/qRQxA2uFEEURABAKhXSeSfJ8/PHHOHXqlN7TMDExMTExMXkMePrpp3Ho0CFs2LABb731FrZs2YLc3Fz8+te/xo9//GNs2LABa9aswSeffDLrcd58800sW7YM69atw7e//W3s2bMHAGC1WvH+++/jL/7iL7BhwwZs3LgRly5d0uJXSxoyXdo+29iyZQu9ceOGrnN4662vYGRkGN/+9rcNofGZC0opnnvuOQDAuXPn9J2MiYmJiYmJiW7c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YBoZG0FyyR7lB+s/P+ZR/82/+DVpaWnDo0CH87u/+Lpqbm3H79m0IgoDvf//7eP311/Gzn/0MH3/8MURRxJ07d/Af/sN/QDQaxS9/+UvYbDYcP34c+fn5+Od//mf86Ec/QjQaxdKlS/HLX/4STqfzofGam5vxx3/8xxgcHITT6cQ///M/Y+XKlRn/qqYURAH6+/shWd2QrK7E90ZncmDty5KCS7XIli3oycjnbMwfeOLlBLLePFtqBSYH1pMdhZ5EJr93s6UQd3Kh18iIchm9bMQMrB8PjHIe//Ef/xHl5eU4e/YsJiYm8Pzzz+P69es4e/Ys/vzP/zyRPLlz5w5+85vf4Nq1a/irv/orOJ1OVFdXY8eOHfjFL34BAHjrrbdw/fp11NbWYtWqVfjxj3/8yHjf+ta38MMf/hA3b97ED37wA/zRH/2RIr+HmbFWgO6eXoicC9TmAQD09fXpPKO5GR0dhdcOjEXMwDrbAmtJkjA2Pg4bSxERJfj9fni9Xr2npRvyxTZbAmtzt+gBk7PU2XL+hgYH4LVK8EUZM7A2SEBmkhmCIMBqteo9jYc4ceIEDh8+nNBDh8NhdHR0AACee+45eDweeDwe5Obm4rXXXgMArFu3Drdu3QIQC77/03/6T/D5fAgEAjh48OBDxw8EArh06RK+9rWvJR5TSo5mBtYZQilFb08
|
||
|
"text/plain": [
|
||
|
"<Figure size 864x432 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure(figsize=(12,6))\n",
|
||
|
"sns.violinplot(x='parental level of education',y='math score',data=df,hue='gender')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"### Violinplot Parameters\n",
|
||
|
"\n",
|
||
|
"#### split\n",
|
||
|
"When using hue nesting with a variable that takes two levels, setting split to True will draw half of a violin for each level. This can make it easier to directly compare the distributions."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 32,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='parental level of education', ylabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 32,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtYAAAF3CAYAAACBuAwQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAACqmElEQVR4nOzdd3hUZfbA8e87fSa9QkINvXcEQUVArAhixd7W3lbXrtj7urs/xXV37b2C2BBFUSwgTXovAUKA9J5Mn/f3xyRICZAyM/dO8n6eh4dkkrn3aMjMue897zlCSomiKIqiKIqiKM1j0DoARVEURVEURWkJVGKtKIqiKIqiKCGgEmtFURRFURRFCQGVWCuKoiiKoihKCKjEWlEURVEURVFCQCXWiqIoiqIoihICYU+shRBvCCEKhBBr93vs70KIjUKI1UKIWUKIxP2+dp8QYqsQYpMQ4pRwx6coiqIoiqIooRCJFeu3gFMPeux7oJ+UcgCwGbgPQAjRB5gK9K19zstCCGMEYlQURVEURVGUZgl7Yi2l/AUoOeixuVJKX+2ni4D2tR9PBj6SUrqllNuBrcAx4Y5RURRFURRFUZpLDzXWVwFzaj9uB+za72u5tY8piqIoiqIoiq6ZtDy5EOIBwAe8X/dQPd9W78x1IcS1wLUAMTExQ3v16hWWGBVFURRFURSlzh9//FEkpUyr72uaJdZCiMuBicB4KWVd8pwLdNjv29oDe+p7vpTyFeAVgGHDhslly5aFMVpFURRFURRFASHEzsN9TZNSECHEqcA9wCQpZc1+X/oSmCqEsAohsoDuwBItYlQURVE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ffddHA7HAefbtm0bN910E4WFhTgcDl599VV69erV7P9UVQqiU6tWrUJY7ASsfw422LlDjTWPZgdvRlX0raCwkLobmXv27NE0FqVxDk7Mtm3bplEkSlO4XC6tQ1A08N///pfMzEx++uknqqurGTduHEuXLuWnn37irrvu2tfpZ+3atXzwwQcsWbKEBx54AIfDwYoVKzj22GN55513ADj77LNZunQpq1atonfv3rz++uuHnO/aa69l+vTp/PHHHzz//PPceOONIfnvUCvWOiSlZPmKFXhi2ux7LMkSIHf3bjweDxaLRcPolIbyer21H0nMBkF2dram8SiNk59fsO/jnJ07tAtEabT9u/DEmwNsVL2so4pasVbmzp3Ll19+ua8e2uVy7btzOHbsWOLi4oiLiyMhIYEzzzwTgP79+7N69WogmHw/+OCDlJWVUVVVxSmnnHLA8auqqli4cCHnnXfevsdC9e9OJdY6lJOTQ1FhIf5O3fY91iHOx+piAzt27KBHjx4aRqc0VF0PT4OA9rF+Nm/erHFESkO53W4qysv23dLLydmFz+fDZFIvmdEgPz9/38dd4n2s2Z6N0+nEbrcf4VmKXqgVa0VKycyZMw8pn1y8eDFWq3Xf5waDYd/nBoNhX33+FVdcweeff87AgQN56623mD9//gHHCQQCJCYmsnLlypDHrkpBdGjJkiUA+BLa73ssKy74j2Xjxo2axKQ0XkVFxb6Ps+K8bN60UbX9ihL7bxR2mAJ4vN5DBjYp+rX/z69nohe/P8C6des0jEhpjLo+yErrdcoppzB9+vR9HUZWrFjRqOdXVlaSkZGB1+vl/fffP+Tr8fHxZGVl8emnnwLBRH7VqlXNDxyVWOvSggULwJGE3K++Os0WIM7y56ZGRf/Ky8v3fdw13kd1jVNtgosS+yfRneP8gLqojSb7J9Y9En0YDfDHH39oGJHSGK11sIjyp2nTpuH1ehkwYAD9+vVr9Hj7xx9/nBEjRjBhwoTDbkh8//33ef311xk4cCB9+/b
|
||
|
"text/plain": [
|
||
|
"<Figure size 864x432 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure(figsize=(12,6))\n",
|
||
|
"sns.violinplot(x='parental level of education',y='math score',data=df,hue='gender',split=True)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"#### inner\n",
|
||
|
"\n",
|
||
|
"Representation of the datapoints in the violin interior. If box, draw a miniature boxplot. If quartiles, draw the quartiles of the distribution. If point or stick, show each underlying datapoint. Using None will draw unadorned violins."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 38,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='parental level of education', ylabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 38,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAFzCAYAAAAe3J47AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAACgIklEQVR4nOzdd3hb5dn48e9ztLy345HYcRJn7wEkIVAghL33LFBW+7aFlv5ogb4tLbQUeIG20NKWtuyWTUJYYSSEFVb23tuJHe8hW/M8vz9khWzLtqRzjvR8riuXbVnWuWNZ0q3n3M99CykliqIoiqIoiqL0jGZ0AIqiKIqiKIpiZSqhVhRFURRFUZReUAm1oiiKoiiKovSCSqgVRVEURVEUpRdUQq0oiqIoiqIovaASakVRFEVRFEXpBbvRAfRGQUGBrKioMDoMRVEURVEUJcEtWrSoTkpZeKjvWTqhrqioYOHChUaHoSiKoiiKoiQ4IcS2w31P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iE5k/fz7tHR1M7OJ6E6Vky7ZtrF6tppaaWX19PS57Gin2NOrrkq/tmlVJKdm8aRPpjtALYIbDjq7rbNu2zeDI4itmCbWU8hPgwPFw5wLPdH7+DHDePpe/KKX0Sim3ABuBo2MVm1m88sorCLuDQOGQbv2cnl6AnlXMK6++mpTTiMwmEAiwZs0ahmQd/t14uJVeuLWeYg5PP/M0IlUgK7peuQwODbKnZo/qBW8is2bOpEBoVHRxvdGAUwjeeOONOESl9FRDfQMpjnRSnBk0NKrpslaxe/du3O3te1vmZTntAKxfv97IsOI
|
||
|
"text/plain": [
|
||
|
"<Figure size 864x432 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure(figsize=(12,6))\n",
|
||
|
"sns.violinplot(x='parental level of education',y='math score',data=df,inner=None)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 39,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='parental level of education', ylabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 39,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAFzCAYAAAAe3J47AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAACjHElEQVR4nOzdd3hb5dn48e9ztCzvvZI4TuLsPYAkBAqEsMLes0BZ7dsWWvqjBfq2tNBS4IUOaGlLy6ZlEwgrjISwwsreezux421L1j7P7w9ZIdtL0jmSns91+bIt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yMw+LEbnGqhDrBbN26lfSODh+ZNgu7d+8mEDj4jG0yi+UK9VPAaQdcdjswV0o5GJjb8T1CiBHApcDIjt95VAhhIcmtW7eO1atW4SsafsTNiAcKlozA7/PxzjvvxDA6pTtWLF9O/+wQaYf5XzskN4jX59s7mlwxh6VLl7Ju7TpCVR3TEQ8nHyiEF158Qb0pMpH58+fT7vEwsZPrTZSSLdu2sXq1mlpqZg0NDTis6aRZ02moT722a4lKSsnmTZvIsIVfADNtVnRdZ9u2bQZHFl8xS6illJ8AB46HOwd4uuPrp4Fz97n8BSmlT0q5BdgIHB2r2Mzi5ZdfRlhtBIuGHPQz+7YvsG/74pC/p2cUomeX8vIrr6TkNCKzCQaDrFmzhiHZ374bf3adk2fXOfd+H2mlF2mtp5jDU08/hXAKZGXnK5ehoSH21O5RveBN5PVZsygUGpX7XPYOknfY//4cDdiF4I033ohneEo3NTY0kmbLIM2eSWO
|
||
|
"text/plain": [
|
||
|
"<Figure size 864x432 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure(figsize=(12,6))\n",
|
||
|
"sns.violinplot(x='parental level of education',y='math score',data=df,inner='box')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 35,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='parental level of education', ylabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 35,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAFzCAYAAAAe3J47AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuM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YSTDUvqgoaEBhy0JhzUpLrtERLOdO3fisFqwWzQSLdr+XWfjSNgSaiHE00KIfUKIdQfcliWE+EgIsaX978wD7rtLCLFVCLFJCHFauOIymzfefBMS0/GnD+zZE6wOPFnD+ODDD9UlMRNZu3YtFgHD0ztvrzYizcO3336r2q+Z0CuvvoJIFYEFiF2QJRJXm0vNUpuMy+Xi448+YnQn5R5BuQgGCsG78+apOniTa2howGFJxG5JVAl1lCkrKyOpvcNHis1CZWUlXu/hV2xjWThnqJ8FTj/ktjuBBVLKUmBB+/cIIcYAlwFj25/zmBDCQozbtGkT67/9Fnfu6CMuRjyUL28MHreb9957L4zRKb2xds0ahqT5Sejif+2IDB8ut7tja3LFHFatWsWmjZvwl7TvjtiVLCAHXn7lZXVSZCKLFi2ita2Nqd08bqqU7Ni5k/Xr1a6lZlZbW4vDmkSCNYnamvhruxatpJRs37aNZFvgAzDFZkXXdXbu3GlwZJEVtoRaSvkZcOj2cN8Fnmv/+jngvANuf1lK6ZZS7gC2AkeHKzazeO211xBWG77cEb16np6cg56Wz2uvvx6XuxGZjc/nY8OGDYxI6/psPNhKL9haTzGHZ597FpEokMXdz1z6R/rZV7VP9YI3kbfmzCFHaBR387jxgF0I3n777QhEpfRVXW0dCbZkEuwp1NWr3WWjRWVlJc7W1o6WeWl2KwCbN28
|
||
|
"text/plain": [
|
||
|
"<Figure size 864x432 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure(figsize=(12,6))\n",
|
||
|
"sns.violinplot(x='parental level of education',y='math score',data=df,inner='quartile')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 43,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='parental level of education', ylabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 43,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAFzCAYAAAAe3J47AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAACpzklEQVR4nOzdd3xUxfrH8c9sSa8kEGrovVcBEUEEpVixK4oNr/3q1XvV+7PrFVBQ7KCAAkoVkN577x1CDT0hvZfdPfP7IwmiUlJ295zdnffrpSGbzZ4vbLL7nDkzzwgpJYqiKIqiKIqilI9J7wCKoiiKoiiK4slUQa0oiqIoiqIoFaAKakVRFEVRFEWpAFVQK4qiKIqiKEoFqIJaURRFURRFUSpAFdSKoiiKoiiKUgEWvQNURHR0tKxTp47eMRRFURRFURQvt3379mQpZeXLfc2jC+o6deqwbds2vWMoiqIoiqIoXk4IcfJKX1NTPhRFURRFURSlAlRBrSiKoiiKoigVoApqRVEURVEURakAVVAriqIoiqIoSgWoglpRFEVRFEVRKkAV1IqiKIqiKIpSAaqgVhRFURRFUZQKUAW1oiiKoiiKolSAKqgVRVEURVEUpQJUQa0oiqIoiqIoFaAKakVRFEVRFEWpAFVQK4qiKIqiKEoFqILaoNatW8eQZ55h/PjxekdRFEVRFEVRrkIV1Aa1evVqDh08yNx58/SOoiiKoiiKolyFKqgNKj09HYDMzEx9gyiKoiiKoihXpQpqg0pOSQGgsKCA3NxcndMoiqJ4hvXr1/Pyyy8TFxendxRFUXyIKqgN6sKFJKTZWvznCzqnUcoqLi6OFStWUFhYqHcURfEpS5cuZefOnWzZskXvKIqi+BBVUBtQQUEBWZkZOEJiAFVQe6IXX3yB9957j3Xr1ukdRVF8Sn5+PgDZ2dk6J1HKQ0qJlFLvGIpSZqqgNqBz584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EmERLFy40P3hlGvat28fF5KTaXmZrwkELTSNXTt3+uQlaE+TkZGBxWwlwC/oYgs2xTOcPXsWgCCLmSCL5eLnvkQV1DpbtWoVmZkZ2Ks0LdX97dENEWYLs2bNcnEypSz27t2LlJLGEX/vBhFslcSGaezetcv9wZRrWrNmDdlZ2ci6V5jSYQVHDQeLlyxW8zoNaMmSJfgJcXF6x1+1BjQpWbFihTtjKeWQnp6OvzUIf0uQT3aJ8GQnT57E32LGz2wi0Gz6Y9dZH+KygloIMU4IcUEIse+S2yoJIZYKIY4Uf4y85GtvCiGOCiHihBC3uCqX0fw2cyYEhuMIr1G6b7D4U1ipHouXLFGXxAxk7969mAXUD798e7VGYYXs379ftV8zoKnTpiJCRdECxCuQDST5eflqlNpg8vPzWbZ0KU0vM92jRGUENYRg/ty5ah68waWnp+NvDsTPHKgKag8THx9PUHGHjxCrmfPnz2Oz/f2KrTdz5Qj1T8Ctf7ntDWC5lLIhsLz4c4QQzYAHgObF3/OtEMKMl4uLi+PA/v0UVG561cWIf2WPaUZhQQELFixwYTqlLPbu2UPtMAcBV/ipbRRhJ7+g4OLW5Iox7Nq1i7hDcTgaFO+OeCWVgGiYMnWKOikykFWrVpGbl0f7a9yvvZScOHmSAwfUrqVGlpKSgr8liABLECnJvtd2zVNJKTl+7BjB1qI3wBCrBU3TOHnypM7J3MtlBbWUcg3w1+3h7gB+Lv7zz8Cdl9w+RUpZIKU8ARwFOrkqm1FMnz4dYbFir9yoTN+nBUejhVVl+owZPrkbkdHY7XYOHjxIo7Arn42XtNIraa2nGMNPP/+ECBTIOtceuXQ0dnAh8YLqBW8gs2fNIlqYqHON+7UE/ITg999/d0MqpbxSU1IJsAYT4BdCapraXdZTnD9/npzc3Ist88L8LAAcPnx
|
||
|
"text/plain": [
|
||
|
"<Figure size 864x432 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure(figsize=(12,6))\n",
|
||
|
"sns.violinplot(x='parental level of education',y='math score',data=df,inner='stick')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"#### orientation"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 45,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='math score', ylabel='parental level of education'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 45,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAc8AAAEGCAYAAAADnx5XAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAABtdUlEQVR4nO29eZgcWXWn/Z7Ifat93yWVSktraxoaGnDTgAdsxAD+vOAFD2B/wwD2tD0ez3gZzxiDMZ6Bz2AbbIxtDB5jjGmDzaCxaWM2Q2/q1tKtpVVaqkqqRbUvmZV7xvn+iMhUllSSqlq1677PE09mRtyIODdLyl/cc889R1QVg8FgMBgMS8dabwMMBoPBYNhsGPE0GAwGg2GZGPE0GAwGg2GZGPE0GAwGg2GZGPE0GAwGg2GZeNfbAMPaUFdXp11dXetthsFgMGwannnmmQlVrV/smBHPu4Suri6efvrp9TbDYDAYNg0iMnCzY8ZtazAYDAbDMjHiaTAYDAbDMjFuW4PBYChjfn6eiYkJ5ubmSCQSZDIZ8vk8qorX68Xr9RIOhwmHw1RUVFBRUUE0GkVE1tt0wxpixNNgMNyVzMzM0Nvby7lz5+jv7+dSXx/DwyOkkvPLvpbX66Wqupr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80BLtsIAZVT20SBsLeEBVU4scM6wRfr+fj3/843d0jXL3bdFdW+66Lbpt0+n0Ardt0XWbTqcXuG2TySTxRMJ13U4yn5incIsfHPEGwBck7w2i3hDqCzkBI74Q6gu778OoLwhi3VFf1xM7Unv7RksgUcjyt1/5J9QbgljlilxzqaxUH9aNYiSvm8/XeXWWy3hyiQWZksB
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"# Simply switch the continuous variable to y and the categorical to x\n",
|
||
|
"sns.violinplot(x='math score',y='parental level of education',data=df,)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"#### bandwidth\n",
|
||
|
"\n",
|
||
|
"Similar to bandwidth argument for kdeplot"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 48,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='parental level of education', ylabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 48,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAFzCAYAAAAe3J47AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAC/lUlEQVR4nOzdd3gU1dfA8e+dbem90CH03jtSFLFgry8qCoIUsYAKAio2RAEBFRAUAamCiF2QaqMjvfeeQEjv2ezu3PePJP5QQQLZ3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HPxTJ06FSmvsa5H51I//vgjCpR4drpYOyAnN5dffvnFBVHpSkMIQfXq1bGrNuxqAVWqVNVLGr2E3W5nz549SKlyMC2LCD8T+fn5Za6OWk+oNSCl5MCBg9gCSnf3rQZGkZeXS3x8vJMi012rli1b8sgjj7D2nB+bE01X/Lx8O0zZF0xIaBgjX3nFjRHqSiIzM5MXXnyBhAsJ2FvbwQiUB7W2yrfffstnn32mJ9UeZO+ePVSUkuBrXBRcGQhUFPbt2+eawHSlEhcXh0O141Dt1KhRXetwdCV08OBBrFYrUkJWgZ0IS2EZ5M6dOzWOzL30hFoD6enppKenoQZEleo4amDh648ePeqMsHTXqV+/fjSoX59Zh4JJs17+Av/F0QAScxVef+NNwsPD3Ryh7r8cPXqUvv36cvLkSezt7HDJOijZWKLGqSxYsIC33npLLxXwAKqqcvzYMSpcx2sFgvKqypEyNnPmLYKCgpBSRSIJDAzUOhxdCe3YsQMAk1J4/TMbFEI
|
||
|
"text/plain": [
|
||
|
"<Figure size 864x432 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure(figsize=(12,6))\n",
|
||
|
"sns.violinplot(x='parental level of education',y='math score',data=df,bw=0.1)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Advanced Plots\n",
|
||
|
"\n",
|
||
|
"We can use a boxenplot and swarmplot to achieve the same effect as the boxplot and violinplot, but with slightly more information included. Be careful when using these plots, as they often require you to educate the viewer with how the plot is actually constructed. Only use these if you are sure your audience will understand the visualization."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 49,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"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>gender</th>\n",
|
||
|
" <th>race/ethnicity</th>\n",
|
||
|
" <th>parental level of education</th>\n",
|
||
|
" <th>lunch</th>\n",
|
||
|
" <th>test preparation course</th>\n",
|
||
|
" <th>math score</th>\n",
|
||
|
" <th>reading score</th>\n",
|
||
|
" <th>writing score</th>\n",
|
||
|
" </tr>\n",
|
||
|
" </thead>\n",
|
||
|
" <tbody>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>0</th>\n",
|
||
|
" <td>female</td>\n",
|
||
|
" <td>group B</td>\n",
|
||
|
" <td>bachelor's degree</td>\n",
|
||
|
" <td>standard</td>\n",
|
||
|
" <td>none</td>\n",
|
||
|
" <td>72</td>\n",
|
||
|
" <td>72</td>\n",
|
||
|
" <td>74</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>1</th>\n",
|
||
|
" <td>female</td>\n",
|
||
|
" <td>group C</td>\n",
|
||
|
" <td>some college</td>\n",
|
||
|
" <td>standard</td>\n",
|
||
|
" <td>completed</td>\n",
|
||
|
" <td>69</td>\n",
|
||
|
" <td>90</td>\n",
|
||
|
" <td>88</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>2</th>\n",
|
||
|
" <td>female</td>\n",
|
||
|
" <td>group B</td>\n",
|
||
|
" <td>master's degree</td>\n",
|
||
|
" <td>standard</td>\n",
|
||
|
" <td>none</td>\n",
|
||
|
" <td>90</td>\n",
|
||
|
" <td>95</td>\n",
|
||
|
" <td>93</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>3</th>\n",
|
||
|
" <td>male</td>\n",
|
||
|
" <td>group A</td>\n",
|
||
|
" <td>associate's degree</td>\n",
|
||
|
" <td>free/reduced</td>\n",
|
||
|
" <td>none</td>\n",
|
||
|
" <td>47</td>\n",
|
||
|
" <td>57</td>\n",
|
||
|
" <td>44</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>4</th>\n",
|
||
|
" <td>male</td>\n",
|
||
|
" <td>group C</td>\n",
|
||
|
" <td>some college</td>\n",
|
||
|
" <td>standard</td>\n",
|
||
|
" <td>none</td>\n",
|
||
|
" <td>76</td>\n",
|
||
|
" <td>78</td>\n",
|
||
|
" <td>75</td>\n",
|
||
|
" </tr>\n",
|
||
|
" </tbody>\n",
|
||
|
"</table>\n",
|
||
|
"</div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
" gender race/ethnicity parental level of education lunch \\\n",
|
||
|
"0 female group B bachelor's degree standard \n",
|
||
|
"1 female group C some college standard \n",
|
||
|
"2 female group B master's degree standard \n",
|
||
|
"3 male group A associate's degree free/reduced \n",
|
||
|
"4 male group C some college standard \n",
|
||
|
"\n",
|
||
|
" test preparation course math score reading score writing score \n",
|
||
|
"0 none 72 72 74 \n",
|
||
|
"1 completed 69 90 88 \n",
|
||
|
"2 none 90 95 93 \n",
|
||
|
"3 none 47 57 44 \n",
|
||
|
"4 none 76 78 75 "
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 49,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df.head()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## swarmplot"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 50,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 50,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAAEGCAYAAABbzE8LAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAADT5UlEQVR4nOydd3Qc5fX+P9ubpFXvXbIky5Ll3jsG3I0B04vpNQQIJaQSUiCEBAgt9GqawWCqMe62XGRLbrIk2+q9d6227++P2R1pdmUCgXyJ+e1zDofjq9nZmXfv3n3nlueRuVwu/PDDDz/8+L+H/Me+AD/88MOP/1/hD8B++OGHHz8S/AHYDz/88ONHgj8A++GHH378SPAHYD/88MOPHwnK73JweHi4Kzk5+b90KX744YcfP00UFha2u1yuCG/7dwrAycnJHDx48Ie7Kj/88MOP/w8gk8lqRrL7UxB++OGHHz8S/AHYDz/88ONHgj8A++GHH378SPAHYD/88MOPHwn+AOyHH3748SPBH4D98MMPP34k+AOwH3744cePBH8A9sMPP/z4keAPwH744YcfPxL8AdgPP/zw40eCPwD74YcffvxI8AdgP/zww48fCf4A7IcffvjxI8EfgP3www8/fiT4A7Affvjhx48EfwD2ww8//PiR4A/Afvjhhx8/Er6TIoYffpyJcDqdPPxlGada+/nloiyyYoK+0+sf+aKUr443c9nURPZWdJBf3s7sjAheunqyeMyruyt5Y28N8zIjaO4281VJC7HBOv68KodntlcwOTmElePieHV3FWNig+gcsPDUtnKCdWqevnQCv9lQTHyIjnvPGcXDG08SFaRl9fhY7v7gKIFaJb9anMVd7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x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"sns.swarmplot(x='math score',data=df)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 53,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='math score', ylabel='race/ethnicity'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 53,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZkAAAEGCAYAAAC3lehYAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAADg2ElEQVR4nOyddXxUV9rHv3dm4u4eQoIFd6doBWuLtkhdtu7duq293d3K1r2l3kKhaEsFK8XdAyGBCHH3ZOS8f5yxOzMJoQst7d4fHz6Z+8y555773DvnOedRRQiBBg0aNGjQcC6g+60HoEGDBg0a/rjQhIwGDRo0aDhn0ISMBg0aNGg4Z9CEjAYNGjRoOGfQhIwGDRo0aDhnMPzWAzjfEBkZKVJSUn7rYWjQoEHD7wq7du0qE0JEudI1IeOClJQUdu7c+VsPQ4MGDRp+V1AUJccTXRMyGjScJ8gpr+c/P2aSX9nAyE6R5FU2crKsnot7xHLDyI7odIqqfXWDkRd/PMb+/CoGdgin2WzmQH41gzqGc/f4zvh7t+/n3dJiZvKrP5NVWoefl57nZvVhYq84AO79ci8/HikmyNeLiT1jOFRQQ0SADzod/HSsFB+Dnkm9YjleUo+vl55bx6QxoEMYAD9nlvHuz9kIAcnhfnx7oAiTEF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yMXoT6e3Pd8I5c3CMGRYFAHwNPTelOcoQ/0/slMHNAInqdgq+XjnsmdKZfchhju0Zz/YiOeOt1eOkVrhuRwvj0aHonhnLfhV3w9dKh1ylM75/AjP6JJIX78/SlPQjyMaAocFH3GK4
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"sns.swarmplot(x='math score',y='race/ethnicity',data=df)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 54,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='race/ethnicity', ylabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 54,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEGCAYAAACKB4k+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAADzTUlEQVR4nOyddXRU19rGf2dc4u4GCYTg7i5FCi2FOnX3W7u1e+vu7kK9VGhpcXcLBAshxN1dZzLy/bGTmTmZtIUWSm+/PGt1ldlHZp/JzH73a88j2e12utGNbnSjG90AUJzpCXSjG93oRjf+Pug2Ct3oRje60Q0Huo1CN7rRjW50w4Fuo9CNbnSjG91woNsodKMb3ehGNxxQnekJ/BkEBATYY2JizvQ0utGNbnTjfwr79u2rtNvtgV0d+582CjExMSQnJ5/paXSjG93oxv8UJEnK+7Vj3eGjbnSjG93ohgPdRqEb3ehGN7rhQLdR6EY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1SQVluPWHxvtisdnxDjWh04rqQOG9C4n47jGaz2clPraLNZCW6r7/j2tOFbqNwAlh+qITbvk7B2t6+/t85fZjYK5AF7+x05BFmJAXz7qKhZ3Kapw9954tF/eiPYAyC1B/g23YOm7DBcNUqWLQUjnwPXuEw/How+sM16yD5Q7DbYOhVwiB04/8VbE1NYJMTv1kbGs7QbE4cLQ1mvns2mfpKUUwSHOvFuXcNZtV7R8g9JPJgek815907BO9Ag+xac3tZqSsK02vY+3MOVov4LIacFc3Ic3r87jxsNjs/vZxCcUYtAB6+Whb8eyhGn9O3Cf2HxjtOLV5am+4wCACvrDvO+1uzZYnl1al
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"sns.swarmplot(x='race/ethnicity',y='math score',data=df)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 56,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='race/ethnicity', ylabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 56,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAFzCAYAAAAe3J47AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAEAAElEQVR4nOydd3gUVffHP7O72fTeK+mEECCF3nsVUBFFBRRULCD23rCigr33AopKUZAuvZeE3kJN772XLb8/bpLdyUbf3/sKJMB8nicPzJ2Zu3d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OIhenUeWjz8MQNbq1R9rq/JPKh2JQKyhcwcxbd4pPNp+TtU3pGcSCPWmytjHR7nxyfiRg9nu3dYWnUi79IBUUFNo+JWmgrwf3sNYeiUIbIrWwEpUkKbKKDbRKYRcFBYVLz5AO3rKkayu1xG09giykrwZ3DLCMfWs/5jKMUEFBoU1jMMCye0UY2Efx8PMtItdC4ZqmTmfg7h/2M2DeFvq9vZmHfzmIwXDlOmAvB4pBraBwBRMf5Mpnt8fTPcSNPuHufHtnNzr4OrPwrh4Mi/amS6ALL4/ryISEALjxK7HM79MZes6E0W+39vAVFBRam7MbhDRaI6fXwtHFrTcehTbBisNZbDiZ17T9x6EsNp3K+4czFJQ0/yuN/NNCwsY7uqkpr6yGzJJqOvk7K9qh1yAjY3wZGeMra4v2c+Krcd5QmQ++QaLRzg3GftAKI1RQUGizFFuqfFDUQpvClU95DpRmgG9syypPBj1kHQInP9IKKy12pxZVQUl6w30lVhR8QUj4ns2rINrXCVut+pK+hbaMYlBfKRj0sPgOOPmn2A4dBLf+wpe7M3l
|
||
|
"text/plain": [
|
||
|
"<Figure size 864x432 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure(figsize=(12,6))\n",
|
||
|
"sns.swarmplot(x='race/ethnicity',y='math score',data=df,hue='gender')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 57,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='race/ethnicity', ylabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 57,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgA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Gn3NY49/m/JYfp/cwSBr+4nEveXU9JVS3LD+TQ77mljJq9kiEvLm8yb9LlSRyj3vYOhU0fwOyOIsj/3c1gcaEWtxrOIXG0eltvhIThzplLC6RzlD9hvur0jhEdtHVE4xyg8RrSbqzjmE84RHVrtimdKTSVj7NAUUUNz/6yn62phfSMC+TB8R0J8DI6e1oazURKThmjZq9Ujd01MpF5m9M4WVLVMNY/IZgvb3TNSuY/xGKR8P2eBVJQEjcQlj6uPuaSz6HjRKdMT8OF2PYpbH4f3Lxh6H3QZoSzZ9Si2J9Vwku/HiS9sIKJyVHcNrxty1dz0NCoKIDfH4G0TdCqD4x+SgoR17wCe74VlY+Rj0rk0wU5lcqHZlBraJxhft+XzQ2fqO/L8V0i+GX3SdVYuJ87Gx8c1ZxTO/OsfAmWP60eG/UEDLrLKdPR0NBoAeQcAM8AW4qYxik5nleOQa8QE9gy1S/OJTTZPA2NZqRvQhB+HgZKqkwNY+O7RFJQXsOGozbli9Gdwp0xvTNLu7Gw4lmw1qV5KHoZ09DQ0GhMRQF8fhFkbJVnxcA7NfWXU1BtMnPLZ9tYeiAHgGndo3l5RlctUuGiaDnUGhpnGD8PNz6/vh8jO4TRrVUAz07twsTkKN64vAcX94qhc5QfNw1J4OEJnZw91dMnMhku/UIUPVoPhsvmQVhHZ89KQ0PDFdnwthjTAFazpI/lHDj1OecxP2zPbDCmAb7dnsHKQ7lOnJHGqdA81GeJsmoTB0+W0j7CFx/3c+jXnJcCpiqISHL2TFyaLjH+fHi1WtEgxMedFy/q6qQZnUXaXyA6oooOQts7ezYaGhquSuHxJsaOQViHZp9KS+BEQYXDWGp+OemFFRSW15IU7YeitAB
|
||
|
"text/plain": [
|
||
|
"<Figure size 864x432 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure(figsize=(12,6))\n",
|
||
|
"sns.swarmplot(x='race/ethnicity',y='math score',data=df,hue='gender',dodge=True)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"### boxenplot (letter-value plot)\n",
|
||
|
"\n",
|
||
|
"Official Paper on this plot: https://vita.had.co.nz/papers/letter-value-plot.html\n",
|
||
|
"\n",
|
||
|
"This style of plot was originally named a “letter value” plot because it shows a large number of quantiles that are defined as “letter values”. It is similar to a box plot in plotting a nonparametric representation of a distribution in which all features correspond to actual observations. By plotting more quantiles, it provides more information about the shape of the distribution, particularly in the tails."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 59,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='math score', ylabel='race/ethnicity'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 59,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZkAAAEGCAYAAAC3lehYAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAAhZUlEQVR4nO3de5hdVX3/8fcnE8nkAkHCRQnEhHsjhQSGPFPDj0QTRLQUNSiIRaWV+IugaLV9LF4ItUKrscWfIhpADbUKcpPQCAhIAoQO5A5eQrAkXC0kQQOJmeBkvr8/9h4yOUzmnJk569zyeT3PPDn7ctb67szZ5ztrrb3XVkRgZmaWwqBqB2BmZo3LScbMzJJxkjEzs2ScZMzMLBknGTMzS2ZwtQOoNfvuu2+MHTu22mGYmdWVZcuWbYiI/QrXO8kUGDt2LEuXLq12GGZmdUXSkz2td3eZmZkl4yRj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VT+8YpmVldanVx2e8VaMh8DPkWWULrPoPwScEWimMzMrEH0mmQi4htkDw37RER8s0IxmZlZgyjWXfa2iPgF8Kyk9xZuj4ibk0VmZmZ1r1h32RSyy5ZP62FbkD1W2czMrEfFussuzv89tzLhmJlZIyl1gsxLJe3dbfn1kv45WVRmZtYQSp1W5tSI+EPXQkT8HnhnkojMrGa1tbXRlt/7YlaKUm/GbJI0JCK2AUgaCgxJF5aZ9WbyNydXpd5tj28DYMiSyp/+iz+xuOJ12sCVmmR+CNwj6ftkA/5/A8xLFpWZmTWEkpJMRHxV0qPANLK7/r8cEX6YtpmZ9arUlgwRcTtwe8JYzMyswRS7GfOBiDhR0stk3WSvbgIiIvZKGp2ZmdW1YvfJnJj
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"sns.boxenplot(x='math score',y='race/ethnicity',data=df)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 60,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='race/ethnicity', ylabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 60,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEGCAYAAACKB4k+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAAe6ElEQVR4nO3df5hVZb338fdnZoQBQWtw4IhkUI8/jscEC7um6MlKFOuUp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YGjqGGXhXoKVSo9FQVId8FBEHAt8t0T7fB2wCbhJ0kRgBXAJMCYi1gNExHpJ3Y5bSJpNbuCbww8/vESRzMwMejl8FBHtwGpJpfzt2wC8EbghIo4HttOHQ0URMTciJkfE5Obm5hLGMjOzQg4fHQo8Iul+cr/AAYiI04rc51pgbUT8IXu+kFxR2CDp0KyXcCiwscjPN7MCnPjr+/r8ntazppchSfdabl1YsX3ZXoUUhStLucOI+H+SnpN0VEQ8Tu56hz9lj1nANdnXO0q5XzMz612vRSEi7pM0BjghW3V/RPT3r/iLgR9KGgI8BXyE3KGsBZLOBZ4Fzu7nPszMrI8KuaJ5BvAVcmcDCfimpM9ERNF9u4hYBUzu5qWqvUrazKwWFHL46PPACR29A0nNwBJyYwFmZjaIFFIU6vY5XLQZT7ltZjWup3sc3H797/r8eWdc+Nb+xCmZQorC3ZIWAT/Ons8EflG+SGZmlkohA82fkXQm8DZyYwpzI+L2siczM7OKK2SgeQJwV0Tclj0fJml8RDxd7nBWGod/4eE+v+f5r08rQ5Lujb1kUcX2ZWY9K2Rs4CdAe6fne7J1ZmY2yBQyptCQTVo
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"sns.boxenplot(x='race/ethnicity',y='math score',data=df)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 62,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<AxesSubplot:xlabel='race/ethnicity', ylabel='math score'>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 62,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAA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b+/+Zcq/rd+evGph1RbW6PDS7+pv895SnMev08//ckl+vzjtyVJS5Ys0cyZMzVv3jxdddVV6tatmxYuXKhvfetbeuCBByRJJ598st544w0tWrRI+++/v+65554djj9p0iTdfvvtWrBggW655RZNmTIlKe+LFuqQPX/1qerXq9uuV8wQ9R8v0Jr7z1W/c+7jYQ0AACBp/vLK/+jZipf029/fLUnatGmTln+6UpJ0xBFHqLCwUIWFherVq5dOOOEESdKBBx6ot956S1Ks6L766qv1+eefq7a2VmVlLcfkrq2t1euvv67TTjtt27xNmzYlJTsFdciyqZj2pgZVz75akmv97Ks04II/8dhYAACQFO7SrHvv1OB992kx/833PtVuu+22bTonJ2fbdE5OjhoaYsMUn3POOXr66ac1fPhw3XfffXrllVda7KepqUm77767qqqqkp49e/ohIHQ182aqaWO1JKmxtlo1bzwccSIAQKZp3LCSB0GhVeOO+I7uvPt+ubskaeFbb7dr+5qaGg0YMEBbtmzRQw89tMPynj17qqSkRI899pgkyd21aNGi4MFFQR2q5eu+iDpC0jTWrtOGl++Qb4k9nMa31GnDX29XY+26iJNlnpWfbYw6AgAAaeeqSy/UloYGHTz2GI34znhdd9Nv2rX99ddfr29+85saN25cmzcaPvTQQ7rnnns0fPhwHXDAAZo9Ozl/3HG9HgnZuOR
|
||
|
"text/plain": [
|
||
|
"<Figure size 864x432 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure(figsize=(12,6))\n",
|
||
|
"sns.boxenplot(x='race/ethnicity',y='math score',data=df,hue='gender')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"----\n",
|
||
|
"----"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"anaconda-cloud": {},
|
||
|
"kernelspec": {
|
||
|
"display_name": "Python 3",
|
||
|
"language": "python",
|
||
|
"name": "python3"
|
||
|
},
|
||
|
"language_info": {
|
||
|
"codemirror_mode": {
|
||
|
"name": "ipython",
|
||
|
"version": 3
|
||
|
},
|
||
|
"file_extension": ".py",
|
||
|
"mimetype": "text/x-python",
|
||
|
"name": "python",
|
||
|
"nbconvert_exporter": "python",
|
||
|
"pygments_lexer": "ipython3",
|
||
|
"version": "3.7.6"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 1
|
||
|
}
|