fetch_all: Request factor time-series hosted on remote servers in bulk...

Description Usage Arguments Details Value

View source: R/fetch_all.R

Description

The function fetch_all returns the requested group of time-series represented by the meta handle string argument, which represents a group of atomic handles. Each atomic handle must be matched against an internal catalog. The catalog includes valid handles, their associated source url, and other fields required to send a valid query.

Usage

1
2
3
4
5
6
fetch_all(
  meta_hdl = c("ALL", "FF", "FRED"),
  dest_directory = "",
  quiet = F,
  show_mapping_only = F
)

Arguments

meta_hdl

A string meta handle, representing the requested group of time-series. The function will stop and generate an error message if an invalid meta handle parameter is passed, or alternatively if the argument maps to one or multiple invalid atomic handles. See details.

dest_directory

A string representing an existing directory, where all streams (archive files (e.g. .zip), audit files (.pdf), and uncompressed files (.txt, .csv)) will be stored. The function will stop and generate an error message if the directory does not exist. Note that three sub-directories will be created (if they do not exist): Archives, Audit and Uncompressed. Parameter ignored if show_mapping_only = T. See details.

quiet

Logical (default is FALSE). Sends a tracing message to console while processing each atomic handle in the group represented by the meta handle parameter

show_mapping_only

Logical (default is FALSE). When set to TRUE, the function will return only the atomic handles associated with a meta handle parameter.

Details

The meta handle string argument maps to a group of valid atomic handles representing the requested time-series. Each atomic handle is parsed, validated and processed by the function fetch - see its documentation for more details. In particluar, atomic handles are matched and validated against the internal catalog, which encodes and maintains the parameters required to perform each query (request) associated with a particular data set hosted on remote server.

The function currently supports three meta_hdl parameter values:

Note that the group mapping corresponding to each meta_hdl parameter value is performed inside the function call via a switch procedure. Call catalog_do(operation = "show") to see the list of atomic handles and their respective source.

Value

A list of tibble objects containing time stamps (e.g. date, year-month) and the requested time-series. Each tibble corresponds to an atomic handle and has three attributes: string handle (i.e. catalog handle), series frequency and series units.


fognyc/factorr documentation built on Nov. 16, 2020, 8:48 p.m.