The eia
package provides API access to data from the US Energy Information Administration (EIA).
Pulling data from the US Energy Information Administration (EIA) API requires a registered API key. A key can be obtained at no cost here. A valid email and agreement to the API Terms of Service is required to obtain a key.
eia
includes functions for searching the EIA API data directory and importing various datasets. Datasets returned by these functions are provided in a tidy format or alternatively in more raw form. It also offers helper functions for working with EIA API date strings and time formats and for inspecting different summaries of data metadata. The package also provides control over API key storage and caching of API request results.
Install the CRAN release of eia
with
or install the development version from GitHub with
ExampleAfter obtaining the API key, store it somewhere such as .Renviron
and never have to do anything with the key when using the package. Alternatively, set it manually with eia_set_key()
in the current R session. Further, it can always be passed explicitly to the key
argument of a given eia
function.
Get a list of the EIAâs data directory (and sub-directories) with eia_dir()
.
Get annual retail electric sales for the Ohio residential sector since 2010
and make a nice plot.
ReferencesSee the collection of vignette tutorials and examples as well as complete package documentation available at the eia
package website.
Please note that the eia
project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4