Session Ready
Exercise

Quantiles choropleth

In this exercise we will create a quantile version of the tree density map. Remember that the quantile algorithm will rank and split the values into groups with the same number of elements to assign a color to each. This time, we will create seven groups that allocate the colors of the YlGn colormap across the entire set of values.

The district_trees GeoDataFrame is again already loaded. It includes the variable n_trees_per_area, measuring tree density by district (note the variable has been multiplied by 10,000).

Instructions
100 XP
  • Generate a choropleth using the 'n_trees_per_area' variable, a quantile classification scheme with 7 classes and the YlGn color map. Assign the result to a variable named ax.
  • Remove the frames, ticks and tick labels from the plot for a cleaner map using the set_axis_off() method.