Giter Club home page Giter Club logo

r-package's Introduction

R-package

This is Quandl's R Package

License: MIT

For more information please contact [email protected]

Installation

Using the 'devtools' package:

install.packages("devtools")
library(devtools)
install_github('quandl/R-package')

CRAN

To install the most recent version 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.

Usage

Once you find the data you'd like to load into R on Quandl, copy the Quandl code from the description box and past it into the function.

data <- Quandl("NSE/OIL")

To extend your access to the Quandl API, use your authentication token. To do this sign into your account (or create one) and go to your account info page. Then copy your authentication token and type (with quotes):

Quandl.auth("authenticationtoken")

This will then extend your usage.

Example

Create a graph of the Nasdaq, with a monthly frequency

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

Search

Searching Quandl from within the R console is now supported. An authorization token is not required, but for extended use specify your token using Quandl.auth(). The search function is:

Quandl.search(query = "Search Term", page = n, source = "Specific source 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.
  • Source: 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 returns 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", source = "NSE")

prints:

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

Crude Oil (petroleum) Price
Code: IMF/POILAPSP_INDEX
Desc: Crude Oil (petroleum), Price index, 2005 = 100, simple average of three spot prices; Dated Brent, West Texas Intermediate, and the Dubai Fateh
Freq: monthly
Cols: Date|Price

China Crude Oil Consumption
Code: INDEXMUNDI/ENERGY_CHINA_CRUDEOIL
Desc: Energy production of Crude Oil in China. Units=Thousand Barrels per Day
Freq: annual
Cols: Year|Thousand Barrels per Day

Additional Resources

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

r-package's People

Contributors

raymondmct avatar daroczig avatar dmpe avatar jar1karp avatar chrisstevens avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.