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

return_vacant and 'VACS' variable not working for get_pums #560

Closed
willyrcoder opened this issue Mar 1, 2024 · 4 comments
Closed

return_vacant and 'VACS' variable not working for get_pums #560

willyrcoder opened this issue Mar 1, 2024 · 4 comments

Comments

@willyrcoder
Copy link

I am trying to grab the new PUMs data using tidycensus and I need vacancies to do the analysis. However, whenever I use the latest year for PUMS, get_pums throws and error if I include the variable 'VACS' or use 'return_vacant = TRUE'. Below is the code I am using:

OR_housing <- c(  "ADJHSG",
                  "ADJINC",
                  "BLD",
                  "NP",
                  "CONP",
                  "ELEP",
                  "FULP",
                  "GASP",
                  "MHP",
                  "MRGP",
                  "RNTP",
                  "SMP",
                  "TEN",
                  "VACDUR",
                  "VALP",
                  "WATP",
                  "YRBLT")


or_hh_data <- get_pums(
  variables = OR_housing, 
  state = "OR",
  year = 2022,
  survey = "acs1",
  return_vacant = TRUE,
  recode = TRUE
) 

When running the above code, I receive this error: Error: Can't combine ..1$NP and ..2$NP .

If I remove return_vacant or the 'VACS' variable, the code works fine. Is this a bug arising from the changes to the 2020 PUMs geographies? Is there a way to get vacancy with the new geographies?

@walkerke
Copy link
Owner

walkerke commented Mar 1, 2024

Thanks for flagging! The PUMS API appears to be down right now so I can't test, but I will do so when it's back up.

@walkerke walkerke reopened this Mar 4, 2024
@walkerke
Copy link
Owner

walkerke commented Mar 4, 2024

Just fixed one bug - this now works when recode = FALSE. However it's failing with recoding, so I'm still chasing that down.

@walkerke
Copy link
Owner

walkerke commented Mar 4, 2024

@willyrcoder try out the GitHub version (remotes::install_github("walkerke/tidycensus") - this is now fixed.

@willyrcoder
Copy link
Author

Thank you!!!

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

No branches or pull requests

2 participants