You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
481B

  1. prepare_candidates <- function(path_officers = "../data-prep/officers", report_list = tar_read(report_list)) {
  2. officers_pq <- prep_open_dataset(path_officers)
  3. officers <- officers_pq |> filter(type == "Candidate") |> collect()
  4. officers |>
  5. filter(type == "Candidate") |>
  6. filter(!is.na(name)) |>
  7. mutate(
  8. name_display = name,
  9. name = toupper(name)
  10. ) |>
  11. distinct(sboe_id, name, .keep_all = TRUE) |>
  12. semi_join(report_list, by = "report_id")
  13. }