Skip to contents

Pools the two scorecard measures over every active site in the network that has at least min_n samples or occasions on the measure. The rate is the sum of the numerators over the sum of the denominators, so a site sampled a few times weighs less than one sampled many times. Measures are defined in calc_es_scorecard().

Usage

calc_es_score_network(
  samples,
  campaigns,
  benchmark_iso = NULL,
  from = as.Date("2016-01-01"),
  as_of = Sys.Date(),
  settings = es_score_settings(),
  cols = list()
)

Arguments

samples

Cleaned environmental sample table, one row per sample, such as polished_es. Duplicate sample identifiers are kept once.

campaigns

Cleaned campaign table, such as polished_sia.

benchmark_iso

ISO3 codes of the countries that make up the network. NULL (default) uses every country in samples.

from

First collection date read. Default 1 January 2016.

as_of

The reporting date, as a Date or a string that as.Date() reads. Defaults to Sys.Date(). It is the last collection date read.

settings

Windows, distances, thresholds and labels, built with es_score_settings().

cols

Named list of column overrides keyed by table (samples, campaigns, isolation), in the style of calc_polio_indicators(). See es_score_cols() for the keys and defaults.

Value

A tibble with one row per measure (axis) and columns sites, occasions (the pooled denominator) and network_rate (a proportion on a scale of 0 to 1).