microsoft / datamations

https://microsoft.github.io/datamations/
Other
67 stars 14 forks source link

Use gemini to animate all frames exported from R #21

Closed jhofman closed 3 years ago

jhofman commented 3 years ago

Commit json and/or html to generate visualizations in sandbox/[subdir]

giorgi-ghviniashvili commented 3 years ago

@jhofman here are the json specs for vega and gemini.

giorgi-ghviniashvili commented 3 years ago

@jhofman Specs generated by Sharla. 01-initial, 02-intermediate, 03-final.

https://user-images.githubusercontent.com/6615532/114518975-f6fca000-9c50-11eb-90ba-7d93797affe8.mov

giorgi-ghviniashvili commented 3 years ago

@jhofman @sharlagelfand

I modified Sharla's specs and this is what I got:

https://user-images.githubusercontent.com/6615532/114520234-498a8c00-9c52-11eb-9392-5640f04f60a1.mov

Works better, doesn't it?

giorgi-ghviniashvili commented 3 years ago

Here is the html file with modified specs as constant variables.

jhofman commented 3 years ago

this looks great @giorgi-ghviniashvili!

next step is the transition between the grouped dot plot and the scatter plot. does that seem feasible?

giorgi-ghviniashvili commented 3 years ago

@jhofman yes, it is feasible, I will just need a vega specification for scatter plot. We already have scatter plot with vega, but circles are stacked on each other. I think Sharla should calculate X values in such a way that they are spread out and not colliding.

jhofman commented 3 years ago

Here is the html file with modified specs as constant variables.

Should be possible to view this live using raw.githack.com: https://rawcdn.githack.com/jhofman/datamations/gio/d3/sandbox/vega-gemini/gemini-sharla-specs.html

jhofman commented 3 years ago

@giorgi-ghviniashvili, in the meantime can you work on getting a transition to work between the last infogrid plot that doesn't have an axis and the first scatter plot which does. seems like a naive version of this breaks in gemini because the axis object is null in the initial frame.

maybe the style or domainOpacity/tickOpacity/labelOpacity attributes listed here can be used?

giorgi-ghviniashvili commented 3 years ago

@jhofman see demo.

Check it.

jhofman commented 3 years ago

@giorgi-ghviniashvili very nice.

it looks like the points just "drop in" from the top between 03-final and 04-jitter-coords. can you instead make it so that the points in the grid in 03-final move to their positions in the 04-jitter-coords along some continuous path (like a line?)

is that feasible w/ gemini?

giorgi-ghviniashvili commented 3 years ago

@jhofman the line should be like a tail effect like this one? Tick Tail effect to see it. Or it should be a straight line from source to target?

I will take a look at line generating with vega.

About the "drop in", yes I will take a look and see how to achieve this.

jhofman commented 3 years ago

a straight line for now seems good, although the tail effect is kind of neat :)

On Thu, Apr 15, 2021 at 12:17 PM Giorgi Ghviniashvili < @.***> wrote:

@jhofman https://github.com/jhofman the line should be like a tail effect like this https://giorgi-ghviniashvili.github.io/mario-force-canvas/ one? Tick Tail effect to see it. Or it should be a straight line from source to target?

I will take a look at line generating with vega.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jhofman/datamations/issues/21#issuecomment-820556215, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAATNS5GFTYBN4VLR5WNBDTTI4GQHANCNFSM42ZPG6HQ .

giorgi-ghviniashvili commented 3 years ago

@jhofman I fixed "drop in" effect. The reason of it was that id fields were missing in last two specs. I just added them. @sharlagelfand please always make sure to include ids. If no ids are provided, it just deletes old points and then draws, but with ids, it just updates (translates).

https://user-images.githubusercontent.com/6615532/114989297-599ba900-9ea8-11eb-91eb-1a16e00d1b18.mov

giorgi-ghviniashvili commented 3 years ago

@jhofman Instead of customising gemini specs ourselves, we should use gemini's recommendations, which generates gemini specs itself and produces better animations, with no errors!

