Description Usage Arguments Details Value See Also Examples
Obtain information on EIA data series updates for a given category to avoid having to make requests for data that have not been updated since your last request.
1 2 3 4 5 6 7 8 | eia_updates(
id = NULL,
deep = FALSE,
n = 50,
start = 1,
tidy = TRUE,
key = eia_get_key()
)
|
id |
integer, category ID, may be a vector. If |
deep |
logical, if |
n |
integer, maximum number of rows of series to return. Defaults to 50; maximum permitted by the API is 10,000. |
start |
integer, row to start from, defaults to 1. |
tidy |
logical, return a tidier result. See details. |
key |
API key: character if set explicitly; not needed if key is set globally. See |
This function returns paginated results of the most recent update dates for data series.
n
and start
help with stepping through chunks.
If you need to know the most recent update stamps for a large set of series, you should use this function,
which makes an API call specifically to the EIA updates
endpoint for specific EIA categories by category ID.
If you are only interested in update times for a specific set of series IDs,
you can use eia_series_updates
.
Note that while this function accepts a vector of IDs for id
, it must make one API call per ID.
By default, additional processing is done to return a tibble data frame.
Set tidy = FALSE
to return only the initial list result of jsonlite::fromJSON
.
Set tidy = NA
to return the original JSON as a character string.
a tibble data frame (or a list, or character, depending on tidy
value)
1 2 3 4 5 | ## Not run:
# use eia_set_key() to store stored API key
eia_updates(742, n = 5)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.