Skip to contents

Weighted-mean aggregation of cell_metric across a set of cells; returns a flower-plot-ready tibble with columns metric_key, score, component, even.

Usage

scores_for_cells(con, cells, metric_pattern = "_ecoregion_rescaled$")

Arguments

con

a DBI connection (e.g. from sdm_db_con())

cells

a tibble from cells_in_polygon(), with columns cell_id and pct_covered

metric_pattern

regex to filter metric.metric_key (default: "_ecoregion_rescaled$")

Value

tibble(metric_key, score, component, even)