SetColumns - Maple Help

DataSets[Quandl][Reference]

 SetColumns
 set included columns of a reference
 SetFromDate
 set start date of a reference
 SetToDate
 set end date of a reference
 SetFrequency
 set data frequency of a reference

 Calling Sequence SetColumns(ref, columns) SetFromDate(ref, date) SetToDate(ref, date) SetFrequency(ref, freq)

Parameters

 ref - Quandl reference object columns - positive integer or list of positive integers, all of which is less than or equal to the number of columns date - string; has form YYYY-MM-DD freq - string; must of one of "daily", "weekly", "monthly", "quarterly", "annual"

SetColumns

 • Select a subset of the original columns to be included when data is retrieved.
 • The order of the columns may be changed but duplicate columns are not allowed.

SetFromDate, SetToDate

 • Set the date range of the data to be retrieved. The date string must be such that it is accepted by StringTools[ParseTime] with the format "%Y-%m-%d". For example "2015-02-18".
 • Cannot exceed the original date range.

SetFrequency

 • Set the data frequency of the data to be retrieved. Cannot be more frequent than the original frequency.

Examples

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

We create a reference by using the Quandl identifier code.

 > $\mathrm{ref}≔\mathrm{Quandl}:-\mathrm{Reference}\left("BITCOINWATCH/MINING"\right)$
 ${\mathrm{ref}}{≔}\left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{Bitcoin Mining Statistics}}\\ {\mathrm{Quandl BITCOINWATCH/MINING}}\\ {\mathrm{up to 2752 rows \left(daily\right), 13 columns}}\\ {\mathrm{2013-08-26 - 2021-03-08}}\end{array}\right]$ (1)

The reference object has 13 columns of data. The SetColumns command selects a list of columns from the data set, in this case, returning the second and third columns.

 > $\mathrm{SetColumns}\left(\mathrm{ref},\left[2,3\right]\right)$
 $\left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{Bitcoin Mining Statistics}}\\ {\mathrm{Quandl BITCOINWATCH/MINING}}\\ {\mathrm{up to 2752 rows \left(daily\right), 2 columns}}\\ {\mathrm{2013-08-26 - 2021-03-08}}\end{array}\right]$ (2)

The following data set contains some data on olive oil manufacturing in Spain. In this example, we select a subsample from the data reference and then plot it.

 > $\mathrm{SpainOliveOil}≔\mathrm{Quandl}:-\mathrm{Reference}\left("UINC/VOLO_ESP"\right)$
 ${\mathrm{SpainOliveOil}}{≔}\left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{Production of Virgin Olive Oil - Spain}}\\ {\mathrm{Quandl UINC/VOLO_ESP}}\\ {\mathrm{up to 22 rows \left(annual\right), 2 columns}}\\ {\mathrm{1995-12-31 - 2016-12-31}}\end{array}\right]$ (3)

The SetFromDate command sets the start date for a sample of the data set.

 > $\mathrm{SpainOliveOil}≔\mathrm{SetFromDate}\left(\mathrm{SpainOliveOil},"2000-12-31"\right)$
 ${\mathrm{SpainOliveOil}}{≔}\left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{Production of Virgin Olive Oil - Spain}}\\ {\mathrm{Quandl UINC/VOLO_ESP}}\\ {\mathrm{up to 17 rows \left(annual\right), 2 columns}}\\ {\mathrm{2000-12-31 - 2016-12-31}}\end{array}\right]$ (4)

The SetToDate command sets the end date for a sample of the data set.

 > $\mathrm{SpainOliveOil}≔\mathrm{SetToDate}\left(\mathrm{SpainOliveOil},"2011-12-31"\right)$
 ${\mathrm{SpainOliveOil}}{≔}\left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{Production of Virgin Olive Oil - Spain}}\\ {\mathrm{Quandl UINC/VOLO_ESP}}\\ {\mathrm{up to 12 rows \left(annual\right), 2 columns}}\\ {\mathrm{2000-12-31 - 2011-12-31}}\end{array}\right]$ (5)

The SetColumns command restricts the data to just the amount in thousands of metric tons.

 > $\mathrm{SpainOliveOil}≔\mathrm{SetColumns}\left(\mathrm{SpainOliveOil},\left[2\right]\right)$
 ${\mathrm{SpainOliveOil}}{≔}\left[\begin{array}{c}{\mathrm{Data set}}\\ {\mathrm{Production of Virgin Olive Oil - Spain}}\\ {\mathrm{Quandl UINC/VOLO_ESP}}\\ {\mathrm{up to 12 rows \left(annual\right), 1 column}}\\ {\mathrm{2000-12-31 - 2011-12-31}}\end{array}\right]$ (6)

The TimeSeriesPlot command can generate a plot:

 > $\mathrm{TimeSeriesAnalysis}:-\mathrm{TimeSeriesPlot}\left(\mathrm{SpainOliveOil}\right)$

 > 

Compatibility

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