{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "99708b93",
   "metadata": {},
   "source": [
    "# Seaborn\n",
    "\n",
    "This chapter introduces Seaborn as a higher-level tool for statistical graphics. You will use tidy data, plot families, faceting, and style controls to make comparisons clearer with less plotting code.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f7505791",
   "metadata": {},
   "source": [
    "<h2>Chapter Video</h2>\n",
    "\n",
    "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube-nocookie.com/embed/6GUZXDef2U0\" title=\"Seaborn Tutorial 2021\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen referrerpolicy=\"strict-origin-when-cross-origin\"></iframe>\n",
    "\n",
    "<div class=\"video-credit\">\n",
    "<p><strong>Video credit:</strong> Banas, D. (2021). <em>Seaborn Tutorial 2021</em>. YouTube. <a href=\"https://youtube.com/watch?v=6GUZXDef2U0\">Watch on YouTube</a>.</p>\n",
    "<p class=\"video-rights\">This embedded video is provided for educational reference only. All rights are retained by the respective copyright holder.</p>\n",
    "</div>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d3e86475",
   "metadata": {},
   "source": [
    "<h2>Learning Objectives</h2>\n",
    "\n",
    "By the end of this chapter, you will be able to:\n",
    "\n",
    "1. Explain how pandas, Matplotlib, and Seaborn work together and choose a library for a plotting task.\n",
    "2. Use tidy DataFrame columns to map variables to axes, color, and marker size.\n",
    "3. Choose and create distribution, categorical, and relationship plots that answer a business question.\n",
    "4. Use faceting with consistent scales to compare the same relationship or distribution across groups.\n",
    "5. Apply themes, palettes, and labels to improve readability and explain the choices.\n",
    "6. State a finding supported by a chart and explain a limitation, distinguishing individual observations from group summaries.\n",
    "\n",
    "Optional extensions introduce direct `FacetGrid` construction, joint plots with fitted regression lines, and KDE construction. These provide exploration beyond the core objectives; regression is developed in Chapter 12.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f008eef2",
   "metadata": {},
   "source": [
    "<h2>Chapter Flow</h2>\n",
    "\n",
    "```{div} chapter-flow\n",
    "{doc}`Seaborn Foundations <0701-seaborn>`\n",
    "\n",
    "{doc}`Seaborn Plot Families <0702-plot-families>`\n",
    "\n",
    "{doc}`Faceting, Multivariate Views, and Style <0703-faceting-style>`\n",
    "```\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6327d050",
   "metadata": {},
   "source": [
    "<h2>Glossary</h2>\n",
    "\n",
    "| # | Term | Explanation |\n",
    "|---:|---|---|\n",
    "| 1 | Seaborn | A Python library for statistical data visualization. |\n",
    "| 2 | Tidy data | A table structure where each variable is a column and each observation is a row. |\n",
    "| 3 | Long format | A tidy layout where repeated measurements are stored in rows. |\n",
    "| 4 | Wide format | A table layout where related measurements are spread across columns. |\n",
    "| 5 | Plot family | A group of Seaborn functions designed for a type of statistical question. |\n",
    "| 6 | Distribution plot | A chart that shows the spread and shape of one variable. |\n",
    "| 7 | Categorical plot | A chart that compares values across groups. |\n",
    "| 8 | Relationship plot | A chart that shows association between variables. |\n",
    "| 9 | Regression plot | A chart that overlays a fitted trend on paired data. |\n",
    "| 10 | Facet | A small multiple panel split by a grouping variable. |\n",
    "| 11 | Hue | A color mapping used to distinguish groups. |\n",
    "| 12 | Palette | A set of colors used in a chart. |\n",
    "| 13 | Theme | A reusable set of style choices. |\n",
    "| 14 | Estimator | A summary function such as mean used inside some Seaborn plots. |\n",
    "| 15 | Confidence interval | An uncertainty band around an estimated summary or trend. |\n",
    "| 16 | KDE | A smoothed estimate of a distribution shape. |\n",
    "| 17 | Pair plot | A grid that compares multiple numeric variables pairwise. |\n",
    "| 18 | Heatmap | A color-coded display of values in a matrix. |\n",
    "| 19 | Context | A Seaborn setting that scales plot elements for notebooks, talks, or papers. |\n",
    "| 20 | Legend | A guide explaining visual encodings. |\n",
    "| 21 | Small multiples | A set of similar charts repeated across groups. |\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "36bd690b",
   "metadata": {},
   "source": [
    "<h2>Lecture Slides</h2>\n",
    "\n",
    "<a href=\"0700-slides.html\" target=\"_blank\" rel=\"noopener noreferrer\">Chapter 7 Slides</a>\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".venv",
   "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.13.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
