Skip to content
R for the Rest of Us Logo

Mapping with R

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

Transcript

Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.

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

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 and we will help you out!

You need to be signed-in to comment on this post. Login.

Course Content

34 Lessons