eia_geoset_relation_query: Gets a set of the series belonging to a specified...

Description Usage Arguments Details Author(s)

Description

– TO BE COMPLETED –

Usage

1
2
3
eia_geoset_relation_query(geoset_id, relation_id, region_ids, api_key,
  start_date = NULL, end_date = NULL, num = NULL, format = "json",
  simplify = TRUE)

Arguments

geoset_id

A case-sensitive string consisting of letters, numbers, dashes ("-") and periods (".") that uniquely identifies an EIA geoset.

relation_id

A case-sensitive string consisting of letters, numbers, dashes ("-") and periods (".") that uniquely identifies an EIA geoset.

region_ids

A character string specifying a single region identifier (relation query) or character vector of one or more region identifiers (geoset query) to be included in the API request.

api_key

Required. A valid API key is required and may be obtained from EIA registration page (see details).

start_date

Optional start date filter—if supplied, returns data after the specified start date. Argument accepts valid numeric, character, date or datetime format object. If numeric it must be in %Y form (i.e. four digit year). If character string, it must be in year-month-date (%Y-%m-%d) format.

end_date

Optional end date filter—if supplied, returns data up to and including the specified end date. Argument accepts valid numeric, character, date or datetime format object. If numeric it must be in %Y form (i.e. four digit year). If character string, it must be in year-month-date (%Y-%m-%d) format.

num

Number of values to be returns, to be used in conjunction with the end_date parameter to return the n-values from an end point. The EIA API will only accept the num parameter in conjunction with the end_date parameter and not start_date. If num is supplied, the start_date argument will be ignored.

format

API return format. Valid values are 'xml' or 'json'. Default is for API to return JSON formatted output. Only applies if simplify = FALSE.

simplify

Logical. If TRUE, the function returns data in a data frame. If FALSE, function returns data in specified output format.

Details

# Download EIA geoset/relation series IDs

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.

Author(s)

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


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