DataSets[Quandl][Reference]
convert
convert a reference to another data type
Calling Sequence
Parameters
Description
Examples
Compatibility
convert(ref, conversion, extra)
ref
-
Quandl reference object
conversion
name; what to convert the data set to
extra
(optional) extra arguments for the conversion
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.
with⁡DataSets:
We create a reference by identifier.
ref ≔ Quandl:-Reference⁡FRED/CANPOPL
ref≔Data setPopulation in Canada (DISCONTINUED)Quandl FRED/CANPOPLup to 52 rows (annual), 1 column1960-01-01 - 2011-01-01
The data in this data set as a Matrix:
convert⁡ref,'Matrix'
We convert the data set to a TimeSeries and set the period to 3.
convert⁡ref,'TimeSeries','period'=3
Time seriesVALUE52 rows of data:1960-12-31 - 2011-12-31
ref2 ≔ DataSets:-Reference⁡quandl,PORDATA/01
ref2≔Data setPortugal Population, Population Census, Resident population by sexQuandl PORDATA/01up to 52 rows (annual), 3 columns1960-12-31 - 2011-12-31
The data in this second data reference as a DataFrame:
convert⁡ref2,DataFrame
TotalMalesFemales1960-12-318.8893920×1064.2544160×1064.6349760×1061970-12-318.6632520×1064.1093600×1064.5538920×1061981-12-319.8330140×1064.7377150×1065.0952990×1061991-12-319.8671470×1064.7567750×1065.1103720×1062001-12-311.03561170×1075.0001410×1065.3559760×1062011-12-311.05621780×1075.0466000×1065.5155780×106
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
Download Help Document
What kind of issue would you like to report? (Optional)