Exercise

Digging in with basic transforms

You are curious to see if the population of a state correlates to the number of items sold at farmer's markets. To check this, take the log of the population and draw a scatter plot against the number of items sold by a market. From your previous explorations of the dataset, you know there will be a lot of overlap, so to get a better handle on the patterns you want to reduce the marker opacity.

Instructions

100 XP
  • Use numpy (imported as np) to create a new column: log_pop by taking the log of the state population.
  • Pass this newly created logged column to the scatter plot function's x-mapping.
  • Set the scatter plot's opacity to 25% to show overlap.