Customizing the map output
Now that you've chosen an appropriate color palette for your choropleth map of median home values by Census tract in Marin County, you'll want to customize the output. In this exercise, you'll clean up some map elements and add some descriptive information to provide context to your map.
Este exercício faz parte do curso
Analyzing US Census Data in R
Instruções do exercício
- Set the color guide to FALSE to avoid double-plotting of the legend.
- Add an informative subtitle to your map.
- Add an informative caption to your map.
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Set the color guide to FALSE and add a subtitle and caption to your map
___(marin_value, ___(fill = estimate, color = ___)) +
___() +
scale_fill_viridis_c(labels = scales::dollar) +
scale_color_viridis_c(guide = ___) +
theme_minimal() +
coord_sf(crs = 26911, datum = NA) +
labs(title = "Median owner-occupied housing value by Census tract",
___ = "Marin County, California",
___ = "Data source: 2012-2016 ACS.\nData acquired with the R tidycensus package.",
fill = "ACS estimate")