Can I change the frequency of the data that I download using the API?
Note that data on Quandl comes in two formats: time-series and tables. You can learn more about these formats here.
To change the sample frequency of a time-series, please use the collapse= parameter, like so:
The above call takes the XNAS/ACIW time-series which shows daily data, and converts it to monthly.
Collapse can be "daily","weekly", "monthly", "quarterly" or "annual".
Note that the conversion process is very simple:
Quandl simply takes the last observation in the day/month/week/quarter/year and uses that as the daily/monthly/weekly/quarterly/annual datum.
This simple conversion process does not work well for time-series that contain percentage changes, period averages/totals (e.g. trading volume) or period extremes (e.g. high/low or OHLC for security prices). For such time-series, we recommend downloading the raw data and carrying out the required frequency transformation using your own analytics tool.
Note also that you can only convert a time-series to a less granular frequency (e.g. daily to monthly) and never the other way around to a more granular frequency (e.g. annual to daily).
There is no collapse parameter for data in tables format. For tables, we recommend downloading the raw data and carrying out the required frequency transformation using your own analytics tool.