Exercise

Popularity of goods sold by state

The farmer's market dataset contains columns corresponding to 28 different goods and whether or not they are sold at that market. You're curious to see if there are any interesting stories in this dataset regarding how likely you are to find a given good at a state's markets. To answer this question, you collapse the data into three columns:

  • state - the name of the state
  • good - the good of interest
  • prop_selling - the proportion of markets in that state that sell that good

To quickly determine if patterns emerge, you choose a subset of goods you find interesting and decide to make a simple text-scatter: the good on the x-axis and the proportion of a state's markets that sell that good on the y-axis.

Instructions

100 XP
  • Filter goods_by_state to the desired goods listed in to_plot.

  • Hide the scatter plot points by setting their size to nothing.

    • Note that in sns.scatterplot(), size is used to map values from a column to a size scale, and s is used to set a constant size for all points.
  • Make the text center aligned, so it sits directly on the good's x-axis location.