Skip to content
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

Add joinaggregate. Fixes #4121 #4554

Merged
merged 19 commits into from Feb 20, 2019
Merged

Add joinaggregate. Fixes #4121 #4554

merged 19 commits into from Feb 20, 2019

Conversation

domoritz
Copy link
Member

No description provided.

Copy link
Member

@kanitw kanitw left a comment

Choose a reason for hiding this comment

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

  • Let's keep only one window example that is equivalent to joinaggregate to avoid redundancy

  • Update the advanced calculation to show joinaggregate-based example when window is not necessary

src/transform.ts Outdated Show resolved Hide resolved
@@ -0,0 +1 @@
examples/specs/*.vl.json
Copy link
Member

Choose a reason for hiding this comment

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

Can we put this rule in .prettierrc.json?

If we can, probably better to consolidate them in one place.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it works yet. prettier/prettier#3460

@kanitw kanitw mentioned this pull request Feb 15, 2019
Copy link
Member

@kanitw kanitw left a comment

Choose a reason for hiding this comment

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

Don't replace window with joinaggregate if the frame is not [null, null].

The results will be incorrect.

@@ -12,13 +12,10 @@
"format": {"type": "json"},
"transform": [
{
"type": "window",
"params": [null],
"type": "joinaggregate",
Copy link
Member

Choose a reason for hiding this comment

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

Cumulative frequency should not use join aggregate.

Window with frame = [null, 0] makes more sense. (See SVG)

Copy link
Member Author

Choose a reason for hiding this comment

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

Ups, my mistake.

Copy link
Member Author

Choose a reason for hiding this comment

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

The code should only do it when the frame is [null, null]

Copy link
Member Author

Choose a reason for hiding this comment

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

This was a bug in the code. Fixed.

examples/compiled/layer_cumulative_histogram.vg.json Outdated Show resolved Hide resolved
examples/compiled/waterfall_chart.vg.json Outdated Show resolved Hide resolved
examples/specs/bar_diverging_stack_transform.vl.json Outdated Show resolved Hide resolved
@kanitw
Copy link
Member

kanitw commented Feb 16, 2019

Instead of just doing it in the code, I think better update all the examples (except one of them) to use joinaggregate in VL examples too.

@domoritz
Copy link
Member Author

Instead of just doing it in the code, I think better update all the examples (except one of them) to use joinaggregate in VL examples too.

That's what I did. Which ones did I miss?

@domoritz
Copy link
Member Author

Fixed bar_diverging as well

@domoritz
Copy link
Member Author

@kanitw This is ready

src/transform.ts Outdated Show resolved Hide resolved
@domoritz domoritz merged commit 0dcfb61 into master Feb 20, 2019
@domoritz domoritz deleted the dom/joinaggregate branch February 20, 2019 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants