Add unit numbers and rename label to address_1 in mailing export
This commit is contained in:
18
app.R
18
app.R
@@ -427,15 +427,17 @@ server <- function(input, output) {
|
||||
prep_mailing <- function(data) {
|
||||
data |>
|
||||
sf::st_drop_geometry() |>
|
||||
dplyr::select(owner_1, owner_2, label) |>
|
||||
dplyr::select(owner_1, owner_2, label, unit) |>
|
||||
dplyr::mutate(
|
||||
owner_2 = dplyr::na_if(owner_2, "NA"),
|
||||
owner_2 = ifelse(is.na(owner_2), "", owner_2),
|
||||
label = stringr::str_squish(label),
|
||||
city = "Venice",
|
||||
state = "FL",
|
||||
zip = "34285"
|
||||
)
|
||||
owner_2 = dplyr::na_if(owner_2, "NA"),
|
||||
owner_2 = ifelse(is.na(owner_2), "", owner_2),
|
||||
address_1 = stringr::str_squish(label),
|
||||
address_2 = ifelse(unit == "", "", paste0("Unit ", unit)),
|
||||
city = "Venice",
|
||||
state = "FL",
|
||||
zip = "34285"
|
||||
) |>
|
||||
dplyr::select(owner_1, owner_2, address_1, address_2, city, state, zip)
|
||||
}
|
||||
|
||||
output$download_filtered <- downloadHandler(
|
||||
|
||||
Reference in New Issue
Block a user