diff --git a/R/sysdata.rda b/R/sysdata.rda index c5aa411..3608c45 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/data-raw/wbids-data.R b/data-raw/wbids-data.R index 9106b84..ef9d9b3 100644 --- a/data-raw/wbids-data.R +++ b/data-raw/wbids-data.R @@ -60,7 +60,20 @@ geographies_wdi <- geographies_raw[[2]] |> geography_type = if_else( .data$region_name == "Aggregates", "Region", "Country" ), - across(where(is.character), ~ if_else(.x == "", NA, .x)), + region_id = if_else( + .data$region_name == "Aggregates", NA_character_, .data$region_id + ), + region_iso2code = if_else( + .data$region_name == "Aggregates", NA_character_, .data$region_iso2code + ), + income_level_id = if_else( + .data$region_name == "Aggregates", NA_character_, .data$income_level_id + ), + income_level_iso2code = if_else( + .data$region_name == "Aggregates", NA_character_, + .data$income_level_iso2code + ), + across(where(is.character), ~ if_else(.x == "", NA_character_, .x)), across(where(is.character), ~ trimws(gsub("\u00a0", "", .x))) ) |> relocate(c("geography_type", "capital_city"), .after = "geography_iso2code") @@ -264,9 +277,7 @@ counterparts <- counterparts_ids_cleaned |> counterpart_name %in% global_mdbs ~ "Global MDBs", counterpart_name %in% c("Bondholders") ~ "Bondholders", counterpart_name %in% c("World") ~ "All Creditors", - geography_type == "Country" ~ "Country", - geography_type == "Region" ~ "Region", - .default = "Other" + .default = geography_type ) ) |> select( diff --git a/tests/testthat/test-ids_bulk.R b/tests/testthat/test-ids_bulk.R index efbfd7a..4ae2b5b 100644 --- a/tests/testthat/test-ids_bulk.R +++ b/tests/testthat/test-ids_bulk.R @@ -168,7 +168,7 @@ test_that("ids_bulk handles warn_size parameter", { download_bulk_file( test_url, tempfile(), 60, warn_size = TRUE, quiet = TRUE ), - "This file is 125.8 MB and may take several minutes to download", + "may take several minutes to download", fixed = FALSE )