Skip to content

Commit

Permalink
update renv
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjbe committed Aug 13, 2024
1 parent 20f69a0 commit 29c8393
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 112 deletions.
4 changes: 2 additions & 2 deletions R/ojo_apply_regex.R
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ ojo_apply_regex <- function(data,
if(.include_cats) {
ojo_regex_cats_tidy <- ojoregex::ojo_regex_cats |>
dplyr::select("clean_charge_description", "category", "subcategory", "title",
"statutes", "chapter", "cf_cm", "sq780_status")
"statutes", "chapter", "cf_cm", "sq780_status", "violent_crimes_list")

clean_data <- clean_data |>
dplyr::left_join(ojo_regex_cats_tidy,
Expand All @@ -417,7 +417,7 @@ ojo_apply_regex <- function(data,
paste0(col_to_clean, "_clean"),
data_names,
"category", "subcategory", "title", "statutes", "chapter", "cf_cm",
"sq780_status") # Might not be needed long term?
"sq780_status", "violent_crimes_list") # Might not be needed long term?

} else {
# Clean this up, you're being lazy
Expand Down
1 change: 1 addition & 0 deletions inst/sandbox.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ds <- read_csv("~/Documents/GitHub/loft-sq781-estimate/local/cm_cf_2001_2023.csv
tic()
final <- ds |>
mutate(grand = "test :D") |>
head(1000) |>
ojoregex::ojo_apply_regex(col_to_clean = "count_as_filed",
.keep_flags = FALSE, .include_cats = TRUE)
toc()
Expand Down
Loading

0 comments on commit 29c8393

Please sign in to comment.