rdatamarket-package: Data access API for DataMarket.com

Description Quick start DS parameters Dimension filtering Examples

Description

Interacts with DataMarket.com, fetching data in timeseries (zoo) and long form (suitable for reshape), and metadata on datasets.

Quick start

Just find the data you want on http://datamarket.com/ and then paste the URL from your browser into dmlist or dmseries:

plot(dmseries("http://datamarket.com/data/set/zy0/#ds=zy0!8o7=2"))

plot(dmseries("http://data.is/nyFeP9"))

l <- dmlist("http://data.is/nyFeP9")

or into dminfo to get the dataset metadata:

ds <- dminfo("http://data.is/nyFeP9")

DS parameters

In functions that take a parameter named ds, that parameter can be:

Thus when viewing any dataset on datamarket.com, you can copy the URL from your browser bar and paste into a call to dmseries or dmlist to load the same data into R, or a call to dminfo to get a dataset object with which to make data queries.

Dimension filtering

The functions dmseries and dmlist can accept parameters named for the dimensions of the dataset, in order to filter the data: dmlist("17tm", Country="Algeria")

Examples

1
2
3
4
oil <- dminfo("17tm")
print(oil)
series <- dmseries(oil, Country="Yemen")
lis <- dmlist(oil, Country=c("Algeria", "Angola"))

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