dmseries: Fetch timeseries from a DataMarket dataset.

Description Usage Arguments Value Examples

View source: R/rdatamarket.r

Description

This performs a series API request at DataMarket.com, fetching the requested data and wrapping it in a zoo object.

Usage

1
dmseries(ds, .params = list(), ...)

Arguments

ds

a dataset ID, DS string, URL query-string, or whole URL. The DS string to send is extracted from the URL as needed, and short URLs at data.is, bit.ly, is.gd, t.co and url.is are expanded.

.params

extra GET parameters to pass along in the API request.

...

named parameters whose names are dimension titles or IDs, and whose values are titles or IDs of values of those dimensions. E.g. if dataset 17tm has a dimension named Country, then dmseries("17tm", Country="Algeria") filters on that dimension. If the dimension name includes spaces, it needs to be quoted: dmlist("12rb", "Country or Area"="Afghanistan")

Value

a zoo object representing the fetched timeseries.

Examples

1
2
3
4
5
6
7
8
9
dmseries("17tm")
dmseries("17tm!kqc=a")
dmseries("ds=17tm")
dmseries("ds=17tm!kqc=a")
dmseries("foo=bar&ds=17tm&baz=xyzzy")
dmseries("http://datamarket.com/api/v1/series.json?foo=bar&ds=17tm&baz=xyzzy")
dmseries("http://datamarket.com/data/set/17tm/#ds=17tm")
dmseries("17tm", Country="Algeria")
dmseries("17tm", Country=c("Algeria", "Angola"))

rdatamarket documentation built on May 29, 2017, 11 p.m.