Add mailing label download buttons to Owners tab
This commit is contained in:
29
app.R
29
app.R
@@ -233,6 +233,15 @@ ui <- f7Page(
|
|||||||
title = "Table:",
|
title = "Table:",
|
||||||
divider = TRUE,
|
divider = TRUE,
|
||||||
DTOutput("table")
|
DTOutput("table")
|
||||||
|
),
|
||||||
|
f7Card(
|
||||||
|
title = "Download:",
|
||||||
|
divider = TRUE,
|
||||||
|
f7List(
|
||||||
|
inset = TRUE,
|
||||||
|
downloadButton("download_filtered", "Download Filtered"),
|
||||||
|
downloadButton("download_all", "Download All (388)")
|
||||||
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
#### services ----
|
#### services ----
|
||||||
@@ -411,6 +420,26 @@ server <- function(input, output) {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
output$download_filtered <- downloadHandler(
|
||||||
|
filename = "st_andrews_owners_filtered.csv",
|
||||||
|
content = function(file) {
|
||||||
|
filteredOwners() |>
|
||||||
|
sf::st_drop_geometry() |>
|
||||||
|
dplyr::select(owner_1, owner_2, label) |>
|
||||||
|
write.csv(file, row.names = FALSE)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
output$download_all <- downloadHandler(
|
||||||
|
filename = "st_andrews_owners_all.csv",
|
||||||
|
content = function(file) {
|
||||||
|
owners |>
|
||||||
|
sf::st_drop_geometry() |>
|
||||||
|
dplyr::select(owner_1, owner_2, label) |>
|
||||||
|
write.csv(file, row.names = FALSE)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
# venice map ----
|
# venice map ----
|
||||||
output$venice_map <- renderLeaflet({
|
output$venice_map <- renderLeaflet({
|
||||||
leaflet() %>%
|
leaflet() %>%
|
||||||
|
|||||||
Reference in New Issue
Block a user