Chapter 11 Sex and Types of Crime

We examine the Types of Crime the males and females are being involved in. For the sake of clarity, we plot only the top Ten Sex and Crime Type numbers in the bar plot. Let’s see whether we find any interesting observation.

LACrime %>%
  filter(!is.na(VictimSex)) %>%
  group_by(VictimSex,CrimeCodeDescription) %>%
  tally() %>%
  ungroup() %>%
  mutate(VictimSex = reorder(VictimSex,n)) %>%
  arrange(desc(n)) %>%
  head(10) %>%
  
  ggplot(aes(x = VictimSex,y = n, fill =CrimeCodeDescription)) +
  geom_bar(stat='identity') +
  labs(x = 'Sex and Crime Description', y = 'Count of Incidents', 
       title = 'Count of Incidents and Sex and Crime Description') +
  coord_flip() + 
  theme_bw() + theme(legend.position="top")

We observe for Females we have the Category Intimate Partner - Simple Assault which we do not have for Males.