Session Ready
Exercise

Customizing a ggplot2 margin of error plot

You've hopefully identified some problems with the chart you created in the previous exercise. As the counties are not ordered, patterns in the data are difficult for a viewer to parse. Specifically, margin of error plots are much more effective when dots are ordered as the ordering allows viewers to understand the uncertainty in estimate values relative to other estimates. Additionally, the lack of plot formatting makes it difficult for chart viewers to understand the chart's content. In this exercise, you'll clean up your ggplot2 code to create a much more visually appealing margin of error chart.

Instructions
100 XP
  • Use the str_replace() tidyverse function to remove " County, Maine" from the county name.
  • Reorder the counties in descending order of median household income in the plot.
  • Set the subtitle to "Counties in Maine" to add information common to the data points with subtitle.