plot_radar: Radar / Spider Chart of Variable Scores

View source: R/visualization.R

plot_radarR Documentation

Radar / Spider Chart of Variable Scores

Description

Draws a radar (spider) chart comparing mean variable scores across groups. Useful for visualising the multidimensional soil quality profile of each land-use system.

Usage

plot_radar(
  scored,
  config,
  group_col,
  group_cols = group_col,
  vars = NULL,
  title = "Soil Quality Radar Profile",
  palette = c("#1b7837", "#762a83", "#d6604d", "#4393c3", "#f4a582")
)

Arguments

scored

A scored data frame from score_all.

config

A sqi_config object.

group_col

Character. Column used to define radar chart series.

group_cols

Character vector of all grouping columns.

vars

Character vector of variables to include. Defaults to all in config.

title

Character. Plot title.

palette

Character vector of colours for each group.

Value

Invisible NULL; the chart is rendered to the active graphics device.

References

Chambers, J.M., & Hastie, T.J. (1992). Statistical Models in S. Wadsworth & Brooks/Cole.

Examples

data(soil_data)
cfg <- make_config(
  variable = c("pH","EC","BD","OC","MBC","Clay"),
  type     = c("opt","less","less","more","more","opt"),
  opt_low  = c(6.0, NA, NA, NA, NA, 20),
  opt_high = c(7.0, NA, NA, NA, NA, 35)
)
scored <- score_all(soil_data, cfg, group_cols = c("LandUse","Depth"))
plot_radar(scored, cfg, group_col = "LandUse",
           group_cols = c("LandUse","Depth"))


SQIpro documentation built on April 20, 2026, 5:06 p.m.