SearchByConcept {MacrobondAPI}R Documentation

Search for series using a "concept"

Description

This method is a shortcut for searching for series mathching a concept (RegionKey) and a set of regions.

Usage

SearchByConcept(regions, concept, failIfMissing=TRUE)

Arguments

region

A list of region codes based on the ISO 3166 standard. There is a list of supported codes here: List of region codes.

concept

The name of the concept.

failIfMissing

A boolean that tells if the function should fail if matching series are not found for all specified regions.

Value

A list of series names where the list item names are the region codes. The list will be in the same order as the input.

Note

This method is only available if you run Macrobond app 1.23 or later and have a Data Scientist license.

Calling this method is equivalent of doing:

q <- CreateSearchQuery() setEntityTypeFilter(q, "TimeSeries") addAttributeValueFilter(q, "RegionKey", concept) addAttributeValueFilter(q, "Region", regions) r <- getEntities(Search(q))

One way to find what concepts that exists is to look at a sample series and call getConcepts.

See Also

getConcepts GetConceptDescription Search SearchQuery SearchResult

Examples

# Search for time series defined for the concept "gdp_total" for four countries and then download those series.
gdp_names <- SearchByConcept(c("us", "gb", "jp", "cn"), "gdp_total")
series <- FetchUnifiedTimeSeriesDefault(gdp_names)

[Package MacrobondAPI version 1.1-5 Index]