-
Notifications
You must be signed in to change notification settings - Fork 916
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
[Proposal] [Vis Builder] Aggregation Persistence in VisBuilder #3482
Comments
@KrooshalUX Could you please provide some insight on this? For the UI/UX section of the proposal, if we are going to implement the aggregation persistence on the vis builder page when we switch visualization type, what do you think we should do on the UI and user experience? |
@joshuarrrr @ashwin-pc @kavilla @ananzh Could you guys provide your insights on the above proposed mapping rules? |
I like the proposed solution here. Something you might want to play around with to see if it makes more sense is:
I wonder if going by the order in the schema would be preferable here instead of the max count, since its sometimes possible that the max count could be high for a schema but its a less important breakdown than the one higher up in the list |
As i implement, i do think mapping by order make more sense. Here are some more questions: @ashwin-pc
|
Updated proposing mapping rules:
|
Examples: Among Histogram, and Line and Area are pretty straight forward. Below are some more confusing aggregation persistence involving Metric and Table: If Table vis type have aggregations such as: If we switch to Metric: If we switch to Area: If we switch to Line: Here we assume that users has entered their aggregations in the order of the schema, which means they finish entering aggregations for Y-axis, then move to the next one X-axis. Maybe we also need to inform users that for best persistence experience, inserting their aggregations in the order of the schema fields? @ashwin-pc |
@abbyhu2000 I'd suggest just documenting this in the code as a comment since this is important only to the visualization type authors |
@abbyhu2000 can we close this issue now? |
As the result of this research task on aggregation persistence for Vis Builder: #2900 (comment), I propose the following:
Proposal: Metric data to metric data, bucket data to bucket data
After implementing global query persistence and app persistence, Vis Builder should also be able to persist aggregational values across compatible visualization types, and ideally between incompatible visualizations to a possible degree.
All aggregation schemas are divided into two categories: metric and bucket. Metric field means the data is numerical, and bucket field means the data is categorical. Since numerical and categorical data tend to serve different purposes in a visualization, another approach is to map all the metric field to metric field, bucket field to bucket field.
Implementation idea:
Since each schema field has a property group, and it will either be AggGroupNames.Metrics or AggGroupNames.Buckets . We can collect a list of aggregation that belongs to metrics group and another list of bucket group, and map them to the new visualization type’s metrics group and bucket group.
Pros & Cons:
Pros: The rules are simple to follow and it is scalable since all schema fields will belong to either one of the group.
Cons:
Implementation reason:
Since metric field is mostly for displaying numerical data, and bucket field is mostly for separating data into groups depending on how a visualization graph can be split up, i think it makes sense to map the aggregations to the fields according to their functionalities. For the ones that previously in a metric group, the user’s intent is probably to just display those data against some type of units. So if we map them into a new metric group in another visualization type, those data will still be displayed but just in a different format. For the ones that previously in a bucket group, the user’s intent is probably to break the global data into separate groups and observe if there will be any patterns existing in each group. If we map those into a new bucket group, we are still following the user’s intent of separating global data into groups.
Mapping rules:
Mapping example:
Here is an example for Bar:
Y-axis: Unique count of flight delay + Unique count of flightTimeHour
X-axis: timestamp per hour
Split series: day of week/descending
Split chart: flight delay/descending
If we switch from Bar to Line chart:
Y-axis: Unique count of flight delay + Unique count of flightTimeHour
X-axis: timestamp per hour
Split series: day of week/descending
Split chart: flight delay/descending
Radius: None
If we switch from Bar to Table vis:
Metric: Unique count of flight delay + Unique count of flightTimeHour
Split rows: timestamp per hour + day of week/descending + flight delay/descending
Split table in rows:
Split table in columns:
If we switch from Bar to Metric:
Metric: Unique count of flight delay + Unique count of flightTimeHour
Split groups: timestamp per hour + day of week/descending + flight delay/descending
UI/UX proposal:
To avoid over-engineering and introducing confusing user flow, I propose that we should keep the mapping rule simple and scalable, with the addition of giving users option to either have this aggregation persistence feature or not.
The text was updated successfully, but these errors were encountered: