fredr_tags_series: Find FRED series matching tag names

Description Usage Arguments Value API Documentation See Also Examples

View source: R/fredr_tags_series.R

Description

Get the series matching tags in the tag_names parameter. Exclude tags in the exclude_tag_names parameter.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
fredr_tags_series(
  tag_names,
  ...,
  exclude_tag_names = NULL,
  limit = NULL,
  offset = NULL,
  order_by = NULL,
  sort_order = NULL,
  realtime_start = NULL,
  realtime_end = NULL
)

Arguments

tag_names

A semicolon delimited string of tag names to find series using.

...

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.

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 which attribute by which to order the results of the query. Possible values include:

  • "series_id" (default)

  • "title"

  • "units"

  • "frequency"

  • "seasonal_adjustment"

  • "realtime_start"

  • "realtime_end"

  • "last_updated"

  • "observation_start"

  • "observation_end"

  • "popularity"

  • "group_popularity"

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 containing FRED series with tags matching tag_names and their descriptions.

API Documentation

fred/tags/series

See Also

fredr_category_tags(), fredr_category_related_tags(), fredr_docs(), fredr_release_tags(), fredr_release_related_tags(), fredr_series_search_tags(), fredr_series_search_related_tags(), fredr_tags(), fredr_related_tags()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
if (fredr_has_key()) {
# All series tagged with "gdp"
fredr_tags_series(tag_names = "gdp")
# All series tagged with "gdp" and not tagged with "quarterly"
fredr_tags_series(
   tag_names = "gdp",
   exclude_tag_names = "quarterly"
 )
# Top 100 most popular non-quarterly series matching GDP
fredr_tags_series(
   tag_names = "gdp",
   exclude_tag_names = "quarterly",
   order_by = "popularity",
   limit = 100L
)
}

sboysel/fredr documentation built on Aug. 15, 2021, 9:19 a.m.