Example in the book
Modelling the occurrence of the plant genus Solanum in Bolivia between 2015 and 2022 (data from GBIF).
Using only a spatial GRF and a local intercept.
d <- readr::read_csv("data/solanum.csv", col_types = "cddcDc") |>
select(longitude, latitude) |>
st_as_sf(coords = c("longitude", "latitude"), crs = 4326) |>
st_transform(projUTM)
map_4326 <- ne_countries(
type = "countries",
country = "Bolivia",
scale = "medium",
returnclass = "sf"
)
map <- map_4326 |> st_transform(projUTM)