prepare_committees <- function(cover_raw, report_list = tar_read(report_list)) {
  latest_report_by_committee <- report_list |> slice_max(end_date, by = "sboe_id")

  cover_raw |>
    semi_join(latest_report_by_committee, by = "report_id") |>
    select(sboe_id:committee_type, fund_type, fund_name)
}

write_committee_parquet <- function(committees, out_path = "../data/committees.parquet") {
  arrow::write_parquet(committees, out_path)
}
