From 8830cf9b9270bc3750be41f6fbf82992dc330afe Mon Sep 17 00:00:00 2001 From: Kyle Walker Date: Thu, 19 Sep 2024 15:46:52 -0500 Subject: [PATCH] support ddhcb, sdhc data for 2020 --- DESCRIPTION | 2 +- R/helpers.R | 2 +- R/search_variables.R | 6 +++--- man/load_variables.Rd | 20 ++++++++++---------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3d729c8..f01d3ec 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -6,7 +6,7 @@ Authors@R: c( person(given = "Kyle", family = "Walker", email="kyle@walker-data.com", role=c("aut", "cre")), person(given = "Matt", family = "Herman", email = "mfherman@gmail.com", role = "aut"), person(given = "Kris", family = "Eberwein", email = "eberwein@knights.ucf.edu", role = "ctb")) -Date: 2024-07-16 +Date: 2024-09-19 URL: https://walker-data.com/tidycensus/ BugReports: https://github.com/walkerke/tidycensus/issues Description: An integrated R interface to several United States Census Bureau diff --git a/R/helpers.R b/R/helpers.R index 9f2b80d..7daec2b 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -662,7 +662,7 @@ summary_files <- function(year) { "cd115", "cd115profile", "cd116") } else if (year == 2020) { sumfiles <- c("pl", "dhc", "dp", "pes", "dpas", "ddhca", - "dpmp", "dpgu", "dpvi", + "dpmp", "dpgu", "dpvi", "ddhcb", "sdhc", "dhcvi", "dhcgu", "dhcvi", "dhcas", "cd118") } else { stop("Invalid year for `get_decennial()`; valid years are 2000, 2010, and 2020.", call. = FALSE) diff --git a/R/search_variables.R b/R/search_variables.R index e6b87f3..0f12a46 100644 --- a/R/search_variables.R +++ b/R/search_variables.R @@ -5,7 +5,7 @@ #' \code{load_variables()} returns three columns by default: \code{name}, which is the Census ID code to be supplied to the \code{variables} parameter in \code{get_decennial()} or \code{get_acs()}; \code{label}, which is a detailed description of the variable; and \code{concept}, which provides information about the table that a given variable belongs to. For 5-year ACS detailed tables datasets, a fourth column, \code{geography}, tells you the smallest geography at which a given variable is available. #' #' Datasets available are as follows: "sf1", "sf2", "sf3", "sf4", "pl", "dhc", "dp", -#' "dhca", "ddhca", "as", "gu", "mp", "vi", "acsse", +#' "dhca", "ddhca", "ddhcb", "sdhc", "as", "gu", "mp", "vi", "acsse", #' "dpas", "dpgu", "dpmp", "dpvi", #' "dhcvi", "dhcgu", "dhcvi", "dhcas", #' "acs1", "acs3", "acs5", "acs1/profile", @@ -36,7 +36,7 @@ load_variables <- function( year, dataset = c("sf1", "sf2", "sf3", "sf4", "pl", "dhc", "dp", - "ddhca", "as", "gu", "mp", "vi", "acsse", + "ddhca", "ddhcb", "sdhc", "as", "gu", "mp", "vi", "acsse", "dpas", "dpgu", "dpmp", "dpvi", "dhcvi", "dhcgu", "dhcvi", "dhcas", "acs1", "acs3", "acs5", "acs1/profile", @@ -94,7 +94,7 @@ load_variables <- function( var_type <- split[2] } - if (dataset %in% c("sf1", "sf2", "sf3", "sf4", "pl", "ddhca", + if (dataset %in% c("sf1", "sf2", "sf3", "sf4", "pl", "ddhca", "ddhcb", "sdhc", "as", "gu", "mp", "vi", "dhc", "dp", "dpas", "dpgu", "dpmp", "dpvi", "dhcvi", "dhcgu", "dhcvi", "dhcas", diff --git a/man/load_variables.Rd b/man/load_variables.Rd index 2a40a58..0cb93fc 100644 --- a/man/load_variables.Rd +++ b/man/load_variables.Rd @@ -6,15 +6,15 @@ \usage{ load_variables( year, - dataset = c("sf1", "sf2", "sf3", "sf4", "pl", "dhc", "dp", "ddhca", "as", "gu", "mp", - "vi", "acsse", "dpas", "dpgu", "dpmp", "dpvi", "dhcvi", "dhcgu", "dhcvi", "dhcas", - "acs1", "acs3", "acs5", "acs1/profile", "acs3/profile", "acs5/profile", - "acs1/subject", "acs3/subject", "acs5/subject", "acs1/cprofile", "acs5/cprofile", - "sf2profile", "sf3profile", "sf4profile", "aian", "aianprofile", "cd110h", "cd110s", - "cd110hprofile", "cd110sprofile", "sldh", "slds", "sldhprofile", "sldsprofile", - "cqr", "cd113", "cd113profile", - "cd115", "cd115profile", "cd116", "plnat", - "cd118"), + dataset = c("sf1", "sf2", "sf3", "sf4", "pl", "dhc", "dp", "ddhca", "ddhcb", "sdhc", + "as", "gu", "mp", "vi", "acsse", "dpas", "dpgu", "dpmp", "dpvi", "dhcvi", "dhcgu", + "dhcvi", "dhcas", "acs1", "acs3", "acs5", "acs1/profile", "acs3/profile", + "acs5/profile", "acs1/subject", "acs3/subject", "acs5/subject", "acs1/cprofile", + "acs5/cprofile", "sf2profile", "sf3profile", "sf4profile", "aian", "aianprofile", + "cd110h", "cd110s", "cd110hprofile", "cd110sprofile", "sldh", "slds", "sldhprofile", + "sldsprofile", "cqr", + "cd113", "cd113profile", "cd115", "cd115profile", + "cd116", "plnat", "cd118"), cache = FALSE ) } @@ -39,7 +39,7 @@ Finding the right variables to use with \code{get_decennial()} or \code{get_acs( \code{load_variables()} returns three columns by default: \code{name}, which is the Census ID code to be supplied to the \code{variables} parameter in \code{get_decennial()} or \code{get_acs()}; \code{label}, which is a detailed description of the variable; and \code{concept}, which provides information about the table that a given variable belongs to. For 5-year ACS detailed tables datasets, a fourth column, \code{geography}, tells you the smallest geography at which a given variable is available. Datasets available are as follows: "sf1", "sf2", "sf3", "sf4", "pl", "dhc", "dp", -"dhca", "ddhca", "as", "gu", "mp", "vi", "acsse", +"dhca", "ddhca", "ddhcb", "sdhc", "as", "gu", "mp", "vi", "acsse", "dpas", "dpgu", "dpmp", "dpvi", "dhcvi", "dhcgu", "dhcvi", "dhcas", "acs1", "acs3", "acs5", "acs1/profile",