Skip to contents

One row per taxon x region with the counts region_effort_test() takes. "Present" is the model after tests 1 and 3 (value minus spread clears the threshold; not an extrapolation), so the regional test judges the same cells the rule would otherwise keep. Counts are of distinct unit_id: pass unit_id = cell_id to test at the cell, or a block id to test at a coarser unit (records are clustered, and a block is a more honest trial than a 5 km cell).

Usage

range_region_sql(
  cell = "og_cell",
  thr = "og_thr",
  region = "og_region",
  effort = "og_effort",
  occ = "og_occ"
)

Arguments

cell, thr, region, effort, occ

table (or view) names

Value

a SQL string: taxon, region, n_cells, n_searched, n_occupied, n_records, n_searched_all, n_occupied_all

Details

Tables (names are arguments; all keyed by taxon):

tablecolumns
celltaxon, cell_id, unit_id, val, spread, extrap, is_ch
thrtaxon, thr
regionregion, cell_id (not per taxon)
efforttaxon, unit_id – units searched for this taxon (a record of its target group)
occtaxon, unit_id – units holding a record of the taxon itself

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