-
Notifications
You must be signed in to change notification settings - Fork 96
Add Radar Plot Visualization Operator #3500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
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. |
...ator/src/main/scala/edu/uci/ics/amber/operator/visualization/radarPlot/RadarPlotOpDesc.scala
Outdated
Show resolved
Hide resolved
...ator/src/main/scala/edu/uci/ics/amber/operator/visualization/radarPlot/RadarPlotOpDesc.scala
Outdated
Show resolved
Hide resolved
...ator/src/main/scala/edu/uci/ics/amber/operator/visualization/radarPlot/RadarPlotOpDesc.scala
Show resolved
Hide resolved
...ator/src/main/scala/edu/uci/ics/amber/operator/visualization/radarPlot/RadarPlotOpDesc.scala
Outdated
Show resolved
Hide resolved
...ator/src/main/scala/edu/uci/ics/amber/operator/visualization/radarPlot/RadarPlotOpDesc.scala
Outdated
Show resolved
Hide resolved
...ator/src/main/scala/edu/uci/ics/amber/operator/visualization/radarPlot/RadarPlotOpDesc.scala
Outdated
Show resolved
Hide resolved
…electedAttributes is empty
...ator/src/main/scala/edu/uci/ics/amber/operator/visualization/radarPlot/RadarPlotOpDesc.scala
Outdated
Show resolved
Hide resolved
...ator/src/main/scala/edu/uci/ics/amber/operator/visualization/radarPlot/RadarPlotOpDesc.scala
Outdated
Show resolved
Hide resolved
...ator/src/main/scala/edu/uci/ics/amber/operator/visualization/radarPlot/RadarPlotOpDesc.scala
Outdated
Show resolved
Hide resolved
...ator/src/main/scala/edu/uci/ics/amber/operator/visualization/radarPlot/RadarPlotOpDesc.scala
Outdated
Show resolved
Hide resolved
…f max normalization specifically
…prove readability
…Frame, and handle None values
Looks good to me! After Yunyan approves your PR, you can merge it. |
...ator/src/main/scala/edu/uci/ics/amber/operator/visualization/radarPlot/RadarPlotOpDesc.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
…isconnected trace lines
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.", |
There was a problem hiding this comment.
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.
There was a problem hiding this 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) |
There was a problem hiding this comment.
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 --", |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
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:
Property Selection:

Normalized Result:

Non-Normalized Result:

Additional Example:

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