Lesson 22 of34
In Progress

Make a Choropleth Map of Continuous Variables with ggplot2 (02_07)

Your Turn

For this exercise I took to Twitter to find a dataset that makes DC distinct from the states of US (in 2020).

Use the your-turn script in 02_07w to make this map, ensuring to add a guide item for District of Columbia which does not contain any federal prisons. You’ll need to go through the same steps I did:

  • Create an NA aeshetic
  • Override the guide aesthetics
  • Set the na.value for the fill aesthetic
Solutions
Learn More

In this video I talk about viridis being the single best choice for a continuous color palette. This is because the color palette works well for folks with colorblindness and is perceptually uniform – which means it’s easy to know if you’re looking at a low or high value on the scale.

Have any questions? Put them below. David or Charlie Hadley will help you out!