ons_get {onsr} | R Documentation |
Download data from ONS
Description
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()
.
Usage
ons_get(
id = NULL,
edition = NULL,
version = NULL,
ons_read = getOption("onsr.read"),
...
)
ons_get_obs(id = NULL, edition = NULL, version = NULL, ...)
Arguments
id |
|
edition |
|
version |
|
ons_read |
|
... |
Further arguments passed on the methods. |
Value
A tibble with the dataset in tidy format.
Examples
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 = "*")