getEIA | R Documentation |
A function to download data from the EIA's API. Resulting time series are of class xts.
getEIA(ID, key)
ID |
The EIA API Series ID for the data. |
key |
Your EIA API key. |
xts object (time series)
Matthew Brigida
## The function is currently defined as function (ID, key) { switch(.last_char(ID), A = .getAnnEIA(ID, key = key), Q = .getQEIA(ID, key = key), M = .getMonEIA(ID, key = key), W = .getWDEIA(ID, key = key), D = .getWDEIA(ID, key = key), print("ERROR: The last character of your ID is not one of the possible sampling frequencies (A, Q, M, W, or D)")) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.