knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
An R package for searching and downloading datasets from the United States' Energy Information Administration (EIA) API.
You can install the released version of eiastats from CRAN with:
install.packages("eiastats")
or the latest development version from github with:
remotes::install_github("mitcda/eiastats")
To learn more about the eiastats package, start with the vignettes:
browseVignettes(package = "eaistats")
This package provides functions to search and download data from the United States' Energy Information Administration's (EIA) API (see http://www.eia.gov/beta/api/). There are currently over a million unique time series available through the API. To use the package you'll need a free API key from here: http://www.eia.gov/beta/api/register.cfm.
This package extends on the functions in the https://cran.r-project.org/web/packages/EIAdata/index.html package.^[The functionality in this package broadly mirrors the functionality available in the https://cran.r-project.org/web/packages/wbstats/index.html package and the author's https://cran.r-project.org/web/packages/raustats/index.html package.] Details of the EIA API are available at: https://www.eia.gov/opendata/commands.php.
The package has four EIA catalogue-search/information type functions:
* eia_search
* eia_bulk_browse
* eia_bulk_search
* eia_category_query
and four EIA data query functions, that return selected EIA datasets:
* eia_series_query
* eia_relation_query
* eia_geoset_query
, and
* eia_bulk_stats
.
cpi_all <- abs_cat_stats("6401.0")
cpi <- abs_cat_stats("6401.0", tables="Table.+1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.