Description Usage Arguments Details Value Examples
Schema data is metadata on the datasets and folders available
at the root level of Stat-Xplore. More details on the schema
endpoint is
available in the
API documentation
1 | dwp_schema(id = NULL)
|
id |
If |
dwp_schema
can be used iteratively to get folders and databases
at each level.
The function will work with or without "str:"
at
the start of each ID string. id="str:database:ESA_Caseload"
and
id="database:ESA_Caseload"
will return the same data, but a query like
id="r:database:ESA_Caseload"
will fail.
A tibble with the relevant
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
#Get all available folders
a <- dwp_schema()
# Get all databases in the ESA folder
b <- dwp_schema("str:folder:fesa")
# Get all variables in the ESA caseload database
c <- dwp_schema("str:database:ESA_Caseload")
# Given their ID, you can use `dwp_schema` to return the names of levels
# in group and field variables
d <- dwp_schema("str:field:ESA_Caseload:V_F_ESA:CTDURTN")
# Returns a tibble of levels for the duration options for ESA caseloads
e <- dwp_schema("str:valueset:ESA_Caseload:V_F_ESA:CTDURTN:C_ESA_DURATION")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.