Start Date: 25 Sept. 2024
Report Date: 07 October 2024
The first question is: How many arrests were there for sex trafficking?
At first glance, this questions seems simple. But there are many ways of looking at it that can add to the complexity. For example, just counting the records where the arrest charge equals ‘641’ yields a different number of arrests found on the FBI website for 2022. In some arrests, the arrestee is charged with obscene material (presumably of minors); however, these incidents are still connected with the code 641 as the minor in the material is likely a victim of trafficking. We need to determine whether or not to include such arrests. My gut says that we would not include that kind of charge, but there are other examples to weed through.
I have not dug into the victim dataset yet. David is primarily concerned with the proportion of minors involved in trafficking. I presume that similar challenges exist in that dataset.
SmartEDA::ExpData(data)
#skimr::skim(data)
dlookr::diagnose(data) %>%
filter(missing_count > 0)
codebook1 = codebook %>%
select(Value,Value_Label=`Value Label`) %>%
mutate(Value=as.character(Value))
data1 = data %>%
select(Offense = ALLOFNS,city = BH007,state = BH008,Ethnicity=V60173,Arrestee_Resident_Status=V60181,everything()) %>%
mutate(Arrestee_Ethnicity = case_when(Ethnicity == 0 ~ "Non_Hispanic/Latino",
Ethnicity == 1 ~ "Hispanic/Latino",
TRUE ~ as.character(Ethnicity),
FALSE ~ "ALERTETH")) %>%
mutate(Arrestee_Resident_Status = case_when(Arrestee_Resident_Status == 0 ~ "Nonresident",
Arrestee_Resident_Status == 1 ~ "Resident",
Arrestee_Resident_Status == -7 ~ "Unknown/missing/DNR",
TRUE ~ as.character(Arrestee_Resident_Status),
FALSE ~ 'ALERTARREST')) %>%
separate_rows(Offense,sep = " ")
# mutate(Offense1 = strsplit(Offense," ")) %>%
# select(Offense1,everything()) %>%
# unnest(Offense1)
data2 = data1 %>%
left_join(codebook1,by=join_by(Offense==Value)) %>%
select(Value_Label,everything())
data2 %>%
group_by(Value_Label) %>%
ggplot(aes(y=fct_rev(fct_infreq(Value_Label))))+
geom_bar()+
theme_bw()+
labs(x="Number of Offense",
y="Offense Type",
title = "The most and least offenses committed")+
theme(plot.title = element_text(hjust = .5))
Figure 1: To get a better view, hover your mouse over the plot,
right click and select Open image in new tab
.
# '4' refers to exploiting children. No results found for them
data3 = data2 %>%
filter(Offense %in% c("641","642","4")) %>%
mutate(DATE = dmy(INCDATE),
MONTH = months.Date(DATE)) %>%
mutate((factor(MONTH, levels = month.name))) %>%
select(MONTH,DATE,INCDATE,everything())
data3 %>%
ggplot(aes(x=Value_Label))+
geom_bar()
Figure 2: To get a better view, hover your mouse over the plot,
right click and select Open image in new tab
.
No minor children? Just these two categories?
Lots of NAs. Are these non-arrestees / victims?
data3 %>%
group_by(Arrestee_Resident_Status,MONTH) %>%
summarise(Headcount = n()) %>%
arrange(factor(MONTH, levels = month.name)) %>%
pivot_wider(names_from = MONTH,values_from = Headcount) %>%
ungroup() %>%
bind_rows(summarize(.,across(where(is.numeric),sum,na.rm=T))) %>%
mutate(Total = rowSums(across(where(is.numeric)),na.rm=T))
data3 %>%
arrange(factor(MONTH, levels = month.name)) %>%
ggplot(aes(x=fct_inorder(MONTH),fill=Arrestee_Resident_Status))+
geom_bar()+
theme_bw()+
labs(fill=" ",
x="Month",
y="Count")+
theme(axis.text.x = element_text(angle = 45,vjust = .5))
Figure 3: To get a better view, hover your mouse over the plot,
right click and select Open image in new tab
.
Something happens between August and September when Residents outnumber Nonresidents.
data3 %>%
filter(!is.na(Arrestee_Resident_Status),
!Arrestee_Resident_Status == "Unknown/missing/DNR") %>%
arrange(factor(MONTH, levels = month.name)) %>%
ggplot(aes(x=fct_inorder(MONTH),fill=Arrestee_Resident_Status))+
geom_bar(position="dodge")+
theme_bw()+
labs(fill=" ",
x="Month",
y="Count",
title="Trafficking cases over Months")+
theme(plot.title = element_text(hjust = .5),
axis.text.x = element_text(angle = 45,vjust = .5))
Figure 4: To get a better view, hover your mouse over the plot,
right click and select Open image in new tab
.