nomis_get_metadata | R Documentation |
Retrieve all concept code options of all Nomis datasets,
concept code options for a given dataset, or the all the options for a given
concept variable from a particular dataset. Specifying concept
will
return all the options for a given variable in a particular dataset.
If looking for a more detailed overview of all available
metadata for a given dataset, see nomis_overview()
.
nomis_get_metadata( id, concept = NULL, type = NULL, search = NULL, additional_queries = NULL, ..., tidy = FALSE )
id |
The ID of the particular dataset. Returns no data if not specified. |
concept |
A string with the variable concept to return options for. If
left empty, returns all the variables for the dataset specified by |
type |
A string with options for a particular code value, to return
types of variables available for a given code. Defaults to |
search |
A string or character vector of strings to search for in the
metadata. Defaults to |
additional_queries |
Any other additional queries to pass to the API.
See https://www.nomisweb.co.uk/api/v01/help for instructions on
query structure. Defaults to |
... |
Use to pass any other parameters to the API. |
tidy |
If |
A tibble with metadata options for queries using nomis_get_data()
.
nomis_data_info()
nomis_get_data()
nomis_overview()
a <- nomis_get_metadata("NM_1_1") print(a) b <- nomis_get_metadata("NM_1_1", "geography") tibble::glimpse(b) # returns all types of geography c <- nomis_get_metadata("NM_1_1", "geography", "TYPE") tibble::glimpse(c) # returns geography types available within Wigan d <- nomis_get_metadata("NM_1_1", "geography", "1879048226") tibble::glimpse(d) e <- nomis_get_metadata("NM_1_1", "item", geography = 1879048226, sex = 5) print(e) f <- nomis_get_metadata("NM_1_1", "item", search = "*married*") tibble::glimpse(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.