Package 'Quandl'

Title: API Wrapper for Quandl.com
Description: Functions for interacting directly with the Quandl API to offer data in a number of formats usable in R, downloading a zip with all data from a Quandl database, and the ability to search. This R package uses the Quandl API. For more information go to <https://docs.quandl.com>. For more help on the package itself go to <https://www.quandl.com/tools/r>.
Authors: Dave Dotson [cre], Raymond McTaggart [aut], Gergely Daroczi [aut], Clement Leung [aut], Quandl Inc. [cph]
Maintainer: Dave Dotson <[email protected]>
License: MIT + file LICENSE
Version: 2.11.0
Built: 2024-11-13 05:14:30 UTC
Source: https://github.com/quandl/quandl-r

Help Index


Retrieve metadata from a Quandl series or search results

Description

Retrieve metadata from a Quandl series or search results

Usage

metaData(x)

Arguments

x

A Quandl time series object or search results with attached meta data.

Value

Returns a list of meta data about the series or search results.

See Also

Quandl, Quandl.search

Examples

## Not run: 
metaData(ts)

## End(Not run)

Retrieves Data from the Quandl Dataset endpoint and formats

Description

Retrieves Data from the Quandl Dataset endpoint and formats

Usage

Quandl(
  code,
  type = c("raw", "ts", "zoo", "xts", "timeSeries"),
  transform = c("", "diff", "rdiff", "normalize", "cumul", "rdiff_from"),
  collapse = c("", "daily", "weekly", "monthly", "quarterly", "annual"),
  order = c("desc", "asc"),
  meta = FALSE,
  force_irregular = FALSE,
  ...
)

Arguments

code

Dataset code on Quandl specified as a string or an array of strings.

type

Type of data returned specified as string. Can be 'raw', 'ts', 'zoo', 'xts' or 'timeSeries'.

transform

Apply Quandl API data transformations.

collapse

Collapse frequency of Data.

order

Select if data is given to R in ascending or descending formats. Helpful for the rows parameter.

meta

Adds meta data as an attribute to the returned Data.

force_irregular

When set to TRUE, forces the index of the Data to be of date format yyyy-mm-dd

...

Additional named values that are interpreted as Quandl API parameters. Please see https://docs.quandl.com/docs/in-depth-usage#get-time-series-metadata for a full list of parameters.

Details

Set your api_key with Quandl.api_key function. For instructions on finding your api key go to https://www.quandl.com/account/profile.

Value

Depending on the type the class is either data.frame, time series, xts, zoo or timeSeries.

References

This R package uses the Quandl API. For more information go to https://docs.quandl.com. For more help on the package itself go to https://www.quandl.com/tools/r.

See Also

Quandl.api_key

Examples

## Not run: 
quandldata = Quandl("NSE/OIL", collapse="monthly", start_date="2013-01-01", type="ts")
plot(quandldata[,1])

## End(Not run)

Executes Quandl API calls

Description

Executes Quandl API calls

Usage

quandl.api(
  path,
  http = c("GET", "PUT", "POST", "DELETE"),
  postdata = NULL,
  ...
)

Arguments

path

Path to api resource.

http

Type of http request sent.

postdata

A character or raw vector that is sent in a body.

...

Named values that are interpretted as Quandl API parameters. Please see https://docs.quandl.com.

Details

Set your api_key with Quandl.api_key function. For instructions on finding your api key go to https://www.quandl.com/account/profile

Value

Quandl API response.

See Also

Quandl.api_key

Examples

## Not run: 
quandldata = quandl.api(path="datasets/NSE/OIL", http="GET")
plot(quandldata[,1])

## End(Not run)

Query or set Quandl API key

Description

Query or set Quandl API key

Usage

Quandl.api_key(api_key)

Arguments

api_key

Optionally passed parameter to set Quandl api_key.

Value

Returns invisibly the currently set api_key.

Examples

## Not run: 
Quandl.api_key('foobar')

## End(Not run)

Query or set Quandl API token

Description

Deprecated. Alias of Quandl.api_key

Usage

Quandl.auth(auth_token)

Arguments

auth_token

Optionally passed parameter to set Quandl auth_token.

Value

Returns invisibly the currently set auth_token.

