read_release | R Documentation |
Returns the releases data for the given data set - ECONDATA:id(version), as a list, or as tidy data.table's. Tidying can be done directly within read_econdata()
, or ex-post using econdata_tidy()
.
read_release(id, tidy = TRUE, ...)
## S3 method for class 'eds_release'
tidy_data(x, ...)
id |
Data identifier. | ||||||||||||||||
x |
A raw API return object to be tidied. Can also be done directly in | ||||||||||||||||
... |
Further optional arguments:
| ||||||||||||||||
tidy |
logical. Return releases in a tidy data.table (see Value) with |
Specifying the full dataflow and data provider details (as opposed to only using the data id) allows more fine-grained control over the data set being queried. This is not necessary if there is only a single definition of the data and a single provider, which is typically the case.
An EconData account is required to use this function. The user must provide an API token, which can be found on the Account page of the online portal. A GUI dialog will prompt the user for their API token. Credentials can also be supplied by setting the ECONDATA_CREDENTIALS environment variable using the syntax: "client_id;client_secret", e.g. Sys.setenv(ECONDATA_CREDENTIALS="client_id;client_secret")
, when available.
If tidy = FALSE
, a nested lists containing metadata and release desciption and dates. If tidy = TRUE
, a (list of) data.table(s) providing release information, with metadata attached as an attribute.
write_release
read_econdata
## Not run:
# library(econdatar)
# Mining production and sales
MINING_RELEASE <- read_release(id = "MINING", tidy = FALSE)
# Same as: read_release(id = "MINING", tidy = TRUE)
tidy_data(MINING_RELEASE) # No further options supported.
# Releases for all data set versions
read_release(id = "CPI_ANL_SERIES", version = "all")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.