Skip to content

Commit

Permalink
allow underscores in geography in place of spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurgailes authored Feb 23, 2024
1 parent 0c4b9a8 commit d3a47ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/acs.R
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ get_acs <- function(geography, variables = NULL, table = NULL, cache_table = FAL

if (geography == "puma") geography <- "public use microdata area"

# allow underscores and convert back to spaces
if (grepl("_", geography) & !grepl(" ", geography)) geography <- gsub("_", " ", geography)

if (any(grepl("^S[0-9]|^DP", variables)) && geography == "block group") {
stop("Block groups are not an available geography in the Data Profile and Subject Tables datasets.",
call. = FALSE)
Expand Down

0 comments on commit d3a47ee

Please sign in to comment.