eia_geoset_query: Gets a set of the series belonging to a specified geoset_id.

Description Arguments Details Author(s) Examples

Description

– TO BE COMPLETED –

Arguments

geoset_id

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

region_ids

A vector of region identifiers to be included in the geoset request.

api_key

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

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.

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.

simplify

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

format

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

Details

# Download EIA Geoset 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>

Examples

1
2
3
4
  
    eia_cat <- eia_geoset_query(geoset_id="ELEC.GEN.ALL-99.M", region_ids=c("USA"),
                                api_key = "Your API Key")
  

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