Session Ready
Exercise

Side-by-side revenue box plots with color

The New York Stock Exchange firm you did work for previously has contracted you to extend on your work building the box plot of company revenues.

They want to understand how different industries compare using this same visualization technique from before. They are also particular about what colors are used for what industries. They have prepared a list of industries and the colors as below.

Your task is to create a box plot of company revenues, as before, but include the specified colors based on the list of industries given below.

There is a revenues DataFrame already loaded for your use.

Industry-color RGB definitions:

  • Tech = 124, 250, 120
  • Oil = 112,128,144
  • Pharmaceuticals = 137, 109, 247
  • Professional Services = 255, 0, 0
Instructions
100 XP
  • Create a dictionary to map the different Industry values to the RGB codes noted above.
  • Create a box plot of revenues, setting the y-axis to be the company revenue.
  • Use the industry color map you created in the box plot construction.
  • Set the appropriate column for the color variable.