iplotRadar: Radar chart

Description Usage Arguments Details Value See Also Examples

View source: R/coin_resultsdash.R

Description

Generates an interactive radar chart for a specified unit or set of units.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
iplotRadar(
  COIN,
  dset = "Raw",
  usel = NULL,
  aglev = NULL,
  isel = NULL,
  addstat = "none",
  statgroup = NULL,
  statgroup_name = NULL
)

Arguments

COIN

The COIN object, or a data frame of indicator data.

dset

The data set to use in the table

usel

Character vector of unit code(s) to plot data from

aglev

The selected aggregation level to take indicator data from, where 1 is the base indicator level, and 2, 3 etc are higher aggregation levels

isel

The indicator or aggregation code(s) to plot

addstat

Adds the statistic of the scores in each dimension as a separate trace. If "mean" adds the overall mean for each dimension/indicator. If "median" adds the overall median. If "groupmean" or "groupmedian", adds the group mean or median respectively of the first unit specified in usel, using the group specified by statgroup. Default "none", i.e. no extra trace. Using a group mean or median won't make sense unless all of selected units are from the same group.

statgroup

A grouping variable (must be present in dset) if addstat = "groupmean" or "groupmedian"

statgroup_name

An optional name to display for statgroup. In the legend this will appear as e.g. "statgroup_name group mean". Defaults to statgroup.

Details

This function uses plotly to generate a radar chart for showing one or more units, compared using a specified set of indicators. Optionally, you can add mean/median or group mean/median as an extra trace. The point being to show how a particular unit compares to its peers.

Value

Interactive radar chart generated using plotly.

See Also

Examples

1
2
3
4
# build ASEM COIN up to aggregation
ASEM <- build_ASEM()
# radar chart of Austria vs. China in Political indicators
iplotRadar(ASEM, dset = "Aggregated", usel = c("AUT", "CHN"), isel = "Political", aglev = 1)

COINr documentation built on Nov. 30, 2021, 9:06 a.m.