Skip to content

Commit

Permalink
Merge pull request epiforecasts#461 from epiforecasts/bug-460-colombi…
Browse files Browse the repository at this point in the history
…a-failing-tests

Bug: epiforecasts#460 Colombia failing tests
  • Loading branch information
seabbs authored Feb 6, 2022
2 parents 79faa57 + 7b1d329 commit 7cceee8
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ importFrom(jsonlite,fromJSON)
importFrom(lifecycle,deprecate_stop)
importFrom(lubridate,as_date)
importFrom(lubridate,dmy)
importFrom(lubridate,dmy_hms)
importFrom(lubridate,mdy)
importFrom(lubridate,month)
importFrom(lubridate,year)
Expand Down
4 changes: 2 additions & 2 deletions R/Colombia.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Colombia <- R6::R6Class("Colombia",

#' @description Colombia specific data cleaning
#' @importFrom dplyr select mutate rename summarise group_by n
#' @importFrom lubridate dmy_hms as_date
#' @importFrom lubridate as_date
#' @importFrom stringr str_replace_all str_to_sentence str_to_title
#' @importFrom rlang .data
#'
Expand All @@ -86,7 +86,7 @@ Colombia <- R6::R6Class("Colombia",
) %>%
group_by(date, level_2_region_code) %>%
summarise(cases_new = n(), .groups = "drop") %>%
mutate(date = as_date(dmy_hms(date)),
mutate(date = as_date(date),
level_2_region_code = sprintf("%05d", level_2_region_code)) %>%
left_join(
self$codes_lookup$`2`,
Expand Down
Binary file modified tests/testthat/custom_data/Colombia_level_1.rds
Binary file not shown.
Binary file modified tests/testthat/custom_data/Colombia_level_2.rds
Binary file not shown.

0 comments on commit 7cceee8

Please sign in to comment.