Add deployment pipeline and clean up repo

- Add Dockerfile, docker-compose.yml, .dockerignore, .env (port 3842)
- Add Caddyfile.snippet for analytics gateway import pattern
- Add .gitea/workflows/deploy.yaml for act_runner SSH deploy
- Untrack sensitive/data files (SCPA xlsx, owners.rds)
- Add renv lockfile and infrastructure files
- Reorganize data-raw scripts and add SarasotaCounty boundary data
- Move www assets to www/images/, add docs PDFs
This commit is contained in:
2026-03-09 10:38:21 -04:00
parent 9dd0c7708d
commit 05e2aba34c
38 changed files with 6749 additions and 96 deletions

344
app.R
View File

@@ -10,15 +10,19 @@ library(DT)
# load data ----
owners <- readRDS("./data/owners.rds")
sbdvn <- sf::st_read("./data/plats/plats.shp")
venice_bndry <- readRDS("./data/venice.rds")
venice_facts <- readRDS("./data/venice_facts.rds")
beaches <- readRDS("./data/beaches.rds")
# define ui
# define ui ----
ui <- f7Page(
title = "St. Andrews",
## header ----
tags$head(
tags$link(rel = "manifest", href = "manifest.json"),
tags$link(rel = "apple-touch-icon", sizes = "180x180", href = "images/apple-touch-icon.png"),
tags$meta(name = "apple-mobile-web-app-capable", content = "yes"),
tags$meta(name = "apple-mobile-web-app-status-bar-style", content = "default"),
tags$link(rel = "manifest", href = "manifest.json"),
tags$link(rel = "apple-touch-icon", sizes = "180x180", href = "images/apple-touch-icon.png"),
tags$meta(name = "apple-mobile-web-app-capable", content = "yes"),
tags$meta(name = "apple-mobile-web-app-status-bar-style", content = "default"),
tags$style(HTML("
.dataTables_wrapper {
color: white;
@@ -44,76 +48,256 @@ ui <- f7Page(
}
"))
),
## options ----
options = list(
theme = "ios",
dark = TRUE,
pullToRefresh = TRUE
),
f7SingleLayout(
navbar = f7Navbar(title = "St. Andrews Park"),
toolbar = f7Toolbar(
position = "bottom",
f7Link(label = "SC-PA", href = "https://www.sc-pa.com/home/"),
f7Link(label = "GIS", href = "https://data-sarco.opendata.arcgis.com/")
),
f7Card(
title = "About",
divider = "TRUE",
img(src = "st_andrews.jpg", width = "100%"),
"St. Andrews Park is located in Venice, Florida. The condominiums are a mix of single-family homes, villas (2 and 4 units) and multi-unit buildings (8 units). There are 388 separate properties within 14 subdivisions. St. Andrews Park is one of many communities in the Plantation Golf and Country Club. It is should not be confused with the adjacent community St. Andrews East.",
footer = tagList(
f7Link("More Info", href = "http://www.cpmi.us/standrews-plantation/outside_home.asp")
)
),
f7Card(
title = "Owners:",
divider = TRUE,
raised = TRUE,
f7List(
inset = TRUE,
dividers = TRUE,
strong = TRUE,
outline = FALSE,
f7Text(
inputId = "name",
label = "Last Name:",
placeholder = "\"Patel\""
),
f7Text(
inputId = "location",
label = "Address:",
placeholder = "\"123 Chalmers\""
),
f7Select(
inputId = "sub_name",
label = "Select Subdivision:",
choices = c("All", sort(sbdvn$sub_name))
),
tags$br(),
f7Button(
inputId = "filterButton",
label = "Find Owners",
icon = "",
color = "blue"
## layout ----
f7TabLayout(
### panels ----
panels = tagList(
f7Panel(
id = "panel-left",
side = "left",
effect = "push",
title = "Menu",
f7PanelMenu(
id = "menu",
f7PanelItem(
tabName = "About",
title = "About",
icon = f7Icon("info_circle"),
active = TRUE
),
f7PanelItem(
tabName = "Venice",
title = "Venice",
icon = f7Icon("map_pin")
),
f7PanelItem(
tabName = "Beach",
title = "Beach",
icon = f7Icon("sun_max_fill")
),
f7PanelItem(
tabName = "Owners",
title = "Owners",
icon = f7Icon("person_2_fill")
),
f7PanelItem(
tabName = "Resources",
title = "Resources",
icon = f7Icon("hammer_fill")
)
)
)
),
f7Card(
title = "Map:",
divider = TRUE,
leafletOutput("map")
### navbar ----
navbar = f7Navbar(
title = "St. Andrews Park",
hairline = TRUE,
leftPanel = TRUE
),
### begin tabs ----
f7Tabs(
id = "tabs",
animated = TRUE,
#### about ----
f7Tab(
title = "About",
tabName = "About",
icon = f7Icon("info_circle"),
active = TRUE,
f7Card(
title = "About",
divider = "TRUE",
tags$img(src = "images/st_andrews.jpg", width = "100%"),
"St. Andrews Park is located in Venice, Florida. The condominiums are a mix of single-family homes, villas (2 and 4 units) and multi-unit buildings (8 units). There are 388 separate properties within 14 subdivisions. St. Andrews Park is one of many communities in the Plantation Golf and Country Club. It is should not be confused with the adjacent community St. Andrews East.",
footer = tagList(
f7Link("More Info", href = "http://www.cpmi.us/standrews-plantation/outside_home.asp")
)
)
),
f7Card(
title = "Table:",
divider = TRUE,
DTOutput("table")
#### venice ----
f7Tab(
title = "Venice",
tabName = "Venice",
icon = f7Icon("map_pin"),
active = FALSE,
f7Card(
title = "Venice",
divider = "TRUE",
leafletOutput("venice_map")
),
f7Card(
title = "Facts",
divider = "TRUE",
DTOutput("venice_facts")
)
),
#### beaches ----
f7Tab(
title = "Beach",
tabName = "Beach",
icon = f7Icon("sun_max_fill"),
active = TRUE,
f7Card(
title = "Beaches",
divider = "TRUE",
leafletOutput("beach_map"),
footer = p("Source: Environmental Protection Agency")
),
f7Block(
h3("Helpful Links:"),
f7List(
inset = TRUE,
dividers = TRUE,
strong = TRUE,
outline = FALSE,
f7ListItem(
title = "EPA Beaches",
href = "https://www.epa.gov/beaches",
external = TRUE
),
f7ListItem(
title = "Red Tide Forecast",
href = "https://habforecast.gcoos.org/",
external = TRUE
),
f7ListItem(
title = "Healthy Beaches Program",
href = "https://fdoh.maps.arcgis.com/apps/instant/nearby/index.html?appid=7106a20597de4bff98cc5ebc7f932047&findSource=0&find=1600%2520Harbor%2520Dr%2520S%252C%2520Venice%252C%2520Florida%252C%252034285&sliderDistance=2",
external = TRUE
),
f7ListItem(
title = "MOTE Beach Conditions",
href = "https://visitbeaches.org/beach/6/report/53033",
external = TRUE
),
f7ListItem(
title = "National Hurricane Center",
href = "https://www.nhc.noaa.gov/",
external = TRUE
)
)
)
),
#### owners ----
f7Tab(
title = "Owners",
tabName = "Owners",
icon = f7Icon("person_2_fill"),
f7Card(
title = "Owners:",
divider = TRUE,
raised = TRUE,
f7List(
inset = TRUE,
dividers = TRUE,
strong = TRUE,
outline = FALSE,
f7Text(
inputId = "name",
label = "Last Name:",
placeholder = "\"Patel\""
),
f7Text(
inputId = "location",
label = "Address:",
placeholder = "\"123 Chalmers\""
),
f7Select(
inputId = "sub_name",
label = "Select Subdivision:",
choices = c("All", sort(sbdvn$sub_name))
),
tags$br(),
f7Button(
inputId = "filterButton",
label = "Find Owners",
icon = "",
color = "blue"
)
)
),
f7Card(
title = "Map:",
divider = TRUE,
leafletOutput("map")
),
f7Card(
title = "Table:",
divider = TRUE,
DTOutput("table")
)
),
#### services ----
f7Tab(
title = "Resources",
tabName = "Resources",
icon = f7Icon("hammer_fill"),
f7BlockTitle(title = "Services:", size = "medium"),
f7Block(
f7List(
mode = "links",
inset = TRUE,
outline = TRUE,
dividers = TRUE,
strong = TRUE,
f7Link(label = "City of Venice", href = "https://www.venicegov.com/"),
f7Link(label = "Florida Power & Light", href = "https://www.fpl.com/"),
f7Link(label = "Sarasota County", href = "https://www.scgov.net/"),
f7Link(label = "Property Appraiser", href = "https://www.sc-pa.com/"),
f7Link(label = "Open GIS Portal", href = "https://data-sarco.opendata.arcgis.com/"),
f7Link(label = "Waste & Recycling", href = "https://www.venicegov.com/government/public-works/waste-and-recycling"),
f7Link(label = "Condo Regulation", href = "https://condos.myfloridalicense.com/"),
f7Link(label = "Property Records Search", href = "https://www.sarasotaclerk.com/records/official-records/search-land-records")
)
),
f7BlockTitle(title = "Documents:", size = "medium"),
f7Block(
f7List(
mode = "links",
inset = TRUE,
outline = TRUE,
dividers = TRUE,
strong = TRUE,
f7Link(label = "St. Andrews Covenants", href = "docs/2000_01_01_st_andrews_covenants.pdf"),
f7Link(label = "St. Andrews (unrecorded)", href = "docs/2004_06_23_sap_map.pdf"),
f7Link(label = "Patios 2", href = "docs/1997_08_12_patios_2_plat.pdf"),
f7Link(label = "Patios 3", href = "docs/1998_11_17_patios_3_plat.pdf"),
f7Link(label = "Villas 2", href = "docs/1998_09_14_villas_2_plat.pdf")
)
)
)
### end tabs----
),
### begin scripts ----
tags$script(
HTML(
"
$(document).on('click', '#pdfLink', function(event) {
event.preventDefault(); // Prevent the default link behavior
window.open($(this).attr('href'), '_blank'); // Open in a new tab
});
"
)
)
### end scripts ----
)
)
# end ui ----
# define server ----
server <- function(input, output) {
# update tabs depending on side panel
observeEvent(input$menu, {
updateF7Tabs(id = "tabs",
selected = input$menu)
})
filteredSbdvn <- reactive({
if (is.null(input$sub_name) || input$sub_name == "All") {
@@ -225,7 +409,47 @@ server <- function(input, output) {
)
)
})
# venice map ----
output$venice_map <- renderLeaflet({
leaflet() %>%
addProviderTiles("CartoDB.Voyager") %>%
setView(lng = -82.4313, lat = 27.1059, zoom = 12) %>%
addPolygons(
data = venice_bndry,
color = "red",
weight = 2,
opacity = 0.5,
fillOpacity = 0.2
)
})
# venice facts ----
output$venice_facts <- renderDT({
datatable(
venice_facts,
rownames = FALSE,
options = list(
pageLength = 10,
scrollX = TRUE,
searching = FALSE,
lengthMenu = c(5, 10, 25, 50),
dom = 'tpi'
)
)
})
# beach map ----
output$beach_map <- renderLeaflet({
leaflet() %>%
addProviderTiles("CartoDB.Voyager") %>%
setView(lng = -82.4603, lat = 27.0999, zoom = 12) %>%
addMarkers(
data = beaches,
lat = ~lat,
lng = ~lng,
popup = ~beach_name
)
})
}
# end server ----
# Run the app
shinyApp(ui, server)
shinyApp(ui, server)