fred: Federal Reserve Economic Data

Description Usage Arguments Value References

View source: R/fred.R

Description

Provides an interface to the Federal Reserve Economic Database. The database is maintained by the St. Louis Fed, while this package is merely a wrapper around the public API. Compulsory disclaimer: this product uses the FRED API but is not endorsed or certified by the Federal Reserve Bank of St. Louis.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  fred(api_key, file_type="json", processor=guess.processor(file_type), ...)
  fred.category(f, category_id=NULL, ...)
  fred.category.children(f, category_id=NULL, ...)
  fred.category.related(f, category_id, ...)
  fred.category.series(f, category_id, ...)
  fred.category.tags(f, category_id, ...)
  fred.category.related_tags(f, category_id, tag_names, ...)
  fred.releases(f, ...)
  fred.releases.dates(f, ...)
  fred.release(f, release_id, ...)
  fred.release.dates(f, release_id, ...)
  fred.release.series(f, release_id, ...)
  fred.release.sources(f, release_id, ...)
  fred.release.tags(f, release_id, ...)
  fred.release.related_tags(f, release_id, tag_names, ...)
  fred.series(f, series_id, ...)
  fred.series.categories(f, series_id, ...)
  fred.series.observations(f, series_id, ...)
  fred.series.release(f, series_id, ...)
  fred.series.search(f, search_text, ...)
  fred.series.search.tags(f, series_search_text, ...)
  fred.series.search.related_tags(f, series_search_text, tag_names, ...)
  fred.series.tags(f, series_id, ...)
  fred.series.updates(f, ...)
  fred.series.vintagedates(f, series_id, ...)
  fred.sources(f, ...)
  fred.source(f, source_id, ...)
  fred.source.releases(f, source_id, ...)
  fred.tags(f, ...)
  fred.related_tags(f, tag_names, ...)
  fred.tags.series(f, tag_names, ...)

Arguments

api_key

An application-specific code assigned by the Fed.

file_type

Data return format, either xml or json. Current default is xml, but this might change in the future.

processor

A function to process data returned via the web service. The default processor for XML creates a simple data.frame, but other mechanisms might be preferable for different use cases. See smart.xml.processor.

f

A structure as returned by the fred function.

category_id, release_id, series_id, source_id

FRED identifiers for the associated objects.

search_text, series_search_text, tag_names

HTML-escaped search string, or a semicolon-separated list thereof.

...

Additional arguments as detailed in the FRED API docs.

Value

The fred function returns a struct containing basic API settings. All other functions rely on the processor element of their first argument; return types are dependent on that function.

References

The official API docs can be found at http://api.stlouisfed.org/docs/fred/. FRED API codes can be obtained from http://api.stlouisfed.org/api_key.html.


johnlaing/rfred documentation built on May 19, 2019, 5:15 p.m.