Skip to content

Commit

Permalink
pipeline: add pop_hu_change_cities_no_water
Browse files Browse the repository at this point in the history
  • Loading branch information
tiernanmartin committed Mar 5, 2024
1 parent 2861cb4 commit 6b9abe8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions R/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,7 @@ make_pop_hu_change_cities <- function(){

cities_sf <- df_cities |>
filter(variable == "population") |>
select(geoid) |>
tigris::erase_water()
select(geoid)

pop_hu_change_cities <- df_cities |>
st_drop_geometry() |>
Expand Down
8 changes: 6 additions & 2 deletions _targets.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ library(tidycensus)
library(viridisLite)
library(gt)
library(latex2exp)
library(tigris)

# SET TARGET OPTIONS ----
tar_option_set(
Expand All @@ -32,7 +33,8 @@ tar_option_set(
"tidycensus",
"viridisLite",
"gt",
"latex2exp")
"latex2exp",
"tigris")
)

# SOURCE R FUNCTIONS -----------------------------------------------------------
Expand Down Expand Up @@ -232,7 +234,9 @@ pipeline_ps_trends <- list(
make_pop_hu_region_list(pop_change_counties,
housing_change_counties)),
tar_target(pop_hu_change_cities,
make_pop_hu_change_cities())
make_pop_hu_change_cities()),
tar_target(pop_hu_change_cities_no_water,
tigris::erase_water(pop_hu_change_cities))
)

# MERGE PIPELINE PARTS ----------------------------------------------------
Expand Down

0 comments on commit 6b9abe8

Please sign in to comment.