
Query a data set using GET and a query URL
get_dataset.Rd
This function provides a method for generating and sending a URL based data query to the EES API. As a minimum, it requires the dataset_id and indicators flags to be provided.
Note that the GET command is very limited on the level of logic it can process. For example there is no way of using GET to make a query that combines different filters with AND logic. So if you give GET a set of filter items to search on, it can only return all rows containing any of those items.
Usage
get_dataset(
dataset_id,
indicators,
time_periods = NULL,
geographic_levels = NULL,
locations = NULL,
filter_items = NULL,
dataset_version = NULL,
preview_token = NULL,
ees_environment = NULL,
api_version = NULL,
page = NULL,
page_size = 10000,
parse = TRUE,
verbose = FALSE
)
Arguments
- dataset_id
ID of data set to be connected to. This is required if the endpoint is one of "get-dataset-versions", "get-summary", "get-meta", "get-csv", "get-data" or "post-data"
- indicators
Indicators required as a string or vector of strings (required)
- time_periods
Time periods required as a string ("period|code") or vector of strings
- geographic_levels
Geographic levels required as a string or vector of strings
- locations
Location code required as a string or vector of strings
- filter_items
Filter items required as a string or vector of strings
- dataset_version
Version of data set to be connected to
- preview_token
Preview token required for access to private data sets
- ees_environment
EES ees_environment to connect to: "dev", "test", "preprod" or "prod"
- api_version
EES API version
- page
Page number of query results to return
- page_size
Number of results to return in a single query
- parse
Logical flag to activate parsing of the results. Default: TRUE
- verbose
Run with additional contextual messaging. Logical, default = FALSE
Examples
eesyapi:::get_dataset(
example_id(),
geographic_levels = c("NAT"),
filter_items = example_id("filter_item"),
indicators = example_id("indicator")
)
#> time_period time_identifier geographic_level nat_name nat_code
#> 1 2025 Week 21 National England E92000001
#> 2 2025 Week 20 National England E92000001
#> 3 2025 Week 18 National England E92000001
#> 4 2025 Week 15 National England E92000001
#> 5 2025 Week 14 National England E92000001
#> 6 2025 Week 12 National England E92000001
#> 7 2025 Week 10 National England E92000001
#> 8 2025 Week 8 National England E92000001
#> education_phase persistent_absence_percent
#> 1 Primary 13.42
#> 2 Primary 13.41
#> 3 Primary 13.76
#> 4 Primary 14.1
#> 5 Primary 14.15
#> 6 Primary 14.06
#> 7 Primary 14.41
#> 8 Primary 14.95