Closed giorgi-ghviniashvili closed 3 years ago
@jhofman I think instead of writing an html over and over again and have same animation functionality, let's create a tool for it. What do you think? It will be fairly easy, just couple of input fields and a slider for animation.
@jhofman I think I should start working on this right away and then use @sharlagelfand's json specs to test.
This is a neat idea, but let’s discuss a bit further before you dig in.
Specifically, would be nice if the inputs were data operations instead of vega specs?
On Wed, Apr 14, 2021 at 11:43 AM Giorgi Ghviniashvili < @.***> wrote:
[image: Drawing (1)] https://user-images.githubusercontent.com/6615532/114739032-9442fb80-9d59-11eb-860d-ae064689ef8d.png
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jhofman/datamations/issues/27#issuecomment-819618862, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAATNS3VGL2MJM76LF6ATCTTIWZYZANCNFSM425TVS4Q .
What kind of data operations do you mean? @jhofman
It would be really nice if you could just upload data and lines of code, then see the vegalite and gemini specs that get generated, and then see the animations.
So for instance you upload: a csv w/ the salary data + a string that specifies the R code "salary_data %>% group_by(degree) %>% summarize(mean(salary))
". The only problem is that this would require running R in the browser at the moment.
That said, such things are possible and not even that difficult with Shiny Apps. I've played around with them but @sharlagelfand has more experience with them.
See for instance this demo, which has a similar aim to datamations in exposing more of the steps of the pipeline, but does so by providing access to intermediate data table states.
@jhofman @giorgi-ghviniashvili Definitely possible with Shiny! I know the data upload -> specify R code -> output vegalite specs aspects, less confident on the actual rendering of the javascript animations side in Shiny but something I could dig into for sure.
This kind of thing is starting to remind me of TidyBlocks too
I just thought of building a tool for visualization part, completely agnostic to R and data generations, because data generations already happening in R on @sharlagelfand's side, but I am happy to discuss this further.
@giorgi-ghviniashvili, given what you've seen from #29, do you think we can do everything you had envisioned in a shiny app, or is there good reason to make a separate datamation editor where you directly multiple json specs?
my guess is we can do it all with the shiny app, in which case we can close this out.
@jhofman yes, we can do this in Shiny for sure, it looks more compatible with this project, easy to integrate R interpreter and javascript as well!
Create a web based tool called
datamation-editor
(name suggestions are welcome).With this tool, we can add json spec (either vega-lite or vega) or directly import from raw github.
Add multiple of them and adjust sequence as we want and with play button it will start animation and transitions any valid spec pairs.
Also add an input to paste or import
gemini specs
.