diff --git a/submission_processing/process_submissions.R b/submission_processing/process_submissions.R index cedf5ee024..648ac6dd92 100644 --- a/submission_processing/process_submissions.R +++ b/submission_processing/process_submissions.R @@ -71,6 +71,7 @@ if(length(submissions) > 0){ curr_submission <- basename(submissions[i]) theme <- stringr::str_split(curr_submission, "-")[[1]][1] model_id <- stringr::str_split(tools::file_path_sans_ext(tools::file_path_sans_ext(curr_submission)), "-")[[1]][5] + reference_datetime <- lubridate::as_datetime(paste0(stringr::str_split(curr_submission, "-")[[1]][2:4], collapse = "-")) submission_dir <- dirname(submissions[i]) print(curr_submission) @@ -104,6 +105,10 @@ if(length(submissions) > 0){ fc <- fc |> mutate(model_id = model_id) } + if(!("reference_datetime" %in% colnames(fc))){ + fc <- fc |> mutate(reference_datetime = reference_datetime) + } + fc <- fc |> dplyr::mutate(pub_datetime = lubridate::as_datetime(pub_datetime), datetime = lubridate::as_datetime(datetime),