refactor: modularize app into config, UI, and server components

Co-authored-by: aider (deepseek/deepseek-chat) <aider@aider.chat>
This commit is contained in:
2026-03-13 08:22:15 -04:00
parent 6700075e72
commit 28ced93180
5 changed files with 660 additions and 603 deletions

View File

@@ -12,12 +12,12 @@ library(dplyr)
library(stringr)
library(sf)
options(timeout = 300)
# Load configuration
source("./R/config.R")
subdivisions <- c(
"8120", "8113", "8171", "8195", "8221",
"8163", "8240", "8159", "8149", "8110", "8254", "8215", "8143"
)
options(timeout = app_config$update_config$timeout_seconds)
subdivisions <- app_config$update_config$subdivisions
# load geometry lookup (static) ----
geometry_lookup <- readRDS("./data-raw/addresses/geometry_lookup.rds")
@@ -73,6 +73,6 @@ latest_sale <-
cat("Owners written:", nrow(owners), "\n")
attr(owners, "last_sale_date") <- latest_sale$last_sale_date
saveRDS(owners, "./data/owners.rds")
cat("Saved to data/owners.rds\n")
saveRDS(owners, app_config$data_paths$owners)
cat("Saved to", app_config$data_paths$owners, "\n")
cat("Most recent sale date:", format(latest_sale$last_sale_date, "%B %d, %Y"), "\n")