Learn R Programming

RTL (version 1.2.0)

getGenscapePipeOil: Genscape API call for oil pipelines

Description

Returns oil pipeline flows in barrels per day data from Genscape API.You need your own credentials. Refer to API documentation for argument values. It is assumed if you use this function that you know the pipelines you need to extract to build supply demand balances. Use the online API to identify the pipeline IDs. https://developer.genscape.com/docs/services/oil-transportation/operations/GetPipelineFlowValuesV2/

Usage

getGenscapePipeOil(
  frequency = "daily",
  regions = "Canada",
  pipelineIDs = c(97),
  revision = "revised",
  limit = 5000,
  offset = 0,
  startDate = "2015-01-01",
  endDate = as.character(Sys.Date()),
  apikey = "yourapikey"
)

Value

wide data frame

Arguments

frequency

"daily" DEFAULT.

regions

See API webpage. Multiple values separated by commas e.g. "Canada", "GulfCoast").

pipelineIDs

See API webpage. c(98,54...) for specific pipes.

revision

See API webpage.

limit

See API webpage. Max 5000

offset

See API webpage.

startDate

"yyyy-mm-dd" as character string

endDate

"yyyy-mm-dd" as character string

apikey

Your API key as a character string.

Author

Philippe Cote

Examples

Run this code
if (FALSE) {
getGenscapePipeOil(
  frequency = "daily", regions = "Canada", pipelineIDs = c(97),
  revision = "revised", limit = 5000, offset = 0,
  startDate = "2015-01-01", endDate = as.character(Sys.Date()),
  apikey = "yourapikey"
)
}

Run the code above in your browser using DataLab