-
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.
* Created initial layout for post_dataset() * Added basic read-some-json functionality to post_dataset * Updated post_dataset with some basic results extraction from the http response * Created placeholder parse_params_to_json function * Updating pkgdown listings * Resolving conflicts with main * Updating docs and tests * Adding POST into query_dataset() and creating first working post_dataset example * Switching filter-parsing based querying to GET whilst I develop that functionality in POST * Added parsing functions for creating geographic levels and time periods json query strings * Quick typo fix * Developed json creation to include time periods, geographic levels, locations and filter item querying * Updated post/query_dataset examples * Added locations processing to json parsing * Overhauled parse geographies to combine geographic level and location selection in a (hopefully) sensible way * Tidy up of post and query data set examples and param defs * Adding geographies param definiteion * Fixing some extra lintr comments from the PR * Added more complex filter querying for post_datatset * Added indicator parsing for post_dataset() * Added basic description for parse_tojson_params() * Added test of post_dataset collecting the required geographies * Improved examples on query_dataset and added some tests * Trying to fix some odd behaviour with the tests * Test snapshot updates * Code styling * Bit of clean up on tests and adding the debug mode flag for posting queries * Cleaning up some roxygen text * Extra documentation prompted by PR comments * Expanding examples for query_datatset and post_dataset * Improved examples around query_dataset() * Added some extra tests on query_dataset * Renamed to_api_filter_type * Adding explicit package refs in seed_tests * Added extra documentation to query_dataset() * Added time period definition to query_dataset docs * Added more explicit function calls to seed_tests * Fixing bug in get_meta function when only one geographic level is available * Fixed bug in location validation and updated some example sqids * Playing around with code/id validation * Added additional validation and updated meta request to handle school level locations * Added time_periods validation * Updated testing of validation scripts * Added testing of time period query in post data set * Added extra tests around filter queries using post data set * Fixed bug in validate ees id * Updated get data set geography levels in line with data set * Updating testing and get-meta functionality for http_request_error * Updated example_id function to handle a wider range of objects of differing structures * Updated version to 0.3.0 and updated NEWS.md
- Loading branch information
Showing
55 changed files
with
2,051 additions
and
277 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"), | ||
|
@@ -21,4 +21,6 @@ Imports: | |
httr, | ||
jsonlite, | ||
dplyr, | ||
stringr | ||
stringr, | ||
rlang, | ||
magrittr |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.