|
- prepare_candidates <- function(path_officers = "../data-prep/officers", report_list = tar_read(report_list)) {
- officers_pq <- prep_open_dataset(path_officers)
-
- officers <- officers_pq |> filter(type == "Candidate") |> collect()
-
- officers |>
- filter(type == "Candidate") |>
- filter(!is.na(name)) |>
- mutate(
- name_display = name,
- name = toupper(name)
- ) |>
- distinct(sboe_id, name, .keep_all = TRUE) |>
- semi_join(report_list, by = "report_id")
- }
|