Add owner name to listings map popup
Some checks failed
Deploy stAndrews / deploy (push) Failing after 5s
Some checks failed
Deploy stAndrews / deploy (push) Failing after 5s
Join owner_1 from owners.rds to listings via address match key. Display in marker popup above price on the Listings tab map.
This commit is contained in:
@@ -234,6 +234,7 @@ create_server <- function(input, output, session) {
|
|||||||
lng = ~longitude,
|
lng = ~longitude,
|
||||||
popup = ~paste0(
|
popup = ~paste0(
|
||||||
"<b>", address, "</b><br>",
|
"<b>", address, "</b><br>",
|
||||||
|
"Owner: ", owner_1, "<br>",
|
||||||
"Price: ", price_fmt, "<br>",
|
"Price: ", price_fmt, "<br>",
|
||||||
"Sq Ft: ", sqft, "<br>",
|
"Sq Ft: ", sqft, "<br>",
|
||||||
"$/Sq Ft: ", ppsf_fmt
|
"$/Sq Ft: ", ppsf_fmt
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ owners_coords <- owners_sf |>
|
|||||||
street_raw = trimws(sub("^\\d+\\s+(.*),.*$", "\\1", location)),
|
street_raw = trimws(sub("^\\d+\\s+(.*),.*$", "\\1", location)),
|
||||||
match_key = paste(house_num, toupper(street_raw))
|
match_key = paste(house_num, toupper(street_raw))
|
||||||
) |>
|
) |>
|
||||||
select(match_key, geom) |>
|
select(match_key, owner_1, geom) |>
|
||||||
distinct(match_key, .keep_all = TRUE)
|
distinct(match_key, .keep_all = TRUE)
|
||||||
|
|
||||||
# Extract house number + street from RentCast address
|
# Extract house number + street from RentCast address
|
||||||
@@ -94,6 +94,7 @@ listings <- listings |>
|
|||||||
transmute(
|
transmute(
|
||||||
listed_date = as.Date(listedDate),
|
listed_date = as.Date(listedDate),
|
||||||
address = formattedAddress,
|
address = formattedAddress,
|
||||||
|
owner_1,
|
||||||
sqft = as.numeric(squareFootage),
|
sqft = as.numeric(squareFootage),
|
||||||
price = as.numeric(price),
|
price = as.numeric(price),
|
||||||
price_per_sqft = round(price / sqft, 0),
|
price_per_sqft = round(price / sqft, 0),
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user