Get the child categories for a specified FRED parent category

fredr_category_children(
  category_id,
  ...,
  realtime_start = NULL,
  realtime_end = NULL
)

Arguments

category_id

An integer ID for the category.

...

These dots only exist for future extensions and should be empty.

realtime_start

A Date indicating the start of the real-time period. Defaults to today's date. For more information, see Real-Time Periods.

realtime_end

A Date indicating the end of the real-time period. Defaults to today's date. For more information, see Real-Time Periods.

Value

A tibble object containing the name and ID for the children categories of the parent category indicated by category_id.

API Documentation

fred/category/children

See also

Examples

if (fredr_has_key()) { # Children of the root category fredr_category_children(category_id = 0L) # Children of the "Production & Business Activity" category fredr_category_children(category_id = 1L) }
#> # A tibble: 16 x 3 #> id name parent_id #> <int> <chr> <int> #> 1 32262 Business Cycle Expansions & Contractions 1 #> 2 33936 Business Surveys 1 #> 3 32436 Construction 1 #> 4 33940 Emissions 1 #> 5 33955 Expenditures 1 #> 6 33490 Finance Companies 1 #> 7 32216 Health Insurance 1 #> 8 97 Housing 1 #> 9 3 Industrial Production & Capacity Utilization 1 #> 10 32429 Manufacturing 1 #> 11 33959 Patents 1 #> 12 6 Retail Trade 1 #> 13 33441 Services 1 #> 14 33492 Technology 1 #> 15 33202 Transportation 1 #> 16 33203 Wholesale Trade 1