data_as_tidy_table {blsR}R Documentation

Convert a list of data entries as returned by BLS API to a table

Description

Convert a list of data entries as returned by BLS API to a table

Usage

data_as_tidy_table(data, parse_values = TRUE)

Arguments

data

a list of individual datum entries as returned the API

parse_values

optional boolean. If set to true (default) it will attempt to parse the contents of value and cast numeric strings as numeric values. If set to false it will retain value as a column of strings.

Details

An extension of data_as_table that replaces the BLS period format by removing columns period and periodName and adding month or quarter where appropriate.

Value

tibble flattening data into rows for entries and columns for fields

See Also

Other blsR-utils: data_as_table(), merge_tables(), merge_tidy_tables(), tidy_periods(), tidy_table_as_zoo()

Examples

## Not run: 
series <- get_series('LNS14000001')
table <- data_as_tidy_table(series$data)

## End(Not run)

[Package blsR version 0.3.0 Index]