FRED tags are attributes assigned to series. For this request, related FRED tags are the tags assigned to series that match all tags in the tag_names parameter, no tags in the exclude_tag_names parameter, and the release set by the release_id parameter.

fredr_release_related_tags(
  release_id,
  tag_names,
  ...,
  exclude_tag_names = NULL,
  tag_group_id = NULL,
  search_text = NULL,
  limit = NULL,
  offset = NULL,
  order_by = NULL,
  sort_order = NULL,
  realtime_start = NULL,
  realtime_end = NULL
)

Arguments

release_id

An integer ID of the release.

tag_names

A semicolon delimited string of tag names to be related to.

...

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. No exclusions are done by default.

tag_group_id

A string tag group id to filter tags by type. No filtering by tag group by default. Possible values are:

  • "freq" = Frequency

  • "gen" = General or Concept

  • "geo" = Geography

  • "geot" = Geography Type

  • "rls" = Release

  • "seas" = Seasonal Adjustment

  • "src" = Source

search_text

A string indicating the words to find matching tags with. No filtering by search words by default.

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

Order results by values of the specified attribute. Possible values are:

  • "series_count" (default)

  • "popularity"

  • "created"

  • "name"

  • "group_id"

sort_order

A string representing the order of the resulting series, sorted by the attribute values specified by order_by. 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.

API Documentation

fred/release/related_tags

See also

Examples

if (fredr_has_key()) { fredr_release_related_tags(10, tag_names = "cpi") }
#> # A tibble: 181 x 6 #> name group_id notes created popularity series_count #> <chr> <chr> <chr> <chr> <int> <int> #> 1 bls src "Bureau of La… 2012-02-27 … 87 4542 #> 2 indexes gen "" 2012-02-27 … 84 4542 #> 3 price gen "" 2013-07-11 … 83 4542 #> 4 price index gen "" 2012-02-27 … 80 4542 #> 5 public domain: … cc NA 2018-12-17 … 100 4542 #> 6 usa geo "United State… 2012-02-27 … 100 4542 #> 7 urban gen "" 2012-02-27 … 56 4540 #> 8 consumer gen "" 2012-02-27 … 65 4378 #> 9 nsa seas "Not Seasonal… 2012-02-27 … 100 4360 #> 10 inflation gen "" 2012-06-08 … 74 4354 #> # … with 171 more rows