Map WAMTRAM data
map_wamtram(
data,
location = NULL,
place = NULL,
obs_id = NULL,
wa_sites = NULL,
l_width = NULL,
l_height = NULL
)
The output of wastdr::download_w2_data()
.
A W2 location code, e.g. "TH", to filter the data by.
A W2 place code, e.g. "THEE", to filter the data by. Providing
place
overrides location
.
An Observation ID to filter W2 obs by.
WAStD Sites (joined to Localities) to display.
The parameter width
for leaflet::leaflet()
.
The parameter height
for leaflet::leaflet()
.
A leaflet map showing W2 sites and encounters.
Other wamtram:
download_w2_data()
,
w2_online()
if (FALSE) {
data("w2_data", package = "etlTurtleNesting")
w2_data <- readRDS("~/projects/etlTurtleNesting/inst/w2.rds")
map_wamtram(w2_data)
map_wamtram(w2_data, location = "DH")
map_wamtram(w2_data, place = "THEE")
map_wamtram(w2_data, place = "WKBB", l_height = "calc(100vh - 80px)")
# With WAStD Sites
areas_sf <- wastd_GET("area") %>%
magrittr::extract2("data") %>%
geojsonio::as.json() %>%
geojsonsf::geojson_sf()
areas <- areas_sf %>%
dplyr::filter(area_type == "Locality") %>%
dplyr::transmute(area_id = pk, area_name = name, w2_location_code = w2_location_code)
sites <- areas_sf %>%
dplyr::filter(area_type == "Site") %>%
dplyr::transmute(site_id = pk, site_name = name, w2_place_code = w2_place_code) %>%
sf::st_join(areas)
map_wamtram(w2_data, place = "THEE", wa_sites = sites)
}