 convert - Maple Help

DataSets[Builtin][Reference]

 convert
 convert built-in reference to another data type Calling Sequence convert(ref, conversion, extra) Parameters

 ref - built-in data reference object conversion - name; convert to this type extra - (optional) extra arguments for the conversion Description

 • The convert command can convert to an Array, Matrix, listlist, Vector, or list.
 • 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 order of the new data structure by passing a order = o option.
 • Data sets are typically large enough that converting the whole data set will require a substantial amount of time to download all the metadata. Converting smaller subsets will take less time. Examples

 > $\mathrm{with}\left(\mathrm{DataSets}\right):$
 > $\mathrm{ref}≔\mathrm{Reference}\left("Builtin","Country"\right)$
 ${\mathrm{ref}}{≔}\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]$ (1)

The data in this data set as a Matrix:

 > $\mathrm{convert}\left({\mathrm{ref}}_{1..3,1..3},'\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]$ (2)

The data as a list of lists:

 > $\mathrm{convert}\left({\mathrm{ref}}_{1..3,1..3},'\mathrm{listlist}'\right)$
 $\left[\left[{"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]\right]{,}\left[{"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]\right]{,}\left[{"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]\right]\right]$ (3)
 > $\mathrm{refg}≔\mathrm{Reference}\left("Builtin","GeoNames"\right)$
 ${\mathrm{refg}}{≔}\left[\begin{array}{ccccc}{\mathrm{Geonames \left(GeoNamesid\right)}}& {\mathrm{Name}}& {\mathrm{Type}}& {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\dots }\right]\right)& {\mathrm{\left(7 more\right)}}\\ {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{68}}\right]\right)& {\mathrm{Boneh-ye Mehdi}}& {"section of populated place"}& {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\dots }\right]\right)& {}\\ {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{121}}\right]\right)& {\mathrm{Lab Sefid}}& {"locality"}& {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\dots }\right]\right)& {}\\ {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{166}}\right]\right)& {\mathrm{Gorizi}}& {"locality"}& {\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(1155858 more\right)}}& {}& {}& {}& {}\end{array}\right]$ (4)
 > $\mathrm{convert}\left({\mathrm{refg}}_{\left[\mathrm{Name}="Paris",1000000<\mathrm{Population}\right]},'\mathrm{Matrix}'\right)$
 $\left[\begin{array}{cccccccccc}{"2968815"}& {"Paris"}& {"second-order administrative division"}& {48.8534000000000006}& {2.34859999999999980}& {"France"}& {"Ile-de-France"}& {"Paris"}& {2257981}& {"Europe/Paris"}\\ {"2988506"}& {"Paris"}& {"third-order administrative division"}& {48.8533899999999974}& {2.34864000000000006}& {"France"}& {"Ile-de-France"}& {"Paris"}& {2257981}& {"Europe/Paris"}\\ {"2988507"}& {"Paris"}& {"capital of a political entity"}& {48.8534099999999967}& {2.34880000000000022}& {"France"}& {"Ile-de-France"}& {"Paris"}& {2138551}& {"Europe/Paris"}\end{array}\right]$ (5) Compatibility

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