DataSets[Quandl][Reference] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Statistics and Data Analysis : DataSets Package : Quandl : DataSets/Quandl/Reference/convert

DataSets[Quandl][Reference]

  

convert

  

convert a reference to another data type

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

convert(ref, conversion, extra)

Parameters

ref

-

Quandl reference object

conversion

-

name; what to convert the data set to

extra

-

(optional) extra arguments for the conversion

Description

• 

The convert command can convert to a TimeSeries, DataFrame, an Array, a Matrix, or a listlist (a list of lists). If the data has only a single column, then it can also convert to a Vector (or a Vector[row] (a row vector)), or a list (a single, flat list).

• 

The conversion to TimeSeries accepts any number of extra arguments which are passed to the TimeSeries constructor call. You can use this to, for example, override the column names, by passing an argument of the form headers = my_headers, or to set the period if you expect a particular periodicity by passing an argument of the form period = n.

• 

The conversions to Array, Matrix, and Vector accept any number of extra arguments which are passed to the appropriate data structure constructor. You can use this to, for example, set the datatype of the new data structure by passing a datatype = d option.

Examples

withDataSets:

We create a reference by identifier.

refQuandl:-ReferenceFRED/CANPOPL

refData setPopulation in Canada (DISCONTINUED)Quandl FRED/CANPOPLup to 52 rows (annual), 1 column1960-01-01 - 2011-01-01

(1)

The data in this data set as a Matrix:

convertref,Matrix

(2)

We convert the data set to a TimeSeries and set the period to 3.

convertref,TimeSeries,period=3

Time seriesVALUE52 rows of data:1960-12-31 - 2011-12-31

(3)

ref2DataSets:-Referencequandl,PORDATA/01

ref2Data setPortugal Population, Population Census, Resident population by sexQuandl PORDATA/01up to 52 rows (annual), 3 columns1960-12-31 - 2011-12-31

(4)

The data in this second data reference as a DataFrame:

convertref2,DataFrame

TotalMalesFemales1960-12-318.88939201064.25441601064.63497601061970-12-318.66325201064.10936001064.55389201061981-12-319.83301401064.73771501065.09529901061991-12-319.86714701064.75677501065.11037201062001-12-311.035611701075.00014101065.35597601062011-12-311.056217801075.04660001065.5155780106

(5)

Compatibility

• 

The DataSets[Quandl][Reference][convert] command was introduced in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.

See Also

DataSets