|
|
|
@@ -1,7 +1,7 @@ |
|
|
|
#+ setup |
|
|
|
library(tidyverse) |
|
|
|
library(fs) |
|
|
|
load_all(here::here("process")) |
|
|
|
pkgload::load_all(here::here("process")) |
|
|
|
|
|
|
|
#+ candidates |
|
|
|
john_bell <- "STA-8S285O-C-001" |
|
|
|
@@ -57,4 +57,31 @@ cf$report_list |> |
|
|
|
#> * `../../data-raw/reports/STA-O079OC-C-001/all/200919_2021-07-17.txt`: no records |
|
|
|
#> * `../../data-raw/reports/STA-XD82JF-C-001/all/210255_2022-10-24.txt`: no records |
|
|
|
|
|
|
|
# TODO: Identify reports that are missing a cover entry... |
|
|
|
# Identify reports that are missing a cover entry... |
|
|
|
no_records <- |
|
|
|
cf$report_list |> |
|
|
|
anti_join(distinct(cf$receipts, sboe_id, report_id)) |> |
|
|
|
anti_join(distinct(cf$expenditures, sboe_id, report_id)) |> |
|
|
|
anti_join(distinct(cf$summary, sboe_id, report_id)) |
|
|
|
|
|
|
|
missing_cover <- |
|
|
|
cf$report_list |> |
|
|
|
anti_join(cf$cover, by = c("sboe_id", "report_id")) |> |
|
|
|
anti_join(no_records, by = c("sboe_id", "report_id")) |
|
|
|
|
|
|
|
cf$report_list |> semi_join(missing_cover) |
|
|
|
cf$summary |>semi_join(missing_cover) |
|
|
|
|
|
|
|
|
|
|
|
# Some committees have "No Id" as their SBOE ID |
|
|
|
# => I'll make these "NOID-{report_id}" |
|
|
|
unique_committees <- cf$report_list |> distinct(sboe_id, committee_name) |
|
|
|
|
|
|
|
unique_committees |> |
|
|
|
semi_join( |
|
|
|
unique_committees |> count(sboe_id) |> filter(n > 1), |
|
|
|
by = "sboe_id" |
|
|
|
) |
|
|
|
|
|
|
|
cf$cover |> distinct(sboe_id, committee_name) |> count() |
|
|
|
cf$cover |> distinct(sboe_id) |> count() |