Pretty-prints the FRED category tree. With no arguments, shows the eight
top-level FRED categories from a built-in static reference (no API call).
Pass a category_id to drill into its children, which fetches from the API
(and is cached). Use this to discover where series live before searching
inside a category with fred_category_series().
Usage
fred_browse(category_id = 0L, depth = 1L)
Value
A fred_tbl of categories at the requested level (invisibly).
Arguments
category_id
Integer. Category to browse. Default 0 (root). The
root prints from a static reference and does not call the API.
depth
Integer. How many levels deep to recurse. Default 1 (only
immediate children). Higher values trigger one API call per parent
category visited.
# \donttest{# Top-level categories (no API call)fred_browse()
op <- options(fred.cache_dir = tempdir())
try({
# Drill into "National Accounts" (id 32992) fred_browse(32992)
})
options(op)
# }