All Projects → quandl → Quandl R

quandl / Quandl R

Licence: other
This is Quandl's R Package

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Quandl R

Httpie Oauth
OAuth plugin for HTTPie
Stars: ✭ 78 (-30.97%)
Mutual labels:  api-client
Algoliasearch Client Android
Algolia Search API Client for Android
Stars: ✭ 92 (-18.58%)
Mutual labels:  api-client
Python Scaleway
🐍 Python SDK to query Scaleway APIs.
Stars: ✭ 107 (-5.31%)
Mutual labels:  api-client
Parse Dashboard For Ios
A beautiful mobile client for managing your Parse apps while you are on the go! Now you can easily view and modify your data in the same way you would on the offical desktop client.
Stars: ✭ 81 (-28.32%)
Mutual labels:  api-client
Contextio Node
[DEPRECATED] - Official Node.js client library for the Context.IO Email API
Stars: ✭ 86 (-23.89%)
Mutual labels:  api-client
Adyen Php Api Library
Adyen API Library for PHP
Stars: ✭ 93 (-17.7%)
Mutual labels:  api-client
Kraken Node
Official Kraken.io module for Node.js
Stars: ✭ 76 (-32.74%)
Mutual labels:  api-client
Laqul
A complete starter kit that allows you create amazing apps that look native thanks to the Quasar Framework. Powered by an API developed in Laravel Framework using the easy GraphQL queries language. And ready to use the Google Firebase features.
Stars: ✭ 110 (-2.65%)
Mutual labels:  api-client
Rapidql
Query multiple APIs and DBs and join them in a single query
Stars: ✭ 91 (-19.47%)
Mutual labels:  api-client
Nodejs Youtube
Access public YouTube data feeds from your Node.js apps
Stars: ✭ 102 (-9.73%)
Mutual labels:  api-client
Cistern
Ruby API client framework
Stars: ✭ 81 (-28.32%)
Mutual labels:  api-client
Google Searchconsole
A wrapper for the Google Search Console API.
Stars: ✭ 83 (-26.55%)
Mutual labels:  api-client
Instagram api gem
A Ruby wrapper for the Instagram API
Stars: ✭ 100 (-11.5%)
Mutual labels:  api-client
Node Wolfram
Wolfram|Alpha API wrapper for node.js
Stars: ✭ 80 (-29.2%)
Mutual labels:  api-client
Yelp Ruby
A Ruby gem for communicating with the Yelp REST API
Stars: ✭ 107 (-5.31%)
Mutual labels:  api-client
Linodego
Go client for Linode REST v4 API
Stars: ✭ 76 (-32.74%)
Mutual labels:  api-client
Sypht Java Client
A Java client for the Sypht API
Stars: ✭ 93 (-17.7%)
Mutual labels:  api-client
Tekore
Spotify Web API client for Python 3
Stars: ✭ 111 (-1.77%)
Mutual labels:  api-client
Huawei Lte Api
API For huawei LAN/WAN LTE Modems
Stars: ✭ 108 (-4.42%)
Mutual labels:  api-client
Tracker api
Ruby Wrapper for Pivotal Tracker v5 API
Stars: ✭ 102 (-9.73%)
Mutual labels:  api-client

Quandl R Package Build Status

This is Quandl's R package. The Quandl R package uses the Quandl API. The official Quandl R package manual can be found here.

License provided by MIT.

For more information please contact [email protected]

Installation

To install the devtools package:

install.packages("devtools")
library(devtools)
install_github("quandl/quandl-r")

CRAN

To install the most recent package from CRAN type:

install.packages("Quandl")
library(Quandl)

Note that the version on CRAN might not reflect the most recent changes made to this package.

Authentication

To make full use of the package we recommend you set your api key. To do this create or sign into your account and go to your account api key page. Then input your API key (with quotes):

Quandl.api_key("tEsTkEy123456789")

Usage

The Quandl package functions use the Quandl API. Optional Quandl API query parameters can be passed into each function. For more information on supported query parameters, please see the Quandl API documentation page. Once you find the data you would like to load into R on Quandl, copy the Quandl code from the description box and paste it into the function.

data <- Quandl("NSE/OIL")

Graphing Data Example

To create a graph of Google's performance month-over-month:

plot(stl(Quandl("WIKI/GOOG",type="ts",collapse="monthly")[,11],s.window="per"))

Note: collapse is a Quandl API query parameter. Click here for a full list of query parameter options.

Return Types

The supported return types for the Quandl(code) function are:

To request a specific type, assign the type argument the return type:

data <- Quandl('NSE/OIL', type = "xts")

Date Formats

zoo, xts, and ts have their own time series date formats. For example:

data <- Quandl('NSE/OIL', collapse = "quarterly", type = "zoo", limit = 3)

