tidy_periods: Clean the period information returned by BLS

View source: R/merge_tables.R

tidy_periodsR Documentation

Clean the period information returned by BLS

Description

Clean the period information returned by BLS

Usage

tidy_periods(table)

Arguments

table

a tibble of the data slot in a series

Details

tidy_periods will return a tibble where the period and periodName columns have been deleted and replaced. Monthly periodicity data will have a new column month and quarterly data will have a new column quarter. Rows will be sorted from oldest to newest.

Value

a sorted tibble containing the period and the value

See Also

Other blsR-utils: bls-api-key, data_as_table(), data_as_tidy_table(), merge_tables(), merge_tidy_tables(), reduce_spanned_responses(), span_request_queries(), span_series_request(), tidy_table_as_zoo()

Examples

## Not run: 
series <- get_series('LNS14000001')
table <- data_as_table(series$data)
tidy_table <- tidy_periods(table)

## End(Not run)

blsR documentation built on July 9, 2023, 5:29 p.m.