FRED Releases

Sam Boysel

2018-07-22

Introduction

This vignette is intended to introduce the user to fredr functions for the Releases endpoint of the FRED API.

FRED series are added to the FRED database over time in releases. Each FRED release is assigned an integer identifier. The following examples illustrate usage of the Releases endpoint functions in fredr.

Get all releases of economic data

The function fredr_releases() returns a set of all FRED releases matching the request. The data returned is a tibble in which each row represents a FRED release. The default call returns all FRED releases:

Get release dates for all releases of economic data.

The function fredr_releases_dates() returns a set of release dates for all FRED releases. The data returned is a tibble where each row represents a release date for a release. For example, to get all release dates (up to the limit of 1000) ordered by descending release date:

To instead order the results by ascending release ID:

Get a release of economic data

The function fredr_release() returns data for a single FRED release specified by release_id. The data returned is a tibble where each row represents the specified release. For example, to get release data for the Employment Cost Index release:

Get release dates for a single release of economic data

The function fredr_release_dates() returns a set of release dates for a single FRED release specified by release_id. The data returned is a tibble where each row represents a release date for the release specified. For example, to get release dates for the Employment Cost Index release:

Get the series on a release of economic data

The function fredr_release_series() returns a set of series belonging to the FRED release specified by release_id. The data returned is a tibble where each row represents a series in the release specified. For example, to get series in the Employment Cost Index release:

Note the parameters available to filter series belonging to a release:

Get the FRED tags for a release

The function fredr_release_tags() returns a set of tags assigned to series belonging to the FRED release specified by release_id. The data returned is a tibble where each row represents a tag. For example, to get the geographic tags assigned to series in the Consumer Price Index release:

Get the sources for a release of economic data

The function fredr_release_sources() returns a set of FRED sources for the FRED release specified by release_id. The data returned is a tibble where each row represents a source. For example, to get the sources for the Consumer Price Index release:

Get release table trees for a given release

The function fredr_release_tables() returns a set of FRED release table trees for the FRED release specified by release_id. The data returned is a tibble where each row represents an element of the table tree’s children: the column name gives the element ID and the column value stores data nodes for the element (e.g. element ID, release ID, parent ID, element type, element name, children, etc.). For example, to get the table tree for the Consumer Price Index release:

The above table has two elements: 34481 and 36712. Inspect an element (a list) by selecting its row and unnesting the row element value using tibble::deframe():

You can extract the tree hierarchy of a deeper element in the table by specifying an element_id. From the previous example, if you wanted to get the subtree for child element 36712 of the Consumer Price Index table: