Skip to contents

Maps a confidence multiplier to a short human-readable status label and a suggested colour for dashboard badges.

Usage

obs_status_label(confidence)

Arguments

confidence

Numeric vector of confidence values in [0.1, 1].

Value

List with label (character) and color (character hex), both the same length as confidence.

See also

Other obs-confidence: compute_obs_confidence(), widen_ci()

Examples

obs_status_label(c(1, 0.7, 0.4, 0.15))
#> $label
#> [1] "fresh"      "ageing"     "stale"      "very stale"
#> 
#> $color
#> [1] "#2e7d32" "#f9a825" "#e65100" "#b71c1c"
#>