rbokeh icon indicating copy to clipboard operation
rbokeh copied to clipboard

Status of sliders and other interactions?

Open east-winds opened this issue 9 years ago • 2 comments

Hi all,

I am new to rbokeh and posted this query to the bokeh mailing list first, where people suggested I ping here. I am hoping to use rbokeh for rapid data exploration, because it is potentially more attractive than my default approach using ggplot.

However, I noticed that there are no default options to create any of the more interesting interactions such as sliders, selects, and the like, as we have the in python+web interface. I found the Shiny integration (#25) to be quite helpful, and am assuming this is the easiest way currently to integrate with R (barring some more "native" widgets in Rstudio). I see a few references to ongoing work to enhance this through, e.g., custom JS calls (e.g. #105), but am not clear on the status of using native bokeh widgets in R. In essence, I am asking how many of the examples on http://bokeh.pydata.org/en/latest/docs/user_guide/interaction.html are reproducible currently in R.

One particular use case in mind is I want to visualize model runs, with three dimensions of output variables (X, Y and color) and slider(s)/select(s)/other to quickly change multiple dimensions of model input parameters.

Thanks in advance,

Michael

east-winds avatar Apr 05 '16 19:04 east-winds

For additional reference, ML discussion: https://groups.google.com/a/continuum.io/forum/?pli=1#!topic/bokeh/uofmHZQiE6M

bryevdv avatar Apr 05 '16 19:04 bryevdv

@michd-mit welcome! And sorry for the delay. You are correct that the sliders and other inputs in Bokeh are not yet exposed in rbokeh. This has been lower priority since it is easy and more "R-like" to use Shiny. However, I do hope to add widgets capabilities soon.

In the link you pointed to, rbokeh currently supports linked panning and brushing and the javascript callbacks. It's the middle "widgets" section that we are missing. The custom JS callback support needs more documentation and I plan to write a post about that soon. If you want to see some examples of these things, here are some:

https://github.com/bokeh/rbokeh/blob/master/man-roxygen/ex-grid.R https://github.com/bokeh/rbokeh/blob/master/man-roxygen/ex-callback.R https://github.com/bokeh/rbokeh/blob/master/man-roxygen/ex-hover-callback.R https://github.com/bokeh/rbokeh/blob/master/man-roxygen/ex-hover-custom-callback.R https://github.com/bokeh/rbokeh/blob/master/man-roxygen/ex-selection-callback.R https://github.com/bokeh/rbokeh/blob/master/man-roxygen/ex-tap-debug-callback.R https://github.com/bokeh/rbokeh/blob/master/man-roxygen/ex-shiny.R

For your particular use case, at this point a shiny app would be the easiest route.

hafen avatar May 04 '16 17:05 hafen