Skip to contents

One row per (model, zone) with the counts region_effort_test() takes, on block-wide units (default 10 cells = 0.5 degrees on global05: records cluster, so a block is a more honest trial than a 5 km cell). Grid-agnostic through nc (the grid's column count) and block.

Usage

occurrence_counts_sql(
  present = "occ_present",
  occ = "occ_records",
  effort = "occ_effort",
  region = "occ_region",
  region_rec = region,
  nc = 7200L,
  block = 10L
)

Arguments

present, occ, effort, region, region_rec

relation names.

nc

integer; the grid's number of columns (7200 for global05).

block

integer; cells per block side (10 = 0.5 degrees).

Value

SQL selecting mdl_key, zone_key, n_cells, n_searched, n_occupied, n_records, n_searched_all, n_occupied_all (over the whole modelled range) and n_searched_zones, n_occupied_zones (over every zone of the set), one row per (model, zone) where the model is present.

Details

Relations (names are arguments; mdl_key keys the species):

relationcolumnsmeaning
presentmdl_key, cell_idthe cells the model calls present, over the WHOLE modelled range (the merged global surface), so a zone is judged against the species' stronghold rate elsewhere
occmdl_key, cell_id, recordsrecords of the species per cell (OBIS obis_cell, through the crosswalk)
effortmdl_key, cell_idcells searched for the species' effort group (a record of its order, or of any air-breathing megafauna)
regionzone_key, cell_idthe zone each cell belongs to (majority zone, cell_zone_major_sql()); PRESENCE is counted here
region_reczone_key, cell_idthe zone dilated by the buffer d (a record just outside the zone counts); RECORDS and EFFORT are counted here; default = region

A unit with a record of the species is searched by definition, whether or not effort lists it.