Skip to content

Commit

Permalink
all geometries now supported (that tidycensus can request)
Browse files Browse the repository at this point in the history
  • Loading branch information
walkerke committed Mar 1, 2020
1 parent 74cc561 commit ebd01ce
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,26 @@ use_tigris <- function(geography, year, cb = TRUE, resolution = "500k",

return(nec)

} else if (geography == "us") {

nat <- nation(year = year, class = "sf", ...)

nat <- dplyr::mutate(nat, GEOID = "1")

return(nat)

} else if (geography == "region") {

reg <- regions(year = year, class = "sf", ...)

return(reg)

} else if (geography == "division") {

div <- divisions(year = year, class = "sf", ...)

return(div)

} else {

# Leave this in as a legacy piece in case something changes
Expand Down

0 comments on commit ebd01ce

Please sign in to comment.