rdatamarket (version 0.6.5)

dmseries: Fetch timeseries from a DataMarket dataset.

Description

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

Usage

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

Run this code
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"))

Run the code above in your browser using DataLab