Skip to content

Commit

Permalink
refreshing datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjbe committed Jun 21, 2024
1 parent e30dba1 commit bb87555
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Binary file modified data/ojo_regex_flags.rda
Binary file not shown.
14 changes: 12 additions & 2 deletions inst/sandbox.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,31 @@ cli::cli_alert_success(
)
beepr::beep()

# CDS (Other / Unspecified) refinement for LOFT stuff --------------------------
final |>
filter(
count_as_filed_clean == "CDS (Other / Unspecified)",
!str_detect(count_as_filed, ojo_get_flag_regex(flag = "manufacture")), # no "Manufacturing"
!str_detect(count_as_filed, ojo_get_flag_regex(flag = "intoxication")), # no DWI or public intox
!str_detect(count_as_filed, ojo_get_flag_regex(flag = "under_the_influence")),
!str_detect(count_as_filed, ojo_get_flag_regex(flag = "forge")), # no "obtain by fraud"
!str_detect(count_as_filed, "(?i)telecom"), # No "use of telecom device in cds transaction"
!str_detect(count_as_filed, "(?i)telecom|wire"), # No "use of telecom device in cds transaction"
!str_detect(count_as_filed, "(?i)cult"), # no "cultivation of cds"
!str_detect(count_as_filed, ojo_get_flag_regex(flag = "deliver")), # no "delivery of cds"
!str_detect(count_as_filed, ojo_get_flag_regex(flag = "distribution")), # no "distribution of cds"
!str_detect(count_as_filed, ojo_get_flag_regex(flag = "phone")), # no "cellular phone"
!str_detect(count_as_filed, ojo_get_flag_regex(flag = "dui_or_apc")),
!str_detect(count_as_filed, ojo_get_flag_regex(flag = "child")),
!str_detect(count_as_filed, "(?i)traff") # no "trafficking"
) |>
distinct(count_as_filed) |>
count(count_as_filed, sort = T) |>
view()

# Larceny (Other / Unspecified) refinement for LOFT stuff ----------------------


# Fraud (Other / Unspecified) refinement for LOFT stuff ------------------------


# # Classifications rundown
# final |>
Expand Down

0 comments on commit bb87555

Please sign in to comment.