R/fredr_category_children.R
fredr_category_children.Rd
Get the child categories for a specified FRED parent category
fredr_category_children(
category_id,
...,
realtime_start = NULL,
realtime_end = NULL
)
An integer ID for the category.
These dots only exist for future extensions and should be empty.
A Date
indicating the start of the real-time period.
Defaults to today's date. For more information, see Real-Time Periods.
A Date
indicating the end of the real-time period.
Defaults to today's date. For more information, see Real-Time Periods.
A tibble
object containing the name and ID for the children
categories of the parent category indicated by category_id
.
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 × 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