FRED tags are attributes assigned to series. Return the related FRED tags for a search: tags assigned to series that match all tags in the tag_names parameter (required), no tags in the exclude_tag_names (optional) and the search words set by the series_search_text parameter (required).

fredr_series_search_related_tags(
  series_search_text,
  tag_names,
  ...,
  exclude_tag_names = NULL,
  tag_group_id = NULL,
  tag_search_text = NULL,
  limit = NULL,
  offset = NULL,
  order_by = NULL,
  sort_order = NULL,
  realtime_start = NULL,
  realtime_end = NULL
)

Arguments

series_search_text

A string containing the series search text.

tag_names

A semicolon delimited string of tag names to return.

...

These dots only exist for future extensions and should be empty.

exclude_tag_names

A semicolon delimited string of tag names that series match none of. Defaults to no tag filtering.

tag_group_id

A string indicating the tag group id to filter tags by type. Defaults to no filtering by tag group. Possible values are

  • "freq" = Frequency

  • "gen" = General or Concept

  • "geo" = Geography

  • "geot" = Geography Type

  • "rls" = Release

  • "seas" = Seasonal Adjustment

  • "src" = Source

tag_search_text

A string to match tag names. Defaults to no filtering by tag name matching.

limit

An integer limit on the maximum number of results to return. Defaults to 1000, the maximum.

offset

An integer used in conjunction with limit for long series. This mimics the idea of pagination to retrieve large amounts of data over multiple calls. Defaults to 0.

order_by

A string indicating the attribute to order results by. Defaults to "series_count". Possible values are:

  • "series_count"

  • "popularity"

  • "created"

  • "name"

  • "group_id"

sort_order

A string representing the order of the resulting series. Possible values are: "asc" (default), and "desc".

realtime_start

A Date indicating the start of the real-time period. Defaults to today's date. For more information, see Real-Time Periods.

realtime_end

A Date indicating the end of the real-time period. Defaults to today's date. For more information, see Real-Time Periods.

Value

A tibble object.

References

API Documentation:

series/search/related_tags

See also

Examples

if (fredr_has_key()) { # Search for all tags matching the series text "oil" and the tag "usa". fredr_series_search_related_tags( series_search_text = "oil", tag_names = "usa" ) # Search for tags matching the series text "oil", the tag text "usa", and # are related to the tag "usa". Return only results in the "src" (Source) # group. fredr_series_search_related_tags( series_search_text = "oil", tag_names = "usa", tag_group_id = "src", tag_search_text = "usa" ) }
#> # A tibble: 5 x 6 #> name group_id notes created popularity series_count #> <chr> <chr> <chr> <chr> <int> <int> #> 1 census src Census 2012-02-27 10:… 80 3130 #> 2 bls src Bureau of Labor Stati… 2012-02-27 10:… 87 896 #> 3 bea src Bureau of Economic An… 2012-02-27 10:… 79 606 #> 4 frb src Board of Governors 2012-02-27 10:… 80 148 #> 5 eia src Energy Information Ad… 2012-02-27 10:… 42 108