See Also

Quandl

Examples

## Not run: 
Quandl.auth('foobar')

## End(Not run)

Query or set Base URL for White-labeled sites

Description

Query or set Base URL for White-labeled sites

Usage

Quandl.base_url(base_url)

Arguments

base_url

Optionally passed parameter to set Quandl base_url.

Value

Returns invisibly the currently set base_url.

Examples

## Not run: 
Quandl.base_url('http://localhost')

## End(Not run)

Downloads a zip with all data from a Quandl database

Description

Downloads a zip with all data from a Quandl database

Usage

Quandl.database.bulk_download_to_file(database_code, filename, ...)

Arguments

database_code

Database code on Quandl specified as a string.

filename

Filename (including path) of file to download.

...

Additional named values that are interpreted as Quandl API parameters. Please see https://docs.quandl.com/docs/parameters-2 for a full list of parameters.

Details

Set your api_key with Quandl.api_key function. For instructions on finding your api key go to https://www.quandl.com/account/profile

Value

The filename of the downloaded file.

See Also

Quandl.api_key

Examples

## Not run: 
Quandl.database.bulk_download_to_file("NSE", "./NSE.zip")

## End(Not run)

Returns the bulk download url

Description

Returns the bulk download url

Usage

Quandl.database.bulk_download_url(database_code, ...)

Arguments

database_code

Database code on Quandl specified as a string.

...

Additional named values that are interpreted as Quandl API parameters. Please see https://docs.quandl.com/docs/parameters-2 for a full list of parameters.

Details

Set your api_key with Quandl.api_key function. For instructions on finding your api key go to https://www.quandl.com/account/profile

Value

Returns the download url.

See Also

Quandl.api_key

Examples

## Not run: 
url = Quandl.database.download_url("NSE", download_type="partial")

## End(Not run)

Retrieves Data from the Quandl Dataset endpoint

Description

Retrieves Data from the Quandl Dataset endpoint

Usage

Quandl.dataset.get(code, params)

Arguments

code

Dataset code on Quandl specified as a string.

params

A list of parameters to be passed to the Quandl API. Please see https://docs.quandl.com/docs/in-depth-usage#get-time-series-metadata for a full list of parameters.

Details

Set your api_key with Quandl.api_key function. For instructions on finding your api key go to https://www.quandl.com/account/profile

Value

Returns a data.frame of the requested data

See Also

Quandl.api_key, Quandl

Examples

## Not run: 
quandldata = Quandl.dataset.get("NSE/OIL", list(rows=5))
plot(quandldata[,1])

## End(Not run)

Retrieves Data from the Quandl Datatable endpoint

Description

Retrieves Data from the Quandl Datatable endpoint

Usage

Quandl.datatable(datatable_code, paginate = FALSE, ...)

Arguments

datatable_code

Datatable code on Quandl specified as a string.

paginate

When set to TRUE, fetches up to 1,000,000 rows of data

...

Additional named values that are interpreted as Quandl API parameters.

Details

Set your api_key with Quandl.api_key function. For instructions on finding your api key go to https://www.quandl.com/account/profile

Value

Returns a data.frame.

See Also

Quandl.api_key

Examples

## Not run: 
Quandl.datatable('ZACKS/FC', paginate=TRUE)

## End(Not run)

Downloads a zip with all data requested from a Quandl database

Description

Downloads a zip with all data requested from a Quandl database

Usage

Quandl.datatable.bulk_download_to_file(datatable_code, filename, ...)

Arguments

datatable_code

Datatable code on Quandl specified as a string.

filename

Filename (including path) of file to download.

...

Additional named values that are interpreted as Quandl API parameters.

Details

Set your api_key with Quandl.api_key function. For instructions on finding your api key go to https://www.quandl.com/account/profile

Value

Returns a data.frame.

See Also

Quandl.api_key

Examples

## Not run: 
Quandl.datatable.bulk_download_to_file('ZACKS/EE')

## End(Not run)

Generates and returns a bulk download url

Description

Generates and returns a bulk download url

Usage

Quandl.datatable.bulk_download_url(datatable_code, ...)

Arguments

datatable_code

Datatable code on Quandl specified as a string.

...

