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.

15 lines
523B

  1. write_committee_parquet <- function(report_list = tar_read(report_list)) {
  2. cover_path <- here::here("../data/cover")
  3. cover <- arrow::open_dataset(cover_path, partitioning = "sboe_id")
  4. latest_report_by_committee <- report_list |> slice_max(end_date, by = "sboe_id")
  5. committees <-
  6. cover |>
  7. semi_join(latest_report_by_committee, by = "report_id") |>
  8. collect() |>
  9. select(sboe_id:committee_type, fund_type, fund_name)
  10. arrow::write_parquet(committees, here::here("data/committees/part-0.parquet"))
  11. }