Skip to content

Commit

Permalink
Merge pull request #558 from arthurgailes/patch-2
Browse files Browse the repository at this point in the history
allow underscores in geography in place of spaces
  • Loading branch information
walkerke authored Jul 16, 2024
2 parents 3600d0a + d3a47ee commit 0ebaeb5
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 0ebaeb5

Please sign in to comment.