Closed seabbs closed 3 years ago
Looking at the collection of data that is passed from summaryWidget
to rt_vis
as x
:
The page setup is then handled by setupFlex
in rt_vis
:
Which tries to make something out of whatever it receives (i.e. you give no geoData
, you get no map, but other things still render).
Would it be valuable to write functions that give the option to produce a single widget explicitly in RtD3?
I think maybe the system of passing in any selection of datasets to setupFlex
and trying to make whatever is possible out of them is a good approach, but maybe more could be done in RtD3 to expose this flexibility explicitly and then just keep rt_vis
and summaryWidget
the same as more widgets are added.
So then summaryWidget
will become the dashboard constructor but RtD3 could also produce quick time series plots in the RStudio viewer, for example (which it already can), or single widgets in an R Markdown document.
Curious to hear your thoughts @seabbs!
I don't love all of the if statements in setupFlex
But I guess the interactivity between plots requires that all plots come from the same object when they want to talk to each other
So maybe focusing on making setupFlex
nice and clean and then writing convenience mapWidget
and tsWidget
and whatever else widget functions in RtD3
would be best
Functions for underlying functionality: yes I think so.
Passing in anything and getting something: yes I also like this.
"So then summaryWidget will become the dashboard constructor but RtD3 could also produce quick time series plots in the RStudio viewer, for example (which it already can), or single widgets in an R Markdown document." -> seems like a great idea.
Interactivity limitation makes sense and its a major strong point of rolling your own vis as here vs doing something in plotly etc.
For me I really like the idea of providing an expert in a box style visualisation tool that can just be used off the shelf by people. Obviously allowing people to also mix and match makes a lot of sense.
Closing as discussion.
Just thinking aloud.
Do you think adding functionality to the current widget makes the most sense or adding more widgets with different functionality (i.e do you think a massive overall widget as the end goal or a series of widgets that end up containing the same info?).