Skip to content

Conversation

madisonmlin
Copy link
Contributor

@madisonmlin madisonmlin commented Jun 23, 2025

This PR introduces a new visualization operator for a Radar Plot (also known as a spider plot). Radar plots are used to visualize multivariate data, allowing for comparison of different entities across the multiple variables. Typically, they are used to determine strengths and weaknesses of entities compared to one another (e.g. how our product compares to a competitor’s). They are also effective in showing outliers and commonalities across the entities. This Radar Plot visualization operator allows the user to select which numeric columns will be used as the radar axes, and optionally select a column whose value will be used to determine the name or color for the corresponding radar trace (the visual representation of that entity in the plot). Users can also toggle other customization features, such as to normalize the values for each radar axis, in order to prevent a representation that skews towards axes with higher values.

Changed files:

  • Created RadarPlot.png in core/gui/src/assets/operator_images
  • Created radarPlot/RadarPlotOpDesc.scala in core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/visualization
  • Created radarPlot/RadarPlotLinePattern.java in core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/visualization
  • Updated LogicalOp.scala in core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator

Property Selection:
diabetes_radar_plot_properties

Normalized Result:
diabetes_radar_plot_normalized

Non-Normalized Result:
diabetes_radar_plot_non_normalized

Additional Example:
product_radar_plot

Testing Datasets:
diabetes_mini.csv
diabetes_mini_missing_column.csv
diabetes_mini_missing_values.csv
product_data.csv

@madisonmlin madisonmlin marked this pull request as ready for review June 23, 2025 18:11
@madisonmlin madisonmlin removed the gui label Jun 23, 2025
@madisonmlin madisonmlin requested review from QZT168 and yunyad June 23, 2025 21:12
@QZT168
Copy link
Contributor

QZT168 commented Jun 24, 2025

I think it works well! I’ve left a few comments that need to be resolved. Also, please add your dataset for testing in the description of this PR.

@QZT168
Copy link
Contributor

QZT168 commented Jun 27, 2025

Looks good to me! After Yunyan approves your PR, you can merge it.

@madisonmlin madisonmlin requested a review from yunyad June 28, 2025 02:48
Copy link
Contributor

@yunyad yunyad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code quality looks much better overall. Since Plotly’s scatterpolar supports various display modes, I suggest supporting a few more commonly used ones to give users some flexibility. Full coverage isn’t necessary, but handling a few typical types (for example, color fill or not) would improve usability.

override def operatorInfo: OperatorInfo =
OperatorInfo(
"Radar Plot",
"View the result in a radar plot. A radar plot displays multivariate data on multiple axes arranged in a circular layout, allowing for comparison between different entities.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checked, I think "View the result in a radar plot." is enough.

Copy link
Contributor

@yunyad yunyad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AutofillAttributeNameList
var selectedAttributes: List[String] = _

@JsonProperty(value = "traceNameAttribute", defaultValue = "-- No Selection --", required = false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove "--", just "No Selection"


@JsonProperty(
value = "traceColorAttribute",
defaultValue = "-- No Selection --",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto


val attrList = selectedAttributes.map(attr => s""""$attr"""").mkString(", ")
val traceNameCol = traceNameAttribute match {
case "" | "-- No Selection --" => "None"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

case col => s"'$col'"
}
val traceColorCol = traceColorAttribute match {
case "" | "-- No Selection --" => "None"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants