Nothing
encode_locations = function(x, single = FALSE) {
if(class(x)[1] == "character") {
encoded =
x |>
paste0(collapse = "|")
}
if(class(x)[1] == "numeric") {
if(single) stopifnot(length(x) == 2)
encoded =
x[2:1] |>
paste0(collapse = ",")
}
if(inherits(x, c("sfc", "sf"))) {
x = sf::st_coordinates(x)
}
if(class(x)[1] == "matrix") {
if(single) stopifnot(nrow(x) == 1)
encoded =
x[, c(2,1), drop = FALSE] |>
apply(1, paste0, collapse = ",") |>
paste0(collapse = "|")
}
return(encoded)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.