Chapter 16 Weapons in Crime

We examine the waepons used in the following barplot.

#WeaponDescription

LACrime %>%
  filter(!is.na(WeaponDescription)) %>%
  group_by(WeaponDescription) %>%
  tally() %>%
  ungroup() %>%
  arrange(desc(n)) %>%
  head(10) %>%
  mutate(WeaponDescription = reorder(WeaponDescription,n)) %>%
  
  ggplot(aes(x = WeaponDescription,y = n)) +
  geom_bar(stat='identity',colour="white", fill =fillColor2) +
  geom_text(aes(x = WeaponDescription, y = 1, label = paste0("(",n,")",sep="")),
            hjust=0, vjust=.5, size = 4, colour = 'black',
            fontface = 'bold') +
  labs(x = 'Weapon Description', y = 'Count of Incidents', 
       title = 'Count of Incidents and Weapon Description') +
  coord_flip() + 
  theme_bw()