Reference - Maple Help

DataSets

 Reference
 create a reference to a data set

 Calling Sequence Reference(source, id)

Parameters

 source - string; name of the source, which is one of "Quandl" or "Builtin" id - string; identifier of the data set

Description

 • The Reference command creates a reference to a data set and retrieves metadata about the data available for the data set. It returns a Reference object.
 • The corresponding data can then be retrieved by converting the object to a suitable data structure. The data structures supported differ from reference to reference, but Matrix is always supported.
 • For more information, see the Reference object help pages for data coming from particular data sources (for example, Quandl or Builtin).

Examples

 > $\mathrm{with}\left(\mathrm{DataSets}\right):$

Create a Quandl data set.

 > $\mathrm{qdata}≔\mathrm{Reference}\left("Quandl","FRED/CANPOPL"\right)$
 ${\mathrm{qdata}}{≔}\left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{Population in Canada \left(DISCONTINUED\right)}}\\ {\mathrm{Quandl FRED/CANPOPL}}\\ {\mathrm{up to 52 rows \left(annual\right), 1 column}}\\ {\mathrm{1960-01-01 - 2011-01-01}}\end{array}\right]$ (1)

Create a Builtin data set.

 > $\mathrm{bdata}≔\mathrm{Reference}\left("Builtin","Country"\right)$
 ${\mathrm{bdata}}{≔}\left[\begin{array}{ccccc}{\mathrm{Country \left(Name\right)}}& {\mathrm{CO2 Emissions}}& {\mathrm{CPI Change}}& {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\dots }\right]\right)& {\mathrm{\left(124 more\right)}}\\ {\mathrm{Afghanistan}}& {\mathrm{TimeSeries 9809.225}}& {\mathrm{TimeSeries 4.9759515055383}}& {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\dots }\right]\right)& {}\\ {\mathrm{Albania}}& {\mathrm{TimeSeries 5716.853}}& {\mathrm{TimeSeries 1.41109078954244}}& {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\dots }\right]\right)& {}\\ {\mathrm{Algeria}}& {\mathrm{TimeSeries 145400.217}}& {\mathrm{TimeSeries 1.95176821052894}}& {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\dots }\right]\right)& {}\\ {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{⋮}\right]\right)& {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{⋮}\right]\right)& {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{⋮}\right]\right)& {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\ddots }\right]\right)& {}\\ {\mathrm{\left(182 more\right)}}& {}& {}& {}& {}\end{array}\right]$ (2)

Convert to a Matrix.

 > $\mathrm{convert}\left(\mathrm{qdata},'\mathrm{Matrix}'\right)$
 $\begin{array}{c}\left[\begin{array}{cc}{"1960-12-31"}& {17.91}\\ {"1961-12-31"}& {18.27}\\ {"1962-12-31"}& {18.61}\\ {"1963-12-31"}& {18.96}\\ {"1964-12-31"}& {19.33}\\ {"1965-12-31"}& {19.68}\\ {"1966-12-31"}& {20.05}\\ {"1967-12-31"}& {20.41}\\ {"1968-12-31"}& {20.73}\\ {"1969-12-31"}& {21.03}\\ {⋮}& {⋮}\end{array}\right]\\ \hfill {\text{52 × 2 Matrix}}\end{array}$ (3)
 > $\mathrm{convert}\left(\mathrm{bdata}\left[1..3,1..3\right],'\mathrm{Matrix}'\right)$
 $\left[\begin{array}{cccc}{"Afghanistan"}& \left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{CO2 emissions \left(kt\right) - Afghanistan}}\\ {\mathrm{Quandl WWDI/AFG_EN_ATM_CO2E_KT}}\\ {\mathrm{up to 65 rows \left(annual\right), 1 column}}\\ {\mathrm{1950-12-31 - 2014-12-31}}\end{array}\right]& \left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{Inflation, consumer prices \left(annual %\right) - Afghanistan}}\\ {\mathrm{Quandl WWDI/AFG_FP_CPI_TOTL_ZG}}\\ {\mathrm{up to 13 rows \left(annual\right), 1 column}}\\ {\mathrm{2005-12-31 - 2017-12-31}}\end{array}\right]& \left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{Mortality rate, under-5 \left(per 1,000 live births\right) - Afghanistan}}\\ {\mathrm{Quandl WWDI/AFG_SH_DYN_MORT}}\\ {\mathrm{up to 59 rows \left(annual\right), 1 column}}\\ {\mathrm{1960-12-31 - 2018-12-31}}\end{array}\right]\\ {"Albania"}& \left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{CO2 emissions \left(kt\right) - Albania}}\\ {\mathrm{Quandl WWDI/ALB_EN_ATM_CO2E_KT}}\\ {\mathrm{up to 65 rows \left(annual\right), 1 column}}\\ {\mathrm{1950-12-31 - 2014-12-31}}\end{array}\right]& \left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{Inflation, consumer prices \left(annual %\right) - Albania}}\\ {\mathrm{Quandl WWDI/ALB_FP_CPI_TOTL_ZG}}\\ {\mathrm{up to 28 rows \left(annual\right), 1 column}}\\ {\mathrm{1992-12-31 - 2019-12-31}}\end{array}\right]& \left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{Mortality rate, under-5 \left(per 1,000 live births\right) - Albania}}\\ {\mathrm{Quandl WWDI/ALB_SH_DYN_MORT}}\\ {\mathrm{up to 41 rows \left(annual\right), 1 column}}\\ {\mathrm{1978-12-31 - 2018-12-31}}\end{array}\right]\\ {"Algeria"}& \left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{CO2 emissions \left(kt\right) - Algeria}}\\ {\mathrm{Quandl WWDI/DZA_EN_ATM_CO2E_KT}}\\ {\mathrm{up to 65 rows \left(annual\right), 1 column}}\\ {\mathrm{1950-12-31 - 2014-12-31}}\end{array}\right]& \left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{Inflation, consumer prices \left(annual %\right) - Algeria}}\\ {\mathrm{Quandl WWDI/DZA_FP_CPI_TOTL_ZG}}\\ {\mathrm{up to 50 rows \left(annual\right), 1 column}}\\ {\mathrm{1970-12-31 - 2019-12-31}}\end{array}\right]& \left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{Mortality rate, under-5 \left(per 1,000 live births\right) - Algeria}}\\ {\mathrm{Quandl WWDI/DZA_SH_DYN_MORT}}\\ {\mathrm{up to 65 rows \left(annual\right), 1 column}}\\ {\mathrm{1954-12-31 - 2018-12-31}}\end{array}\right]\end{array}\right]$ (4)

Compatibility

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