НачатьНачать бесплатно

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.

Это упражнение является частью курса

Analyzing US Census Data in R

Посмотреть курс

Инструкции к упражнению

  • 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.

Интерактивное практическое упражнение

Попробуйте выполнить это упражнение, дополнив этот пример кода.

# 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")
Редактировать и запускать код