
Query a data set using POST and a query json
post_dataset.Rd
This function provides a method for generating and sending a json based data query to the EES API. As a minimum, it requires the dataset_id flag and either the indicators flag or a json file containing a query to be provided.
Usage
post_dataset(
dataset_id,
indicators = NULL,
time_periods = NULL,
geographies = NULL,
filter_items = NULL,
json_query = NULL,
dataset_version = NULL,
preview_token = NULL,
ees_environment = NULL,
api_version = NULL,
page = NULL,
page_size = 10000,
parse = TRUE,
debug = FALSE,
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
- geographies
String, vector or data frame containing the geographic levels and locations to be queried.
- filter_items
Filter items required as a string or vector of strings
- json_query
Optional path to a json file containing the query parameters
- 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
- debug
Run POST query in debug mode. Logical, default = FALSE
- verbose
Run with additional contextual messaging. Logical, default = FALSE
Examples
eesyapi:::post_dataset(
example_id(group = "attendance"),
json_query = example_json_query()
)
#> time_period time_identifier geographic_level nat_name nat_code reg_name
#> 1 2025 Week 3 Regional England E92000001 North West
#> 2 2025 Week 3 Regional England E92000001 North West
#> 3 2025 Week 3 Regional England E92000001 North West
#> 4 2025 Week 3 Regional England E92000001 North West
#> 5 2025 Week 3 Regional England E92000001 North West
#> 6 2025 Week 3 Regional England E92000001 North West
#> 7 2025 Week 3 Regional England E92000001 North West
#> 8 2025 Week 3 Regional England E92000001 North West
#> 9 2025 Week 3 Regional England E92000001 North West
#> 10 2025 Week 3 Regional England E92000001 North West
#> 11 2025 Week 3 Regional England E92000001 North West
#> 12 2025 Week 3 Regional England E92000001 North West
#> 13 2025 Week 3 Regional England E92000001 North West
#> 14 2025 Week 3 Regional England E92000001 North West
#> 15 2025 Week 3 Regional England E92000001 North West
#> 16 2025 Week 3 Regional England E92000001 North West
#> 17 2025 Week 3 Regional England E92000001 North East
#> 18 2025 Week 3 Regional England E92000001 North East
#> 19 2025 Week 3 Regional England E92000001 North East
#> 20 2025 Week 3 Regional England E92000001 North East
#> 21 2025 Week 3 Regional England E92000001 North East
#> 22 2025 Week 3 Regional England E92000001 North East
#> 23 2025 Week 3 Regional England E92000001 North East
#> 24 2025 Week 3 Regional England E92000001 North East
#> 25 2025 Week 3 Regional England E92000001 North East
#> 26 2025 Week 3 Regional England E92000001 North East
#> 27 2025 Week 3 Regional England E92000001 North East
#> 28 2025 Week 3 Regional England E92000001 North East
#> 29 2025 Week 3 Regional England E92000001 North East
#> 30 2025 Week 3 Regional England E92000001 North East
#> 31 2025 Week 3 Regional England E92000001 North East
#> 32 2025 Week 3 Regional England E92000001 North East
#> reg_code attendance_reason attendance_status
#> 1 E12000002 All approved educational activity Attendance
#> 2 E12000002 All possible sessions Possible sessions
#> 3 E12000002 Education off site (b) Attendance
#> 4 E12000002 Interview (j) Attendance
#> 5 E12000002 Approved sporting activity (p) Attendance
#> 6 E12000002 Educational visit trip (v) Attendance
#> 7 E12000002 Work experience (w) Attendance
#> 8 E12000002 Education arranged by LA (k) Attendance
#> 9 E12000002 All approved educational activity Attendance
#> 10 E12000002 All possible sessions Possible sessions
#> 11 E12000002 Education off site (b) Attendance
#> 12 E12000002 Interview (j) Attendance
#> 13 E12000002 Approved sporting activity (p) Attendance
#> 14 E12000002 Educational visit trip (v) Attendance
#> 15 E12000002 Work experience (w) Attendance
#> 16 E12000002 Education arranged by LA (k) Attendance
#> 17 E12000001 All approved educational activity Attendance
#> 18 E12000001 All possible sessions Possible sessions
#> 19 E12000001 Education off site (b) Attendance
#> 20 E12000001 Interview (j) Attendance
#> 21 E12000001 Approved sporting activity (p) Attendance
#> 22 E12000001 Educational visit trip (v) Attendance
#> 23 E12000001 Work experience (w) Attendance
#> 24 E12000001 Education arranged by LA (k) Attendance
#> 25 E12000001 All approved educational activity Attendance
#> 26 E12000001 All possible sessions Possible sessions
#> 27 E12000001 Education off site (b) Attendance
#> 28 E12000001 Interview (j) Attendance
#> 29 E12000001 Approved sporting activity (p) Attendance
#> 30 E12000001 Educational visit trip (v) Attendance
#> 31 E12000001 Work experience (w) Attendance
#> 32 E12000001 Education arranged by LA (k) Attendance
#> attendance_type education_phase time_frame session_count
#> 1 Approved educational activity All schools Week 56505
#> 2 All possible sessions All schools Week 9729751
#> 3 Approved educational activity All schools Week 20820
#> 4 Approved educational activity All schools Week 0
#> 5 Approved educational activity All schools Week 6697
#> 6 Approved educational activity All schools Week 23967
#> 7 Approved educational activity All schools Week 2054
#> 8 Approved educational activity All schools Week 2967
#> 9 Approved educational activity Primary Week 19314
#> 10 All possible sessions Primary Week 5176216
#> 11 Approved educational activity Primary Week 4716
#> 12 Approved educational activity Primary Week 0
#> 13 Approved educational activity Primary Week 2938
#> 14 Approved educational activity Primary Week 11257
#> 15 Approved educational activity Primary Week 0
#> 16 Approved educational activity Primary Week 403
#> 17 Approved educational activity All schools Week 21475
#> 18 All possible sessions All schools Week 3237909
#> 19 Approved educational activity All schools Week 7107
#> 20 Approved educational activity All schools Week 0
#> 21 Approved educational activity All schools Week 2906
#> 22 Approved educational activity All schools Week 8971
#> 23 Approved educational activity All schools Week 519
#> 24 Approved educational activity All schools Week 1972
#> 25 Approved educational activity Primary Week 7091
#> 26 All possible sessions Primary Week 1659146
#> 27 Approved educational activity Primary Week 1084
#> 28 Approved educational activity Primary Week 0
#> 29 Approved educational activity Primary Week 1159
#> 30 Approved educational activity Primary Week 4715
#> 31 Approved educational activity Primary Week 0
#> 32 Approved educational activity Primary Week 133
# Run post_dataset() to select rows containing either of two geographic locations and a single
# filter item.
eesyapi:::post_dataset(
example_id(group = "attendance"),
indicators = example_id("indicator", group = "attendance"),
time_periods = example_id("time_period", group = "attendance"),
geographies = example_id("location_code", group = "attendance"),
filter_items = example_id("filter_item", group = "attendance"),
page = 1,
page_size = 32
)
#> time_period time_identifier geographic_level nat_name nat_code
#> 1 2025 Week 3 National England E92000001
#> 2 2025 Week 3 National England E92000001
#> 3 2025 Week 3 National England E92000001
#> 4 2025 Week 3 National England E92000001
#> 5 2025 Week 3 National England E92000001
#> 6 2025 Week 3 National England E92000001
#> 7 2025 Week 3 National England E92000001
#> 8 2025 Week 3 National England E92000001
#> 9 2025 Week 3 National England E92000001
#> 10 2025 Week 3 National England E92000001
#> 11 2025 Week 3 National England E92000001
#> 12 2025 Week 3 National England E92000001
#> 13 2025 Week 3 National England E92000001
#> 14 2025 Week 3 National England E92000001
#> 15 2025 Week 3 National England E92000001
#> 16 2025 Week 3 National England E92000001
#> 17 2025 Week 3 National England E92000001
#> 18 2025 Week 3 National England E92000001
#> 19 2025 Week 3 National England E92000001
#> 20 2025 Week 3 National England E92000001
#> 21 2025 Week 3 National England E92000001
#> 22 2025 Week 3 National England E92000001
#> 23 2025 Week 3 National England E92000001
#> 24 2025 Week 3 National England E92000001
#> attendance_reason attendance_status attendance_type education_phase
#> 1 All late sessions Late sessions All late sessions All schools
#> 2 All late sessions Late sessions All late sessions All schools
#> 3 All late sessions Late sessions All late sessions All schools
#> 4 All late sessions Late sessions All late sessions All schools
#> 5 All late sessions Late sessions All late sessions All schools
#> 6 All late sessions Late sessions All late sessions All schools
#> 7 All late sessions Late sessions All late sessions Primary
#> 8 All late sessions Late sessions All late sessions Primary
#> 9 All late sessions Late sessions All late sessions Primary
#> 10 All late sessions Late sessions All late sessions Primary
#> 11 All late sessions Late sessions All late sessions Primary
#> 12 All late sessions Late sessions All late sessions Primary
#> 13 All late sessions Late sessions All late sessions Secondary
#> 14 All late sessions Late sessions All late sessions Secondary
#> 15 All late sessions Late sessions All late sessions Secondary
#> 16 All late sessions Late sessions All late sessions Secondary
#> 17 All late sessions Late sessions All late sessions Secondary
#> 18 All late sessions Late sessions All late sessions Secondary
#> 19 All late sessions Late sessions All late sessions Special
#> 20 All late sessions Late sessions All late sessions Special
#> 21 All late sessions Late sessions All late sessions Special
#> 22 All late sessions Late sessions All late sessions Special
#> 23 All late sessions Late sessions All late sessions Special
#> 24 All late sessions Late sessions All late sessions Special
#> time_frame session_count
#> 1 Monday 351534
#> 2 Tuesday 339756
#> 3 Wednesday 332987
#> 4 Thursday 325941
#> 5 Friday 291093
#> 6 Week 1641311
#> 7 Monday 119186
#> 8 Tuesday 108155
#> 9 Wednesday 104042
#> 10 Thursday 103412
#> 11 Friday 88889
#> 12 Week 523684
#> 13 Monday 228689
#> 14 Tuesday 227938
#> 15 Wednesday 225532
#> 16 Thursday 219220
#> 17 Friday 199514
#> 18 Week 1100893
#> 19 Monday 3659
#> 20 Tuesday 3663
#> 21 Wednesday 3413
#> 22 Thursday 3309
#> 23 Friday 2690
#> 24 Week 16734