fetch_commodity: Fetches commodity dataseries from DataHub

Description Usage Arguments Value Examples

View source: R/commodity.R

Description

Fetches commodity dataseries from DataHub

Usage

1
fetch_commodity(code, source_code, query = list())

Arguments

code

the code of the commodity

source_code

the source code of the commodity

query

optional, availible list(from = yyyy-mm-dd, to = yyyy-mm-dd, bridge = 'linear' or 'last')

Value

dataframe

code

commodity code

source_code

source code

date

series date

value

value of the series

unit

unit of the value

Examples

1
2
fetch_commodity('BRENT', 'EIA')
fetch_commodity('WTI', 'EIA', query = list(from = '2019-01-01', bridge = 'last'))

palmargisla/datahub-r documentation built on Sept. 18, 2019, 9:50 p.m.