Skip to content

Commit 80d43b6

Browse files
authored
Merge pull request cdcepi#3 from reichlab/bs/remove-extra-target-data-dirs/24
Store non-partitioned target data files directly in target-data
2 parents a1c35a3 + 1d65f77 commit 80d43b6

File tree

4 files changed

+30480
-29160
lines changed

4 files changed

+30480
-29160
lines changed

target-data/get_target_data_hubverse.R

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -504,10 +504,8 @@ create_target_data <- function(as_of = NULL, include_after = "2024-11-01", targe
504504
}
505505

506506
# Where we'll save things
507-
time_series_path <- file.path(target_data_path, "time-series")
508-
time_series_file <- file.path(time_series_path, "time-series.csv")
509-
oracle_output_path <- file.path(target_data_path, "oracle-output")
510-
oracle_output_file <- file.path(oracle_output_path, "oracle-output.csv")
507+
time_series_file <- file.path(target_data_path, "time-series.csv")
508+
oracle_output_file <- file.path(target_data_path, "oracle-output.csv")
511509

512510
# Get original target data from FluSight hub and filter using include_after
513511
location_data <- get_location_data()
@@ -542,11 +540,8 @@ create_target_data <- function(as_of = NULL, include_after = "2024-11-01", targe
542540
dplyr::select(all_of(oracle_col_order), everything())
543541

544542
# Write updated target data files
545-
if (!dir.exists(time_series_path)) {
546-
dir.create(time_series_path, recursive = TRUE)
547-
}
548-
if (!dir.exists(oracle_output_path)) {
549-
dir.create(oracle_output_path, recursive = TRUE)
543+
if (!dir.exists(target_data_path)) {
544+
dir.create(target_data_path, recursive = TRUE)
550545
}
551546

552547
tryCatch({

0 commit comments

Comments
 (0)