This makes ojo_crim_cases() return a tibble that has counts included for both OSCN and ODCR. There is one row per count. You can't nest by id to get one row per case like I'd want, but I think this is preferable since it returns a lazy tibble. That way the analyst chooses when to collect. They can always do ojo_crim_cases() |> collect() |> group_by(id) |> nest(counts_as_filed = count_as_filed)
This makes
ojo_crim_cases()
return a tibble that has counts included for both OSCN and ODCR. There is one row per count. You can't nest by id to get one row per case like I'd want, but I think this is preferable since it returns a lazy tibble. That way the analyst chooses when to collect. They can always doojo_crim_cases() |> collect() |> group_by(id) |> nest(counts_as_filed = count_as_filed)