Exercise: Plot number of crimes by US states

Create a bar chart showing the number of crimes by US state per 100,000 residents in 1973.

  1. Use the ggplot() function and specify the us_arrests dataset as input
  2. Add a geom_col() layer to the plot
  3. Plot one bar for each state (x aesthetic)
  4. Use the number of cases as bar height (y aesthetic)
  5. Use the crime type as fill aesthetic.
Output

Submit code to see output here.

Create your first bar chart