-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/translate-data-ids
- Loading branch information
Showing
54 changed files
with
2,016 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: eesyapi | ||
Title: EES-y API | ||
Version: 0.2.1 | ||
Version: 0.3.0 | ||
Authors@R: | ||
c( | ||
person("Rich", "Bielby", , "[email protected]", role = c("aut", "cre"), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#' Convert filter type to API filter type | ||
#' | ||
#' @description | ||
#' The API uses a slightly different naming convention for the different types of | ||
#' filters to what is used by analysts within data files. The function just converts | ||
#' from the file versions to the API versions. | ||
#' | ||
#' @inheritParams parse_tourl_filter_in | ||
#' | ||
#' @return String containing API friendly filter type descriptor | ||
#' @export | ||
#' | ||
#' @examples | ||
#' convert_api_filter_type("filter_items") | ||
#' convert_api_filter_type("geographic_levels") | ||
#' convert_api_filter_type("locations") | ||
#' convert_api_filter_type("filter_items") | ||
convert_api_filter_type <- function(filter_type) { | ||
eesyapi::validate_ees_filter_type(filter_type) | ||
filter_type <- filter_type |> | ||
stringr::str_replace("_item", "") | ||
gsub("_(\\w?)", "\\U\\1", filter_type, perl = TRUE) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.