| fred_search | R Documentation |
Searches the FRED database by keywords or series ID substring. Returns matching series with their metadata, ordered by relevance.
fred_search(
query,
type = "full_text",
limit = 100L,
order_by = "search_rank",
filter_variable = NULL,
filter_value = NULL,
tag_names = NULL
)
query |
Character. Search terms (e.g. |
type |
Character. Either |
limit |
Integer. Maximum number of results to return. Default 100, maximum 1000. |
order_by |
Character. How to order results. One of |
filter_variable |
Character. Optional variable to filter by. One of
|
filter_value |
Character. The value to filter on (e.g. |
tag_names |
Character. Optional comma-separated tag names to filter
results (e.g. |
A data frame of matching series with columns including id,
title, frequency, units, seasonal_adjustment, last_updated,
popularity, and notes.
Other series:
fred_info(),
fred_series(),
fred_updates(),
fred_vintages()
op <- options(fred.cache_dir = tempdir())
# Keyword search
fred_search("unemployment rate")
# Filter to monthly series only
fred_search("consumer price index", filter_variable = "frequency",
filter_value = "Monthly")
# Search by series ID pattern
fred_search("GDP*", type = "series_id")
options(op)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.