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 |
Retrieve metadata from a Quandl series or search results
metaData(x)
metaData(x)
x |
A Quandl time series object or search results with attached meta data. |
Returns a list of meta data about the series or search results.
## Not run: metaData(ts) ## End(Not run)
## Not run: metaData(ts) ## End(Not run)
Retrieves Data from the Quandl Dataset endpoint and formats
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, ... )
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, ... )
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. |
Set your api_key
with Quandl.api_key
function. For instructions on finding your api key go to https://www.quandl.com/account/profile.
Depending on the type the class is either data.frame, time series, xts, zoo or timeSeries.
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.
## Not run: quandldata = Quandl("NSE/OIL", collapse="monthly", start_date="2013-01-01", type="ts") plot(quandldata[,1]) ## End(Not run)
## 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
quandl.api( path, http = c("GET", "PUT", "POST", "DELETE"), postdata = NULL, ... )
quandl.api( path, http = c("GET", "PUT", "POST", "DELETE"), postdata = NULL, ... )
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. |
Set your api_key
with Quandl.api_key
function. For instructions on finding your api key go to https://www.quandl.com/account/profile
Quandl API response.
## Not run: quandldata = quandl.api(path="datasets/NSE/OIL", http="GET") plot(quandldata[,1]) ## End(Not run)
## Not run: quandldata = quandl.api(path="datasets/NSE/OIL", http="GET") plot(quandldata[,1]) ## End(Not run)
Query or set Quandl API key
Quandl.api_key(api_key)
Quandl.api_key(api_key)
api_key |
Optionally passed parameter to set Quandl |
Returns invisibly the currently set api_key
.
## Not run: Quandl.api_key('foobar') ## End(Not run)
## Not run: Quandl.api_key('foobar') ## End(Not run)
Deprecated. Alias of Quandl.api_key
Quandl.auth(auth_token)
Quandl.auth(auth_token)
auth_token |
Optionally passed parameter to set Quandl |
Returns invisibly the currently set auth_token
.
## Not run: Quandl.auth('foobar') ## End(Not run)
## Not run: Quandl.auth('foobar') ## End(Not run)
Query or set Base URL for White-labeled sites
Quandl.base_url(base_url)
Quandl.base_url(base_url)
base_url |
Optionally passed parameter to set Quandl |
Returns invisibly the currently set base_url
.
## Not run: Quandl.base_url('http://localhost') ## End(Not run)
## Not run: Quandl.base_url('http://localhost') ## End(Not run)
Downloads a zip with all data from a Quandl database
Quandl.database.bulk_download_to_file(database_code, filename, ...)
Quandl.database.bulk_download_to_file(database_code, filename, ...)
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. |
Set your api_key
with Quandl.api_key
function. For instructions on finding your api key go to https://www.quandl.com/account/profile
The filename of the downloaded file.
## Not run: Quandl.database.bulk_download_to_file("NSE", "./NSE.zip") ## End(Not run)
## Not run: Quandl.database.bulk_download_to_file("NSE", "./NSE.zip") ## End(Not run)
Returns the bulk download url
Quandl.database.bulk_download_url(database_code, ...)
Quandl.database.bulk_download_url(database_code, ...)
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. |
Set your api_key
with Quandl.api_key
function. For instructions on finding your api key go to https://www.quandl.com/account/profile
Returns the download url.
## Not run: url = Quandl.database.download_url("NSE", download_type="partial") ## End(Not run)
## Not run: url = Quandl.database.download_url("NSE", download_type="partial") ## End(Not run)
Retrieves Data from the Quandl Dataset endpoint
Quandl.dataset.get(code, params)
Quandl.dataset.get(code, params)
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. |
Set your api_key
with Quandl.api_key
function. For instructions on finding your api key go to https://www.quandl.com/account/profile
Returns a data.frame of the requested data
## Not run: quandldata = Quandl.dataset.get("NSE/OIL", list(rows=5)) plot(quandldata[,1]) ## End(Not run)
## Not run: quandldata = Quandl.dataset.get("NSE/OIL", list(rows=5)) plot(quandldata[,1]) ## End(Not run)
Retrieves Data from the Quandl Datatable endpoint
Quandl.datatable(datatable_code, paginate = FALSE, ...)
Quandl.datatable(datatable_code, paginate = FALSE, ...)
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. |
Set your api_key
with Quandl.api_key
function. For instructions on finding your api key go to https://www.quandl.com/account/profile
Returns a data.frame.
## Not run: Quandl.datatable('ZACKS/FC', paginate=TRUE) ## End(Not run)
## Not run: Quandl.datatable('ZACKS/FC', paginate=TRUE) ## End(Not run)
Downloads a zip with all data requested from a Quandl database
Quandl.datatable.bulk_download_to_file(datatable_code, filename, ...)
Quandl.datatable.bulk_download_to_file(datatable_code, filename, ...)
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. |
Set your api_key
with Quandl.api_key
function. For instructions on finding your api key go to https://www.quandl.com/account/profile
Returns a data.frame.
## Not run: Quandl.datatable.bulk_download_to_file('ZACKS/EE') ## End(Not run)
## Not run: Quandl.datatable.bulk_download_to_file('ZACKS/EE') ## End(Not run)
Generates and returns a bulk download url
Quandl.datatable.bulk_download_url(datatable_code, ...)
Quandl.datatable.bulk_download_url(datatable_code, ...)
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. |
Set your api_key
with Quandl.api_key
function. For instructions on finding your api key go to https://www.quandl.com/account/profile
Returns the download url.
## Not run: url = Quandl.datatable.bulk_download_url("ZACKS/EE", ticker="AAPL") ## End(Not run)
## 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.
Quandl.pit.asofdate(datatable_code, start_date, paginate = FALSE, ...)
Quandl.pit.asofdate(datatable_code, start_date, paginate = FALSE, ...)
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. |
Set your api_key
with Quandl.api_key
function. For instructions on finding your api key go to https://www.quandl.com/account/profile
Returns a data.frame.
## Not run: Quandl.pit.asofdate('RSM/MSB', '2020-06-11', paginate=TRUE) ## End(Not run)
## 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.
Quandl.pit.between(datatable_code, start_date, end_date, paginate = FALSE, ...)
Quandl.pit.between(datatable_code, start_date, end_date, paginate = FALSE, ...)
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. |
Set your api_key
with Quandl.api_key
function. For instructions on finding your api key go to https://www.quandl.com/account/profile
Returns a data.frame.
## Not run: Quandl.pit.between('RSM/MSB', '2020-06-11', '2020-06-12', paginate=TRUE) ## End(Not run)
## 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.
Quandl.pit.fromto(datatable_code, start_date, end_date, paginate = FALSE, ...)
Quandl.pit.fromto(datatable_code, start_date, end_date, paginate = FALSE, ...)
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. |
Set your api_key
with Quandl.api_key
function. For instructions on finding your api key go to https://www.quandl.com/account/profile
Returns a data.frame.
## Not run: Quandl.pit.fromto('RSM/MSB', '2020-06-11', '2020-06-12', paginate=TRUE) ## End(Not run)
## Not run: Quandl.pit.fromto('RSM/MSB', '2020-06-11', '2020-06-12', paginate=TRUE) ## End(Not run)
Search the Quandl database
Quandl.search(query, silent = FALSE, per_page = 10, ...)
Quandl.search(query, silent = FALSE, per_page = 10, ...)
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. |
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
Search results returned as a data.frame.
## Not run: search.results <- Quandl.search("oil") ## End(Not run)
## Not run: search.results <- Quandl.search("oil") ## End(Not run)