ComeçarComece de graça

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.

Este exercício faz parte do curso

Improving Your Data Visualizations in Python

Ver curso

Instruções do exercício

  • Set the scatter plot's points opacity to 10% and color them 'gray'.
  • Disable the default confidence interval band.

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

sns.regplot(x = 'lat', 
            y = 'months_open', 
            # Set scatter point opacity & color
            ____ = {'alpha':____, 'color':'____'}, 
            # Disable confidence band
            ____ = ____, 
            data = markets)

plt.show()
Editar e executar o código