BuildlyBuildly
DashboardExercisesProfileHelp
Back to all

Practice: Seaborn Relationships

Drills tagged with this skill, unpassed first. Pass them all to mark the skill ready for scenarios.

Module 4: Data Visualization

0/3 done
Exercises (0/3)
  • 1
    Ad Spend vs Sales
    Context. Ten weeks of ad spend and sales. Before anyone claims "ads work", plot the relationship. Your task. Write make_scatter(df) that draws a seaborn scatter plot with ad_spend on x and sales on y, and returns the axes. Example. sns.scatterplot(...) — the column names become the axis labels automatically. Notes. Pass the DataFrame via data= and name the columns via x= / y=.
    7 min· 10 XP
  • 2
    Weekly Visitors Trend
    Context. Six weeks of site visitors. A line makes the direction of travel obvious — and a title makes the chart self-explanatory. Your task. Write make_trend(df) that draws a seaborn line plot of visitors over week, gives the chart a title (any wording), and returns the axes. Example. sns.lineplot(...) then ax.set_title("Weekly Visitors"). Notes. sns.lineplot returns the axes — keep a reference so you can title it.
    7 min· 10 XP
  • 3
    Color Points by Segment
    Context. Customer visits vs spend — but Basic and Premium customers behave differently. Coloring by segment turns one cloud of dots into two stories. Your task. Write make_segment_scatter(df) that draws a seaborn scatter of spend over visits, colored by segment using hue, and returns the axes. Example. hue="segment" — each segment gets its own color and a legend entry. Notes. The legend appears automatically once hue is set.
    7 min· 10 XP