This vignette is intended to introduce the user to fredr functions for the Series endpoint of the FRED API.
FRED series are the primary data objects in the FRED database. Each FRED series is assigned a string identifier. For example:
series_id = "UNRATE"
)series_id = "GNPCA"
)series_id = "FEDFUNDS"
)FRED series are assigned categories and tags attributes for organization and classification. The following examples illustrate usage of the Series endpoint functions in fredr.
The function fredr()
, an alias for
fredr_series_observations()
, is the core function in fredr
for fetching FRED data series. See the Get
started article and ?fredr()
for many usage
examples.
Use fredr_series_search_text()
to search for a series
by text in the series description. The data returned is a
tibble where each row represents series with description text that
matches the text specified by search_text
. For example, to
search for series with description text that matches “UNRATE”:
Use fredr_series_search_id()
to search for a series
by character ID of the series. The data returned is a tibble
where each row represents series with an ID that matches the text
specified by search_text
. For example, to search for series
with an ID that matches "UNRATE"
:
The fredr_series()
function returns information for a
single series specified by series_id
. The data returned is
a tibble in which each row represents the series specified. For example,
to get information for the UNRATE
series:
Note that there may potentially be more than one row returned if the series has been revised and real time periods are adjusted:
The fredr_series_categories()
function returns a list of
categories for the series specified by series_id
. The data
returned is a tibble in which each row represents a category that the
series belongs to. For example, to get the categories for the
UNRATE
series:
The fredr_series_release()
function returns a list of
releases that the series specified by series_id
belongs to.
The data returned is a tibble in which each row represents a release
that the series belongs to. For example, to get the release for the
UNRATE
series:
The fredr_series_updates()
function returns a list of
series recently updated on the FRED server. The data returned is a
tibble in which each row represents a series. For example, the default
call simply lists 1000 recent updates (the default for the
limit
parameter), most recent updates appearing first (but
here we limit to 10):
Use the start_time
and end_time
parameters
to filter the results by time. For example, to get all the macroeconomic
times series updated in the last day:
The fredr_series_vintagedates()
function returns a
sequence of dates in history when the series specified by
series_id
was revised or appended to. The data returned is
a tibble where each row is a date. For example, to get the vintage dates
for the series UNRATE
: