shawnlaffan / biodiverse

A tool for the spatial analysis of diversity
http://shawnlaffan.github.io/biodiverse/
GNU General Public License v3.0
75 stars 19 forks source link

spatial conditions - add condition to threshold group richness #783

Closed shawnlaffan closed 3 years ago

shawnlaffan commented 3 years ago

Currently one can use the sp_get_spatial_output_list_value condition with a richness calculation to specify a definition query to exclude groups with low (or high) scores. However, this requires the prior calculation of a spatial output with richness included.

For example:

sp_get_spatial_output_list_value (
    output  => 'sp1',              #  using spatial output called sp1
    list    => 'SPATIAL_RESULTS',  #  from the SPATIAL_RESULTS list
    index   => 'RICHNESS_SET1',    #  get index value for RICHNESS_SET1
) > 3   

It would be much more convenient if this were available as a new condition, with simpler arguments.

The current approach has the advantage that one can use any neighbour set in the spatial analysis to exclude regions, but the single group case is likely to be much more common.

shawnlaffan commented 3 years ago

Mark as fixed