eia_search: EIA API search data query

Description Usage Arguments Details Value Author(s) Examples

Description

Function to search the EIA data catalogue

Usage

1
2
eia_search(..., page_num = NULL, rows_per_page = NULL,
  simplify = TRUE)

Arguments

...

any valid EIA API search argument. Valid search arguments are: series_id, name and last_updated. The function will return results for every search string and/or every search argument where multiple strings or multiple search arguments supplied—see Examples for relevant examples.

page_num

default page number (default: NULL).

rows_per_page

number of rows per page (default: NULL).

Details

EIA search function

Search terms provided to arguments series_id and name must be character objects and last_updated searches must be date type objects (i.e. either Date, chron or POSIXt) specifying a date range to check. Note that if only one date value is provided, the query will search for all series updated on that date.

Value

Returns the Series IDs and details as an R data frame.

Author(s)

David Mitchell <david.pk.mitchell@gmail.com>

Examples

1
2
3
4
5
6
7
8
  ## Series ID search
  eia_search(series_id = "PET.MB")

  ## Keyword search
  eia_search(name = "crude oil");

  ## Date search
  eia_search(last_updated = as.Date(c("2015-01-01", "2015-01-02")))

mitcda/eiastats documentation built on May 8, 2019, 12:48 p.m.