Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dateCast() on quarterly BED data #25

Open
asavagar opened this issue Mar 27, 2019 · 3 comments
Open

dateCast() on quarterly BED data #25

asavagar opened this issue Mar 27, 2019 · 3 comments
Assignees
Labels

Comments

@asavagar
Copy link

df <- bls_api(c("BDS0000000000000000120007LQ5"),
              startyear = 2008, endyear = 2017) %>%
    # Add time-series dates
    dateCast()

The data frame contains 'year' and 'period' columns as returned by the bls_api() function. The 'period' column is Q01, Q02, Q03 or Q04 which dateCast() incorrectly casts to months. For example, year 2010 and period Q03 will cast to date 2010-03-01.

Great package. Thank you.

@keberwein
Copy link
Owner

Thank you. I'll look into this!

@keberwein keberwein self-assigned this Mar 28, 2019
@keberwein keberwein added the bug label Mar 28, 2019
@asavagar
Copy link
Author

asavagar commented Apr 14, 2019

My workaround to dateCast.R for quarterly time series

df$date <- as.Date(paste(df$year, ifelse(df$period == "M13", 12,
 as.numeric(substr(df$period, 2, 3)))*3, "01", sep = "-"))

@Bhabukpokharel
Copy link

using this API how to extract unemployment by states . i can't find anywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants