Skip to content

Commit

Permalink
support rep weights correctly with recodes in 2023 ACS
Browse files Browse the repository at this point in the history
  • Loading branch information
walkerke committed Jan 23, 2025
1 parent 3838d66 commit 106043b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions R/pums.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,17 @@ get_pums <- function(variables = NULL,
# merge that in as well

if (recode) {

if (year < 2023) {
state_label <- "ST_label"
} else {
state_label <- "STATE_label"
}

if (!is.null(puma)) {
join_vars <- c(join_vars, "ST_label", "PUMA")
join_vars <- c(join_vars, state_label, "PUMA")
} else {
join_vars <- c(join_vars, "ST_label")
join_vars <- c(join_vars, state_label)
}
} else {
if (!is.null(puma)) {
Expand Down

0 comments on commit 106043b

Please sign in to comment.