|
- report_path_info <- function(report_path) {
- # data-raw/reports/{sboe_id}/all/{report_id}_{received_date}.txt
- report_path <- fs::path_abs(report_path)
- x <- fs::path_rel(report_path, here::here("..", "data-raw", "reports"))
- x <- map(x, path_split) |> list_flatten()
-
- tibble(
- sboe_id = map_vec(x, \(x) x[1]),
- report_id = map_int(x, \(x) as.integer(strsplit(x[3], "_")[[1]][1])),
- )
- }
|