Get startedGet started for free

Creating a box plot

When people leave reviews for products, services, or destinations, people reading those reviews can sometimes mark the original review as helpful. If enough people mark the review as helpful, future readers of these reviews might be more likely to trust the content of the original review.

Using the reviews dataset, explore the continuous variable "Helpful votes" across the different categories found in the "Traveler type" variable.

Note that for the remainder of this chapter, seaborn as sns and matplotlib.pyplot as plt will be preloaded for you.

This exercise is part of the course

Working with Categorical Data in Python

View Course

Exercise instructions

  • Set the font size of your graphic to be 1.25.
  • Set the background of the graphic to be "darkgrid".
  • Create a boxplot using catplot() with "Helpful votes" as the continuous variable split across each "Traveler type". Make sure that you are using the reviews dataset.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Set the font size to 1.25
sns.____(____)

# Set the background to "darkgrid"
sns.____(____)

# Create a boxplot
sns.catplot(____)

plt.show()
Edit and Run Code