https://user-images.githubusercontent.com/6615532/115001506-c026c400-9eb4-11eb-8d81-2cc6f6ecaba6.mov

giorgi-ghviniashvili commented 3 years ago

@jhofman Instead of customising gemini specs ourselves, we should use gemini's recommendations, which generates gemini specs itself and produces better animations, with no errors!

https://user-images.githubusercontent.com/6615532/115001506-c026c400-9eb4-11eb-8d81-2cc6f6ecaba6.mov

giorgi-ghviniashvili commented 3 years ago

@jhofman I don't understand why should we draw 100 lines, it will be a mess. But let's keep this for our live session.

jhofman commented 3 years ago

@giorgi-ghviniashvili, as per #20, next step is to animate the four group version of the plot here.

giorgi-ghviniashvili commented 3 years ago

@jhofman I just plugged in the specs that @sharlagelfand provided, and it looks like this:

https://user-images.githubusercontent.com/6615532/115209366-92d55280-a10e-11eb-95f3-40924aa21ab6.mov

Using gemini recommendations. I have not changed anything in specs, only setting width and height, because container option does not work for animation.

giorgi-ghviniashvili commented 3 years ago

About the console error, it is thrown on mouse move on chart area, so I fixed it with pointer-events: none.

Also @sharlagelfand please use https://vega.github.io/schema/vega-lite/v5.json instead of v4.json.

giorgi-ghviniashvili commented 3 years ago

I also upgraded vega-lite version to latest v5.

giorgi-ghviniashvili commented 3 years ago

Here is the html file.

sharlagelfand commented 3 years ago

@giorgi-ghviniashvili unfortunately vegawidget doesn't support vega-lite 5 yet. there's an issue in the repo to develop it, and I'll drop in there and ask about progress, but for now is it a major issue to continue using v4?

I also noticed from the animation above (which looks great!) that there must be an issue with some of the IDs I exported - between the 3rd and 4th frame the points should just change positions, not colours - I'll look into that and provide updated specs.

giorgi-ghviniashvili commented 3 years ago

I don't think there is an issue with continuing with vega v4. I just wanted it to be the latest.

On Mon, Apr 19, 2021 at 6:06 PM Sharla Gelfand @.***> wrote:

@giorgi-ghviniashvili https://github.com/giorgi-ghviniashvili unfortunately vegawidget doesn't support vega-lite 5 yet. there's an issue in the repo to develop it, and I'll drop in there and ask about progress, but for now is it a major issue to continue using v4?

I also noticed from the animation above (which looks great!) that there must be an issue with some of the IDs I exported - between the 3rd and 4th frame the points should just change positions, not colours - I'll look into that and provide updated specs.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jhofman/datamations/issues/21#issuecomment-822494091, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSPD3BB3EX6JE675P5GFU3TJQ2EVANCNFSM42ZPG6HQ .

-- Giorgi Ghviniashvili Data Visualization Engineer

ghviniashvili.com

sharlagelfand commented 3 years ago

Updated coordinates are here @giorgi-ghviniashvili - only 4-6 have been updated so that the ID tracks consistently with the data. thanks!

jhofman commented 3 years ago

This looks great overall, and very encouraging that it "just worked" to drop in the new specs.

Curious if anyone has opinions on the group by operation being shown in two parts (degree first, then degree + workplace). I kind of like it, but understand it could be confusing to people. Perhaps it's not a problem if there are enough words or labels in the animation (as in the version we used in our experiments / paper).

@dggoldst, curious if you have thoughts. (see here).

giorgi-ghviniashvili commented 3 years ago

@sharlagelfand I am directly accessing the json files from raw.githubusercontent.com, so once you update them, they will just work. Here is demo.

jhofman commented 3 years ago

Looks like we're now faced with an instance of #25 here for the group-by step, because as is it's impossible to know what the second grouping variable is until you get to the final frame.

let's brainstorm more at next meeting.

jhofman commented 3 years ago

think we're good on this one as well, specific problems now have their own issues.