Skip to content

[Regression] Add Seaborn data visualization examples to the Data lesson#1002

Merged
leestott merged 3 commits into
mainfrom
copilot/add-data-visualization-notebook
Jul 2, 2026
Merged

[Regression] Add Seaborn data visualization examples to the Data lesson#1002
leestott merged 3 commits into
mainfrom
copilot/add-data-visualization-notebook

Conversation

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Description

The 2-Regression/2-Data lesson taught Matplotlib and its assignment asked learners to compare Matplotlib with Seaborn — but Seaborn was never actually demonstrated anywhere in the curriculum. This adds a hands-on Seaborn section to that lesson, closing the gap using the existing pumpkin dataset.

  • README — New "experiment with Seaborn" section covering the visualization types from the issue:
    • Scatter/relational plots (sns.relplot) for correlations
    • Categorical bar plots (sns.catplot) for distributions
    • Correlation heatmap (sns.heatmap), noting the same chart backs confusion matrices in classification
    • A short "Matplotlib or Seaborn?" comparison; updated learning objectives
  • Solution notebook — Added import seaborn as sns plus matching runnable cells kept in sync with the README
  • Images — Four plots (relplot, lineplot, catplot, heatmap) generated from the actual lesson data to match existing lesson style
import seaborn as sns

sns.relplot(x="Price", y="Month", data=new_pumpkins)          # correlations
sns.catplot(x="Month", y="Price", data=new_pumpkins, kind="bar")  # distributions
correlations = new_pumpkins[['Month', 'Low Price', 'High Price', 'Price']].corr()
sns.heatmap(correlations, annot=True, cmap="coolwarm")        # correlation matrix

The heatmap discussion intentionally highlights that Month shows weak linear correlation despite the visible seasonal peak — reinforcing that the coefficient misses non-linear patterns. translations/ untouched (auto-generated).

Track translation progress by opening a draft PR using this template and checking off the translations completed

Each lesson includes a translation of the README.md and the Assignment.md file, if available. Only mark the lesson complete if both those files are translated per lesson, please.

  • 1

  • 1-1

  • 1-2

  • 1-3

  • 2

  • 2-1

  • 2-2

  • 2-3

  • 2-4

  • 3

  • 3-1

  • 3-2

  • 3-3

  • 4

  • 4-1

  • 5

  • 5-1

  • 5-2

  • 5-3

  • 6

  • 6-1

  • 6-2

  • 6-3

  • 6-4

  • 6-5

  • 6-6

  • 7

  • 7-1

  • 7-2

  • 7-3

  • 7-4

  • Quiz (add a file in the quiz-app with all localizations)

Copilot AI changed the title [WIP] Add data visualization examples using Matplotlib and Seaborn [Regression] Add Seaborn data visualization examples to the Data lesson Jul 2, 2026
Copilot AI requested a review from leestott July 2, 2026 10:03
@leestott leestott requested a review from Copilot July 2, 2026 10:22
@leestott leestott marked this pull request as ready for review July 2, 2026 10:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the 2-Regression/2-Data lesson to include hands-on Seaborn visualization examples, addressing the prior gap where the lesson referenced Seaborn in the assignment without demonstrating it in the curriculum.

Changes:

  • Added a new Seaborn exercise section to the lesson README (relational plots, categorical bar plots, correlation heatmap, and a Matplotlib vs Seaborn comparison).
  • Updated learning objectives and the challenge prompt to include Seaborn alongside Matplotlib.
  • Updated the solution notebook to import Seaborn and include matching Seaborn plotting cells aligned with the README.
Show a summary per file
File Description
2-Regression/2-Data/README.md Adds a Seaborn exercise section and updates objectives/challenge to include Seaborn visualization.
2-Regression/2-Data/solution/notebook.ipynb Adds import seaborn as sns and Seaborn plotting cells mirroring the README instructions.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/6 changed files
  • Comments generated: 0
  • Review effort level: Low

@leestott leestott merged commit 5f79dd5 into main Jul 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

💡 Suggestion: Add data visualization examples using Matplotlib and Seaborn

3 participants