Chapter 6 Month of Crime

We examine the months in which Crime has occurred and create a bar plot.

LACrime$MonthOfCrime =  month.abb[month(mdy(LACrime$DateOccurred))]

LACrime %>%
  group_by(MonthOfCrime) %>%
  summarise(CountIncidents = n()) %>%
  mutate(MonthOfCrime = reorder(MonthOfCrime,CountIncidents)) %>%
  
ggplot(aes(x = MonthOfCrime,y = CountIncidents)) +
  geom_bar(stat='identity',colour="white", fill =fillColor) +
  geom_text(aes(x = MonthOfCrime, y = 1, label = paste0("(",CountIncidents,")",sep="")),
            hjust=0, vjust=.5, size = 4, colour = 'black',
            fontface = 'bold') +
  labs(x = 'Month Of Crime', y = 'Count of Incidents', 
       title = 'Count of Incidents') +
  coord_flip() + 
  theme_bw()

We observe that the months of November and December have the lowest crimes.