<commit_before>{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In this micro-course, you've learned how to create many different chart types.  Now, you'll organize your knowledge, before learning some quick commands that you can use to change the style of your charts."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# What have you learned?\n",
    "\n",
    "<img src=\"https://imgur.com/2VmgDnF.png\" height=\"500\" width=\"1000\" usemap=\"#plottingmap\" />\n",
    "<map name=\"plottingmap\">\n",
    "  <area shape=\"rect\" coords=\"262,342,402,476\" href=\"#$TUTORIAL_URL(1)$\" title=\"EXAMPLE: sns.lineplot(data=my_data)\">\n",
    "  <area shape=\"rect\" coords=\"8,75,154,200\" href=\"#$TUTORIAL_URL(3)$\" title=\"EXAMPLE: sns.swarmplot(x=my_data['Column 1'], y=my_data['Column 2'])\">\n",
    "   <area shape=\"rect\" coords=\"8,200,154,350\" href=\"#$TUTORIAL_URL(3)$\" title=\"EXAMPLE: sns.regplot(x=my_data['Column 1'], y=my_data['Column 2'])\">\n",
    "   <area shape=\"rect\" coords=\"8,350,154,500\" href=\"#$TUTORIAL_URL(3)$\" title='EXAMPLE: sns.lmplot(x=\"Column 1\", y=\"Column 2\", hue=\"Column 3\", data=my_data)'>\n",
    "      <area shape=\"rect\" coords=\"229,10,393,160\" href=\"#$TUTORIAL_URL(3)$\" title=\"EXAMPLE: sns.scatterplot(x=my_data['Column 1'], y=my_data['Column 2'], hue=my_data['Column 3'])\">\n",
    "     <area shape=\"rect\" coords=\"397,10,566,160\" href=\"#$TUTORIAL_URL(2)$\" title=\"EXAMPLE: sns.heatmap(data=my_data)\">\n",
    "     <area shape=\"rect\" coords=\"565,10,711,160\" href=\"#$TUTORIAL_URL(2)$\" title=\"EXAMPLE: sns.barplot(x=my_data.index, y=my_data['Column'])\">\n",
    "     <area shape=\"rect\" coords=\"780,55,940,210\" href=\"#$TUTORIAL_URL(4)$\" title=\"EXAMPLE: sns.jointplot(x=my_data['Column 1'], y=my_data['Column 2'], kind='kde')\">\n",
    "     <area shape=\"rect\" coords=\"780,210,940,350\" href=\"#$TUTORIAL_URL(4)$\" title=\"EXAMPLE: sns.kdeplot(data=my_data['Column'], shade=True)\">\n",
    "   <area shape=\"rect\" coords=\"780,360,1000,500\" href=\"#$TUTORIAL_URL(4)$\" title=\"EXAMPLE: sns.distplot(a=my_data['Column'], kde=False)\">\n",
    "</map>\n",
    "\n",
    "Since it's not always easy to decide how to best tell the story behind your data, we've broken the chart types into three broad categories to help with this.\n",
    "- **Trends** - A trend is as a pattern of change.\n",
    "    - `sns.lineplot` - **Line graphs** are best to show trends over a period of time, and multiple lines can be used to show trends in more than one group.\n",
    "- **Relationship** - There are many different chart types that you can use to understand relationships between variables in your data.\n",
    "    - `sns.barplot` - **Bar plots** are useful for comparing quantities corresponding to different groups.\n",
    "    - `sns.heatmap` - **Heatmaps** can be used to find color-coded patterns in tables of numbers.\n",
    "    - `sns.scatterplot` - **Scatter plots** show the relationship between two continuous variables; if color-coded, we can also show the relationship with a third [categorical variable](https://en.wikipedia.org/wiki/Categorical_variable).\n",
    "    - `sns.regplot` - Including a **regression line** in the scatter plot makes it easier to see any linear relationship between two variables.\n",
    "    - `sns.lmplot` - This command is useful for drawing multiple regression lines, if the scatter plot contains multiple, color-coded groups.\n",
    "    - `sns.swarmplot` - **Categorical scatter plots** show the relationship between a continuous variable and a categorical variable.\n",
    "- **Distribution** - We visualize distributions to show the possible values that we can expect to see in a variable, along with how likely they are.\n",
    "    - `sns.distplot` - **Histograms** show the distribution of a single numerical variable.\n",
    "    - `sns.kdeplot` - **KDE plots** (or **2D KDE plots**) show an estimated, smooth distribution of a single numerical variable (or two numerical variables).\n",
    "    - `sns.jointplot` - This command is useful for simultaneously displaying a 2D KDE plot with the corresponding KDE plots for each individual variable.\n",
    "    \n",
    "# Changing styles with seaborn\n",
    "\n",
    "All of the commands have provided a nice, default style to each of the plots.  However, you may find it useful to customize how your plots look, and thankfully, this can be accomplished by just adding one more line of code!\n",
    "\n",
    "As always, we need to begin by setting up the coding environment.  (_This code is hidden, but you can un-hide it by clicking on the \"Code\" button immediately below this text, on the right._)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],<commit_msg>fix typo<commit_after>{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In this micro-course, you've learned how to create many different chart types.  Now, you'll organize your knowledge, before learning some quick commands that you can use to change the style of your charts."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# What have you learned?\n",
    "\n",
    "<img src=\"https://imgur.com/2VmgDnF.png\" height=\"500\" width=\"1000\" usemap=\"#plottingmap\" />\n",
    "<map name=\"plottingmap\">\n",
    "  <area shape=\"rect\" coords=\"262,342,402,476\" href=\"#$TUTORIAL_URL(1)$\" title=\"EXAMPLE: sns.lineplot(data=my_data)\">\n",
    "  <area shape=\"rect\" coords=\"8,75,154,200\" href=\"#$TUTORIAL_URL(3)$\" title=\"EXAMPLE: sns.swarmplot(x=my_data['Column 1'], y=my_data['Column 2'])\">\n",
    "   <area shape=\"rect\" coords=\"8,200,154,350\" href=\"#$TUTORIAL_URL(3)$\" title=\"EXAMPLE: sns.regplot(x=my_data['Column 1'], y=my_data['Column 2'])\">\n",
    "   <area shape=\"rect\" coords=\"8,350,154,500\" href=\"#$TUTORIAL_URL(3)$\" title='EXAMPLE: sns.lmplot(x=\"Column 1\", y=\"Column 2\", hue=\"Column 3\", data=my_data)'>\n",
    "      <area shape=\"rect\" coords=\"229,10,393,160\" href=\"#$TUTORIAL_URL(3)$\" title=\"EXAMPLE: sns.scatterplot(x=my_data['Column 1'], y=my_data['Column 2'], hue=my_data['Column 3'])\">\n",
    "     <area shape=\"rect\" coords=\"397,10,566,160\" href=\"#$TUTORIAL_URL(2)$\" title=\"EXAMPLE: sns.heatmap(data=my_data)\">\n",
    "     <area shape=\"rect\" coords=\"565,10,711,160\" href=\"#$TUTORIAL_URL(2)$\" title=\"EXAMPLE: sns.barplot(x=my_data.index, y=my_data['Column'])\">\n",
    "     <area shape=\"rect\" coords=\"780,55,940,210\" href=\"#$TUTORIAL_URL(4)$\" title=\"EXAMPLE: sns.jointplot(x=my_data['Column 1'], y=my_data['Column 2'], kind='kde')\">\n",
    "     <area shape=\"rect\" coords=\"780,210,940,350\" href=\"#$TUTORIAL_URL(4)$\" title=\"EXAMPLE: sns.kdeplot(data=my_data['Column'], shade=True)\">\n",
    "   <area shape=\"rect\" coords=\"780,360,1000,500\" href=\"#$TUTORIAL_URL(4)$\" title=\"EXAMPLE: sns.distplot(a=my_data['Column'], kde=False)\">\n",
    "</map>\n",
    "\n",
    "Since it's not always easy to decide how to best tell the story behind your data, we've broken the chart types into three broad categories to help with this.\n",
    "- **Trends** - A trend is defined as a pattern of change.\n",
    "    - `sns.lineplot` - **Line graphs** are best to show trends over a period of time, and multiple lines can be used to show trends in more than one group.\n",
    "- **Relationship** - There are many different chart types that you can use to understand relationships between variables in your data.\n",
    "    - `sns.barplot` - **Bar plots** are useful for comparing quantities corresponding to different groups.\n",
    "    - `sns.heatmap` - **Heatmaps** can be used to find color-coded patterns in tables of numbers.\n",
    "    - `sns.scatterplot` - **Scatter plots** show the relationship between two continuous variables; if color-coded, we can also show the relationship with a third [categorical variable](https://en.wikipedia.org/wiki/Categorical_variable).\n",
    "    - `sns.regplot` - Including a **regression line** in the scatter plot makes it easier to see any linear relationship between two variables.\n",
    "    - `sns.lmplot` - This command is useful for drawing multiple regression lines, if the scatter plot contains multiple, color-coded groups.\n",
    "    - `sns.swarmplot` - **Categorical scatter plots** show the relationship between a continuous variable and a categorical variable.\n",
    "- **Distribution** - We visualize distributions to show the possible values that we can expect to see in a variable, along with how likely they are.\n",
    "    - `sns.distplot` - **Histograms** show the distribution of a single numerical variable.\n",
    "    - `sns.kdeplot` - **KDE plots** (or **2D KDE plots**) show an estimated, smooth distribution of a single numerical variable (or two numerical variables).\n",
    "    - `sns.jointplot` - This command is useful for simultaneously displaying a 2D KDE plot with the corresponding KDE plots for each individual variable.\n",
    "    \n",
    "# Changing styles with seaborn\n",
    "\n",
    "All of the commands have provided a nice, default style to each of the plots.  However, you may find it useful to customize how your plots look, and thankfully, this can be accomplished by just adding one more line of code!\n",
    "\n",
    "As always, we need to begin by setting up the coding environment.  (_This code is hidden, but you can un-hide it by clicking on the \"Code\" button immediately below this text, on the right._)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
{'fraction_non_alphanumeric': 0.17701831576793206, 'fraction_numerical': 0.029059654149186535, 'mean_word_length': 3.746964545896066, 'pattern_counts': {'":': 22, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2355394', 'n_tokens_mistral': 3374, 'n_tokens_neox': 3113, 'n_words': 984}