Description Usage Arguments Details Author(s) Examples
This function requests and returns data from the EIA API.
1 2 | eia_category_query(category_id, api_key, format = "json",
simplify = TRUE)
|
category_id |
A unique numerical ID of the EIA data category to fetch. If NULL, the API's root category is returned. |
api_key |
Required. A valid API key is required and may be obtained from EIA registration page (see details). |
format |
API return format. Valid values are 'xml' or 'json'. Default is for API to return
JSON formatted output. Note that it is also necessary to set |
simplify |
Logical. If |
# Download category data from the EIA API
Users of the EIA API are required to obtain an API Key from the EIA Open Data registration page (https://www.eia.gov/opendata/register.php). A valid email address is required as part of the registration process.
Note that the number of series in a single request is limited to 100.
David Mitchell <david.pk.mitchell@gmail.com>
1 2 3 |
eia_cat <- eia_category_query(api_key = "Your API Key")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.