Example I

Example I

Historical habitat

This map shows the accumulated search effort for Primula pauciflora over its historical habitat covering 9 grid cells in Bellhouse Park:

prim_agm <- read.csv("Analysis_outputs/Intermediate/Primula pauciflora_accepted_grouped_merged.csv")
prim_historical <- prim_agm %>% dplyr::filter(assigned_community == "PP1")
prim_sf = assign_cell_geometry_sf(prim_historical, galgrid)
prim_sf$scaled_se = prim_sf$search_effort / prim_sf$area_prop

eps <- 1e-6

f_transform <- function(x, eps = 1e-6) log(0.3 + log(x + eps))
f_inverse   <- function(y) exp(exp(y) - 0.3)

min_val <- min(c(prim_sf$search_effort, prim_sf$scaled_se), na.rm = TRUE)
max_val <- max(c(prim_sf$search_effort, prim_sf$scaled_se), na.rm = TRUE)

domain_trans <- f_transform(c(min_val, max_val))

pal <- colorNumeric(
  palette = "viridis",
  domain = domain_trans
)

m <- leaflet(data = prim_sf) %>%
  addProviderTiles("Esri.WorldImagery") %>%
  addPolygons(
    fillColor = ~pal(f_transform(search_effort)),
    fillOpacity = 0.8,
    color = "#BDBDC3",
    weight = 1
  ) %>%
  addLegend(
    pal = pal,
    values = domain_trans,
    labFormat = leaflet::labelFormat(
      transform = function(y) f_inverse(y),
      digits = 2
    ),
    opacity = 0.8,
    title = "Accumulated Search Effort (ks)"
  )

m

Some cells at the fringe of the habitat patch overlap only partially with valid habitat; within these cells, search effort should not scale to the full 30 × 30 m cell area. We therefore scale search effort in proportion to the area of habitat contained within each cell.

m <- leaflet(data = prim_sf) %>%
  addProviderTiles("Esri.WorldImagery") %>%
  addPolygons(
    fillColor = ~pal(f_transform(scaled_se)),
    fillOpacity = 0.8,
    color = "#BDBDC3",
    weight = 1
  ) %>%
  addLegend(
    pal = pal,
    values = domain_trans,
    labFormat = leaflet::labelFormat(
      transform = function(y) f_inverse(y),
      digits = 2
    ),
    opacity = 0.8,
    title = "Accumulated Search Effort (ks)"
  )

m

This plot is based on an AGM (accepted, grouped, merged) table produced by our workflow that aggregates the search-trace data, grids it into cells, and intersects those cells with the habitat polygons. Shown here is the subset of data for the nine Bellhouse Park cells:

Description of the columns in this table:

AGM Column Description
cell_id Numeric cell id, allocated to a grid cell as configured in the project’s config.R file and manipulated by the utilities in geomUtils.R
effortId A string which summarises each of the search efforts contributing to this search cell. This is purely for traceability and is not used by the analysis computing extirpation probability
search_effort Total accumulated search effort for this grid cell measured in ksec by all observers
fringe_dist The distance of this cell from historical habitat - these values are all 0 above since the cells lie within the historical habitat
assigned_community The historical community to which this cell is assigned. These numbers are taken from row numbers in the historical plant records table after filtering for those with coordinates - for this analysis in target_plant_records_2024.csv
area Effective area of the grid cell in square metres after intersecting it with valid habitat polygons - for this analysis, a full cell will be approximately 900 sqm
area_prop The proportion that the effective grid cell area is of a standard full grid cell - for this analysis, 900 sqm

Potential habitat

This map shows accumulated search effort targeting Primula pauciflora throughout both historical and potential habitat:

prim_agm <- read.csv("Analysis_outputs/Intermediate/Primula pauciflora_accepted_grouped_merged.csv")
prim_positive <- prim_agm %>% dplyr::filter(search_effort > 0)
prim_sf = assign_cell_geometry_sf(prim_positive, galgrid)

eps <- 1e-6

f_transform <- function(x, eps = 1e-6) log(x + eps)
f_inverse   <- function(y) exp(y)

min_val <- min(prim_sf$search_effort, na.rm = TRUE)
max_val <- max(prim_sf$search_effort, na.rm = TRUE)

domain_trans <- f_transform(c(min_val, max_val))

pal <- colorNumeric(
  palette = "viridis",
  domain = domain_trans
)

m <- leaflet(data = prim_sf) %>%
  addProviderTiles("Esri.WorldImagery") %>%
  addPolygons(
    fillColor = ~pal(f_transform(search_effort)),
    fillOpacity = 0.8,
    color = "#BDBDC3",
    weight = 1
  ) %>%
  addLegend(
    pal = pal,
    values = domain_trans,
    labFormat = leaflet::labelFormat(
      transform = function(y) f_inverse(y),
      digits = 2
    ),
    opacity = 0.8,
    title = "Accumulated Search Effort (ks)"
  )

m

See the vignette covering inference of extirpation in historical habitat for further explanation of the data format underlying this plot.