Skip to content

Commit

Permalink
drop dep args from get_regional_data
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs committed Feb 5, 2022
1 parent 927d9f1 commit aff45c6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
26 changes: 0 additions & 26 deletions R/get_regional_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
#' @param country A character string specifying the country to get data from.
#' Not case dependent. Name should be the English name. For a list of
#' options use `get_available_datasets()`.
#' @param include_level_2_regions `r lifecycle::badge("deprecated")` Boolean. If TRUE, returns data stratified by
#' level 2 regions. If FALSE, stratified by Level 1. Note that Level 2 region
#' data is not always available. In these cases the user will get a warning
#' and the Level 1 data will be returned.
#' @param localise_regions `r lifecycle::badge("deprecated")` Logical, defaults to TRUE. Should region names be localised.
#' @inheritParams return_data
#' @inheritParams initialise_dataclass
#' @return A tibble with data related to cases, deaths, hospitalisations,
Expand Down Expand Up @@ -47,28 +42,7 @@
get_regional_data <- function(country, level = "1", totals = FALSE,
localise = TRUE, steps = FALSE,
class = FALSE, verbose = TRUE, regions,
include_level_2_regions = deprecated(),
localise_regions = deprecated(),
...) {
if (is_present(include_level_2_regions)) {
deprecate_warn(
"0.9.0",
"covidregionaldata::get_regional_data(include_level_2_regions = )", "covidregionaldata::get_regional_data(level = )"
)
if (include_level_2_regions) {
level <- "1"
} else {
level <- "2"
}
}

if (is_present(localise_regions)) {
deprecate_warn(
"0.9.0",
"covidregionaldata::get_regional_data(localise_regions = )", "covidregionaldata::get_regional_data(localise = )"
)
localise <- localise_regions
}

# check data availability and initiate country class if available
region_class <- initialise_dataclass(
Expand Down
13 changes: 0 additions & 13 deletions tests/testthat/test-get_regional_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,6 @@ test_get_regional_data <- function(level) {
verbose = FALSE
)
)
# test depreciated args
if (level == "2") {
expect_warning(get_regional_data("mexico",
level = level,
include_level_2_regions = TRUE, verbose = FALSE
))
expect_warning(
get_regional_data("mexico",
localise_regions = TRUE,
verbose = FALSE
)
)
}
})
}

Expand Down

0 comments on commit aff45c6

Please sign in to comment.