Skip to content

Commit

Permalink
Switch proxies to 2021, not sure why I used 2020
Browse files Browse the repository at this point in the history
  • Loading branch information
camille-s committed Dec 19, 2023
1 parent 8a3b0c8 commit ed0b94a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ NULL

#' Proxy PUMAs
#'
#' This is a list of 2 data frames giving PUMAs that make reasonable approximations of designated regions, with weights to apply to both population- and household-based measures. The data frame labeled `county` uses county-based PUMAs and 2020 ACS values; the data frame `cog` uses the new COG-based PUMAs and 2022 ACS values. When working with PUMS data or other weighted surveys, multiply the weights in the proxy table with the weights from the survey to account for how much of the PUMA overlaps the region.
#' This is a list of 2 data frames giving PUMAs that make reasonable approximations of designated regions, with weights to apply to both population- and household-based measures. The data frame labeled `county` uses county-based PUMAs and 2021 ACS values; the data frame `cog` uses the new COG-based PUMAs and 2022 ACS values. When working with PUMS data or other weighted surveys, multiply the weights in the proxy table with the weights from the survey to account for how much of the PUMA overlaps the region.
#'
#' @format A list of 2 data frames, `county` and `cog`, with 19 and 54 rows, respectively, and 6 variables:
#' \describe{
Expand All @@ -330,5 +330,5 @@ NULL
#' \item{\code{pop_weight}}{Population weight: share of the PUMA's population that's included in the region, to be used for population-based survey analysis}
#' \item{\code{hh_weight}}{Household weight: share of the PUMA's households that are included in the region, to be used for household-based survey analysis}
#' }
#' @source 2020 & 2022 5-year ACS
#' @source 2021 & 2022 5-year ACS
"proxy_pumas"
2 changes: 1 addition & 1 deletion data-raw/make_proxy_pumas.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ reg_df <- cwi::regions[c("Greater New Haven", "Greater Hartford", "Greater Water
dplyr::bind_rows(town_county)

pops <- tidyr::expand_grid(
puma_type = tibble::enframe(list(county = 2020, cog = 2022), name = "puma_type", value = "year") |> tidyr::unnest(year),
puma_type = tibble::enframe(list(county = 2021, cog = 2022), name = "puma_type", value = "year") |> tidyr::unnest(year),
geo = c("county subdivision", "puma")
) |>
tidyr::unnest(puma_type) |>
Expand Down
Binary file modified data/proxy_pumas.rda
Binary file not shown.
4 changes: 2 additions & 2 deletions man/proxy_pumas.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ed0b94a

Please sign in to comment.