# \donttest{
library(MazamaLocationUtils)
# Fail gracefully if any resources are not available
try({
# Set up standard directories and spatial data
spatialDataDir <- tempdir() # typically "~/Data/Spatial"
initializeMazamaSpatialUtils(spatialDataDir)
locationTbl <- get(data("wa_monitors_500"))
# Coulee City, WA
lon <- -119.290904
lat <- 47.611942
locationTbl <-
locationTbl %>%
table_addLocation(lon, lat, distanceThreshold = 500)
dplyr::glimpse(locationTbl)
}, silent = FALSE)
# }
Run the code above in your browser using DataLab