Exercise

Hardcoding a highlight

You are working with the city of Houston to look at the relationship between sulfur dioxide (SO2) and nitrogen dioxide (NO2) pollution, specifically, pollution in the most recent year data was collected (2014). You have singled out a particularly bad day, November 26th, where there was a bad spike in the SO2 levels. To draw the viewers attention to this bad day, you will highlight it in a bright orangish-red and color the rest of the points gray.

pandas, matplotlib.pyplot, and seaborn are loaded as pd, plt, and sns, respectively, and will be available in your workspace for the rest of the course.

This course touches on a lot of concepts you may have forgotten, so if you ever need a quick refresher, download the Seaborn Cheat Sheet and keep it handy!

Instructions

100 XP
  • Modify the list comprehension to color the value corresponding to the 330th day (November 26th) of the year 2014 to orangered and the rest of the points to lightgray.
  • Pass the houston_colors array to regplot() using the scatter_kws argument to color the points.