Return a time series with a specified name or a list of time series in a specified category.

get_cets(key, category = TRUE, maxpage = 10)

Arguments

key

The name of the time series or the name of the category, depending on value of category

category

If TRUE, the get_cets will return time series whose category match the keyword or belong to some subcategory under the matched category. If FALSE, the function will return time series with the name of key.

maxpage

The maximum number of pages to extract. Due to the number of time series that can be returned, a maximum of 10 time series are returned per page. The default is 10 pages (100 time series). This argument is only valid when category is set to TRUE.

Value

A list consisting of the selected series with class ts.

NOTE: Due to the large variation in the properties of time series stored in the CompEngine database, the tsp attribute (the start time in time units, the end time and the frequency) is not tailor made for each time series. If needed, user can customize the tsp attribute based on the output attribute of samplingInformation.

Some of the attributes are listed as follow:

name

The name of the time series

description

the description of the time series

samplingInformation

Indicating the frequency and other sampling related information

tags

The tags in the database

category

The name of the category and the hierarchy of the current category. See also category_scraping.

sfi

"special feature identification" information

source

The source of the time series

tsp

Tsp Attribute of Time-Series-like Objects. See tsp

See also

Examples

# Getting series within Finance category (including subcategory) cets_finance <- get_cets("finance") unique(mapply(attr, cets_finance, MoreArgs = list(which = "category.name")))
#> [1] "Finance"
# Getting series by its name W138_finance_m4 <- get_cets("M4_W138_Finance_1", category = FALSE)