1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Data Visualization with Julia

Exercise

Spotify as therapy

In this exercise, you will create a series recipe to display the distribution of ages of Spotify's customers and the effects of music on mental health. You will apply this recipe to generate box plots of either the ages or self-reported depression levels as a function of music's effects on mental health.

The spotify DataFrame is available in your environment, and the StatsPlots package has been imported for you.

Instructions 1/3

undefined XP
  • 1
    • Generate a my_box series recipe that plots a box plot, incorporates customizations, hides the outliers and the legend.
  • 2
    • Use the :my_box recipe to plot Age (y-axis) versus Music_effects (x-axis) by providing the appropriate argument to the plot() function.
  • 3
    • Plot Depression (y-axis) versus Music_effects (x-axis) using the :my_box recipe by defining a plotting function with @shorthands.