read_release | R Documentation |
Returns the 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 = FALSE, ...)
## 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 (http://econdata.co.za) is required to use this function. The user must provide an API token that 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)
# Bank Balance Sheet (institutional)
MINING_RELEASE <- read_release(id = "MINING")
# Same as: read_release(id = "BA900", tidy = TRUE)
econdata_tidy(MINING_RELEASE, is_release = TRUE) # No further options supported.
# Releases for all CPI Revisions
read_release(id = "CPI_ANL_SERIES", version = "all", tidy = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.