% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_radar.R
\name{create_radar}
\alias{create_radar}
\title{Radar Chart for multiple metrics}
\usage{
create_radar(
  data,
  metrics,
  hrvar = "Organization",
  mingroup = 5,
  agg = "mean",
  index_mode = "total",
  index_ref_group = NULL,
  na.rm = FALSE,
  return = "plot"
)
}
\arguments{
\item{data}{A Standard Person Query dataset in the form of a data frame.}

\item{metrics}{Character vector of metric column names.}

\item{hrvar}{Character string specifying the grouping column.
Defaults to \code{"Organization"}. If \code{NULL}, usage segments will be derived
via \code{identify_usage_segments()}.}

\item{mingroup}{Numeric value setting the privacy threshold / minimum group size.
Defaults to 5.}

\item{agg}{String specifying aggregation method. Either \code{"mean"} (default) or \code{"median"}.}

\item{index_mode}{String specifying indexing mode. One of:
\itemize{
\item \code{"total"} (default): Total = 100 for each metric
\item \code{"none"}: no indexing (raw group values)
\item \code{"ref_group"}: reference group = 100 (requires \code{index_ref_group})
\item \code{"minmax"}: scale to [0, 100] within observed group ranges per metric
}}

\item{index_ref_group}{Character string specifying reference group name when
\code{index_mode = "ref_group"}.}

\item{na.rm}{Logical value indicating whether NA rows in required columns are removed
prior to aggregation. Defaults to \code{FALSE}.}

\item{return}{String specifying what to return. One of:
\itemize{
\item \code{"plot"} (default)
\item \code{"table"}
}}
}
\value{
A different output is returned depending on the value passed to \code{return}:
\itemize{
\item \code{"plot"}: ggplot object (radar chart)
\item \code{"table"}: data frame (group-level indexed table)
}
}
\description{
Creates a multi-group radar (spider) chart across a set of metrics.

Core pipeline:
\enumerate{
\item Person-level aggregation within group
\item Group-level aggregation
\item Privacy filtering via \code{mingroup}
\item Optional indexing modes: "total", "none", "ref_group", "minmax"
}

Optional auto-segmentation:
\itemize{
\item If \code{hrvar} is not supplied, the function will call
\code{identify_usage_segments()} and infer the resulting segment column.
}
}
\examples{
create_radar(
  data = pq_data,
  metrics = c("Collaboration_hours", "Email_hours", "Meeting_hours"),
  hrvar = "Organization",
  mingroup = 1
)

# Return the indexed table instead of a plot
create_radar(
  data = pq_data,
  metrics = c("Collaboration_hours", "Email_hours", "Meeting_hours"),
  hrvar = "LevelDesignation",
  mingroup = 1,
  return = "table"
)
}
\seealso{
Other Visualization: 
\code{\link{afterhours_dist}()},
\code{\link{afterhours_fizz}()},
\code{\link{afterhours_line}()},
\code{\link{afterhours_rank}()},
\code{\link{afterhours_summary}()},
\code{\link{afterhours_trend}()},
\code{\link{collaboration_area}()},
\code{\link{collaboration_dist}()},
\code{\link{collaboration_fizz}()},
\code{\link{collaboration_line}()},
\code{\link{collaboration_rank}()},
\code{\link{collaboration_sum}()},
\code{\link{collaboration_trend}()},
\code{\link{create_bar}()},
\code{\link{create_bar_asis}()},
\code{\link{create_boxplot}()},
\code{\link{create_bubble}()},
\code{\link{create_dist}()},
\code{\link{create_fizz}()},
\code{\link{create_inc}()},
\code{\link{create_line}()},
\code{\link{create_line_asis}()},
\code{\link{create_period_scatter}()},
\code{\link{create_rank}()},
\code{\link{create_rogers}()},
\code{\link{create_sankey}()},
\code{\link{create_scatter}()},
\code{\link{create_stacked}()},
\code{\link{create_survival}()},
\code{\link{create_tracking}()},
\code{\link{create_trend}()},
\code{\link{email_dist}()},
\code{\link{email_fizz}()},
\code{\link{email_line}()},
\code{\link{email_rank}()},
\code{\link{email_summary}()},
\code{\link{email_trend}()},
\code{\link{external_dist}()},
\code{\link{external_fizz}()},
\code{\link{external_line}()},
\code{\link{external_rank}()},
\code{\link{external_sum}()},
\code{\link{hr_trend}()},
\code{\link{hrvar_count}()},
\code{\link{hrvar_trend}()},
\code{\link{keymetrics_scan}()},
\code{\link{meeting_dist}()},
\code{\link{meeting_fizz}()},
\code{\link{meeting_line}()},
\code{\link{meeting_rank}()},
\code{\link{meeting_summary}()},
\code{\link{meeting_trend}()},
\code{\link{one2one_dist}()},
\code{\link{one2one_fizz}()},
\code{\link{one2one_freq}()},
\code{\link{one2one_line}()},
\code{\link{one2one_rank}()},
\code{\link{one2one_sum}()},
\code{\link{one2one_trend}()}

Other Flexible: 
\code{\link{create_bar}()},
\code{\link{create_bar_asis}()},
\code{\link{create_boxplot}()},
\code{\link{create_bubble}()},
\code{\link{create_density}()},
\code{\link{create_dist}()},
\code{\link{create_fizz}()},
\code{\link{create_hist}()},
\code{\link{create_inc}()},
\code{\link{create_line}()},
\code{\link{create_line_asis}()},
\code{\link{create_period_scatter}()},
\code{\link{create_rank}()},
\code{\link{create_sankey}()},
\code{\link{create_scatter}()},
\code{\link{create_stacked}()},
\code{\link{create_survival}()},
\code{\link{create_tracking}()},
\code{\link{create_trend}()}
}
\concept{Flexible}
\concept{Visualization}
