File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -95,26 +95,20 @@ update_hub_target_data <- function(
9595 }
9696
9797 if (nssp_update_local ) {
98- nssp_dir <- fs :: path(
98+ nssp_file_path <- fs :: path(
9999 base_hub_path ,
100100 " auxiliary-data" ,
101- " nssp-raw-data"
101+ " nssp-raw-data" ,
102+ " latest" ,
103+ ext = " parquet"
102104 )
103- nssp_files <- fs :: dir_ls(nssp_dir , regexp = " latest\\ .(csv|parquet)$" )
104105
105- if (length( nssp_files ) == 0 ) {
106+ if (! fs :: file_exists( nssp_file_path ) ) {
106107 cli :: cli_abort(
107- glue :: glue(
108- " Cannot find NSSP data file (latest.csv or latest.parquet) " ,
109- " in {nssp_dir}."
110- )
108+ glue :: glue(" Cannot find NSSP data file at {nssp_file_path}" )
111109 )
112110 }
113111
114- nssp_file_path <- nssp_files [which.max(
115- fs :: path_ext(nssp_files ) == " parquet"
116- )]
117-
118112 raw_nssp_data <- forecasttools :: read_tabular(nssp_file_path ) | >
119113 dplyr :: filter(.data $ county == " All" ) | >
120114 dplyr :: select(
You can’t perform that action at this time.
0 commit comments