data will have indexes 2015 Q1, 2015 Q2, and 2015 Q3:

         Open  High    Low   Last  Close Total Trade Quantity Turnover (Lacs)
2015 Q1 459.8 462.8 452.45 454.45 454.95               277225         1265.84
2015 Q2 448.0 451.7 445.10 447.80 446.80               352514         1576.93
2015 Q3 456.0 465.0 454.15 456.80 456.75               174154          797.79

If you want the time series index to be displayed as dates, you will need to set force_irregular = TRUE:

data <- Quandl('NSE/OIL', collapse = "quarterly", type = "zoo", limit = 3, force_irregular = TRUE)

data will now have indexes 2015-03-31, 2015-06-30, and 2015-09-30:

            Open  High    Low   Last  Close Total Trade Quantity Turnover (Lacs)
2015-03-31 459.8 462.8 452.45 454.45 454.95               277225         1265.84
2015-06-30 448.0 451.7 445.10 447.80 446.80               352514         1576.93
2015-09-30 456.0 465.0 454.15 456.80 456.75               174154          797.79

Merged Dataset Data

If you want to get multiple codes at once, delimit the codes with ',', and put them into an array. This will return a multiset.

merged_data <- Quandl(c('GOOG/NASDAQ_AAPL', 'GOOG/NASDAQ_MSFT'))

You can also specify specific columns to retrieve. For example, if you only want column 1 from GOOG/NASDAQ_AAPL and column 2 from GOOG/NASDAQ_MSFT:

merged_data <- Quandl(c('GOOG/NASDAQ_AAPL.1', 'GOOG/NASDAQ_MSFT.2'))

Downloading Entire Database

An entire database's data can be downloaded. For example, to download the database ZEA:

Quandl.database.bulk_download_to_file("ZEA", "./ZEA.zip")

Note you must set your api key to download premium databases to which you are subscribed.

For a full list of optional query parameters for downloading an entire database, click here.

Datatables

To retrieve Datatable data, provide a Datatable code to the Quandl datatables function:

data = Quandl.datatable('ZACKS/FC')

The output format is data.frame. Given the volume of data stored in datatables, this call will retrieve the first page of the ZACKS/FC datatable. You may turn on pagination to return more data by using:

data = Quandl.datatable('ZACKS/FC', paginate=TRUE)

This will retrieve multiple pages of data and merge them together as if they were one large page. In some cases, however, you will still exceed the request limit. In this case we recommend you filter your data using the available query parameters, as in the following example:

Quandl.datatable('ZACKS/FC', ticker=c('AAPL', 'MSFT'), per_end_date.gt='2015-01-01', qopts.columns=c('ticker', 'per_end_date', 'tot_revnu'))

In this query we are asking for more pages of data, ticker values of either AAPL or MSFT and a per_end_date that is greater than or equal to 2015-01-01. We are also filtering the returned columns on ticker, per_end_date and tot_revnu rather than all available columns.

Search

Searching Quandl from within the R console is now supported. The search function is:

Quandl.search(query = "Search Term", page = n, database_code = "Specific database to search", silent = TRUE|FALSE)
  • query: Required; Your search term, as a string
  • page: Optional; page number of search you wish returned, defaults to 1.
  • per_page: Optional; number of results per page, defaults to 10 in the Quandl R package.
  • database_code: Optional; Name of a specific source you wish to search, as a string
  • silent: Optional; specifies whether you wish the first three results printed to the console, defaults to True (see example below).

Which outputs to console a list containing the following information for every item returned by the search:

  • Name
  • Quandl code
  • Description
  • Frequency
  • Column names

Example

A search for Oil, searching only the National Stock Exchange of India (NSE).

Quandl.search("Oil", database_code = "NSE", per_page = 3)

prints:

Oil India Limited
Code: NSE/OIL
Desc: Historical prices for Oil India Limited<br><br>National Stock Exchange of India<br><br>Ticker: OIL<br><br>ISIN: INE274J01014
Freq: daily
Cols: Date | Open | High | Low | Last | Close | Total Trade Quantity | Turnover (Lacs)

Oil Country Tubular Limited
Code: NSE/OILCOUNTUB
Desc: Historical prices for Oil Country Tubular Limited<br><br>National Stock Exchange of India<br><br>Ticker: OILCOUNTUB<br><br>ISIN: INE591A01010
Freq: daily
Cols: Date | Open | High | Low | Last | Close | Total Trade Quantity | Turnover (Lacs)

Gulf Oil Corporation Limited
Code: NSE/GULFOILCOR
Desc: Historical prices for Gulf Oil Corporation Limited (GULFOILCOR), (ISIN: INE077F01027),  National Stock Exchange of India.
Freq: daily
Cols: Date | Open | High | Low | Last | Close | Total Trade Quantity | Turnover (Lacs)

Additional Resources

More help can be found at Quandl in our R and API pages.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].