Is latitude related to months open?
While exploring the farmers market dataset with a scatter matrix, you noticed a potentially interesting relationship between a market's latitude and the number of months it stays open. Digging into this relationship a bit further, you decide to use Seaborn's regression plot to see if there's any weight to this pattern or if the heavy overlap of the points is playing tricks on your eyes.
To make the regression line stand out, you'll want to lower the overlapping background points opacity and color them a muted gray. Since you're not going to be making any formal inference and want to quickly investigate a pattern, you can turn off the default uncertainty band.
This exercise is part of the course
Improving Your Data Visualizations in Python
Exercise instructions
- Set the scatter plot's points opacity to 10% and color them
'gray'
. - Disable the default confidence interval band.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
sns.regplot(x = 'lat',
y = 'months_open',
# Set scatter point opacity & color
____ = {'alpha':____, 'color':'____'},
# Disable confidence band
____ = ____,
data = markets)
plt.show()