Skip to content

Commit

Permalink
remove tidycensus::: to reference centroids for flows geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
walkerke committed May 19, 2021
1 parent 9471169 commit 30712cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/flows.R
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ get_flows <- function(geography, variables = NULL, breakdown = NULL,
# convert to sf object making origin centroid active geometry col
if (geometry) {
dat <- dat %>%
dplyr::left_join(tidycensus:::centroids, by = c("GEOID1" = "GEOID")) %>%
dplyr::left_join(tidycensus:::centroids, by = c("GEOID2" = "GEOID"), suffix = c("1", "2")) %>%
dplyr::left_join(centroids, by = c("GEOID1" = "GEOID")) %>%
dplyr::left_join(centroids, by = c("GEOID2" = "GEOID"), suffix = c("1", "2")) %>%
sf::st_as_sf(sf_column_name = "centroid1")
}
return(dat)
Expand Down

0 comments on commit 30712cf

Please sign in to comment.