ons_get | R Documentation |
This functions is used to find information about data published by the ONS.
Datasets
are published in unique versions
, which are categorized by edition
.
Available datasets are given an id
. All available id
can be viewed with ons_ids()
.
ons_get(
id = NULL,
edition = NULL,
version = NULL,
ons_read = getOption("onsr.read"),
...
)
ons_get_obs(id = NULL, edition = NULL, version = NULL, ...)
id |
|
edition |
|
version |
|
ons_read |
|
... |
Further arguments passed on the methods. |
A tibble with the dataset in tidy format.
ons_get(id = "cpih01")
# Same dataset but older version
ons_get(id = "cpih01", version = "5")
# Take only specific observations
ons_get_obs("cpih01", geography = "K02000001", aggregate = "cpih1dim1A0", time = "Oct-11")
# Or can use a wildcard for the time
ons_get_obs("cpih01", geography = "K02000001", aggregate = "cpih1dim1A0", time = "*")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.