TIME-SERIES
Make a time-series call
This call gets US GDP, which has a Time-series code of FRED/GDP
, from the FRED dataset: data <- Quandl("FRED/GDP")
Change formats
You can get the same data in a dataframe: data <- Quandl("FRED/GDP", type="raw")
In ts format: data <- Quandl("FRED/GDP", type="ts")
In xts format: data <- Quandl("FRED/GDP", type="xts")
In zoo format: data <- Quandl("FRED/GDP", type="zoo")
Make a filtered time-series call
To set start and end dates: data <- Quandl("FRED/GDP", start_date="2001-12-31", end_date="2005-12-31")
To request specific columns: data <- Quandl(c("FRED/GDP.1"))
This request will return the first column from Gross Domestic Product time-series (FRED/GDP) which is part of the FRED dataset.
Preprocess the data
To change the sampling frequency: data <- Quandl("FRED/GDP", collapse="annual")
To perform elementary calculations on the data: data <- Quandl("FRED/GDP", transform="rdiff")
Make a multiple time-series call
If you want to get multiple codes at once, delimit the codes with ,
and put them into an array. This will return a multiple datasets: merged_data <- Quandl(c('EXMPL/DATA1', 'EXMPL/DATA2'))
You can also specify specific columns to retrieve. For example, if you only want column 1 from EXMPL/DATA1
and column 2 from EXMPL/DATA2
: merged_data <- Quandl(c('EXMPL/DATA1.1', 'EXMPL/DATA2.2'))
Download an entire time-series dataset
An entire time-series dataset's data can be downloaded.
For example, to download the dataset ZEA: Quandl.database.bulk_download_to_file("ZEA", "./ZEA.zip")
This call will download an entire time-series dataset as a ZIP file.
Please note that bulk downloading an entire time-series product is a feature applicable to premium products and may only be used by users with an active subscription.
NOTE:
For a full list of optional query parameters for downloading a time-series dataset, click here.
Updated 6 months ago