Additional named values that are interpreted as Quandl API parameters. Please see https://docs.quandl.com/docs/parameters-1 for a full list of parameters.

Details

Set your api_key with Quandl.api_key function. For instructions on finding your api key go to https://www.quandl.com/account/profile

Value

Returns the download url.

See Also

Quandl.api_key

Examples

## Not run: 
url = Quandl.datatable.bulk_download_url("ZACKS/EE", ticker="AAPL")

## End(Not run)

Retrieves Point In Time Data from the Quandl PIT endpoint. As of date is used to see the table as it was at a specific point in time in the past.

Description

Retrieves Point In Time Data from the Quandl PIT endpoint. As of date is used to see the table as it was at a specific point in time in the past.

Usage

Quandl.pit.asofdate(datatable_code, start_date, paginate = FALSE, ...)

Arguments

datatable_code

Datatable code on Quandl specified as a string.

start_date

Lower date as a string.

paginate

When set to TRUE, fetches up to 1,000,000 rows of data

...

Additional named values that are interpreted as Quandl API parameters.

Details

Set your api_key with Quandl.api_key function. For instructions on finding your api key go to https://www.quandl.com/account/profile

Value

Returns a data.frame.

See Also

Quandl.api_key

Examples

## Not run: 
Quandl.pit.asofdate('RSM/MSB', '2020-06-11', paginate=TRUE)

## End(Not run)

Retrieves Point In Time Data from the Quandl PIT endpoint. Between start and end will show all rows that were visible at any point between two specified points in time. It works inclusively, a row visible exactly at start or exactly at end will be shown too.

Description

Retrieves Point In Time Data from the Quandl PIT endpoint. Between start and end will show all rows that were visible at any point between two specified points in time. It works inclusively, a row visible exactly at start or exactly at end will be shown too.

Usage

Quandl.pit.between(datatable_code, start_date, end_date, paginate = FALSE, ...)

Arguments

datatable_code

Datatable code on Quandl specified as a string.

start_date

Lower date as a string.

end_date

Upper date as a string.

paginate

When set to TRUE, fetches up to 1,000,000 rows of data

...

Additional named values that are interpreted as Quandl API parameters.

Details

Set your api_key with Quandl.api_key function. For instructions on finding your api key go to https://www.quandl.com/account/profile

Value

Returns a data.frame.

See Also

Quandl.api_key

Examples

## Not run: 
Quandl.pit.between('RSM/MSB', '2020-06-11', '2020-06-12', paginate=TRUE)

## End(Not run)

Retrieves Point In Time Data from the Quandl PIT endpoint. From start to end will also show all rows that were visible at any point between two specified points in time, including start, but excluding end.

Description

Retrieves Point In Time Data from the Quandl PIT endpoint. From start to end will also show all rows that were visible at any point between two specified points in time, including start, but excluding end.

Usage

Quandl.pit.fromto(datatable_code, start_date, end_date, paginate = FALSE, ...)

Arguments

datatable_code

Datatable code on Quandl specified as a string.

start_date

Lower date as a string.

end_date

Upper date as a string.

paginate

When set to TRUE, fetches up to 1,000,000 rows of data

...

Additional named values that are interpreted as Quandl API parameters.

Details

Set your api_key with Quandl.api_key function. For instructions on finding your api key go to https://www.quandl.com/account/profile

Value

Returns a data.frame.

See Also

Quandl.api_key

Examples

## Not run: 
Quandl.pit.fromto('RSM/MSB', '2020-06-11', '2020-06-12', paginate=TRUE)

## End(Not run)

Search the Quandl database

Description

Search the Quandl database

Usage

Quandl.search(query, silent = FALSE, per_page = 10, ...)

Arguments

query

Search terms

silent

Prints the results when FALSE.

per_page

Number of results returned per page.

...

Additional named values that are interpretted as Quandl API parameters.

Details

Set your api_key with Quandl.api_key function. For instructions on finding your api key go to https://www.quandl.com/account/profile

For instructions on finding your authentication token go to https://www.quandl.com/account/profile

Value

Search results returned as a data.frame.

See Also

Quandl.api_key

Examples

## Not run: 
search.results <- Quandl.search("oil")

## End(Not run)