Skip to content

Commit

Permalink
Update generate_forecast_score_arrow.R
Browse files Browse the repository at this point in the history
  • Loading branch information
rqthomas committed Feb 23, 2024
1 parent 4a63703 commit f0ff6b5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions R/generate_forecast_score_arrow.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@ generate_forecast_score_arrow <- function(targets_file,
units = "seconds"),
horizon = horizon / 86400)


reference_datetime_format <- "%Y-%m-%d %H:%M:%S"

df <- df |> dplyr::mutate(reference_datetime = strftime(lubridate::as_datetime(reference_datetime),format=reference_datetime_format,tz = "UTC"),
reference_date = lubridate::as_date(datetime))
df <- df |> dplyr::mutate(reference_date = lubridate::as_date(datetime))

arrow::write_dataset(df, path = output_directory, partitioning = c("site_id","model_id","reference_date"))

Expand Down

0 comments on commit f0ff6b5

Please sign in to comment.