Better examples of extending bokeh, and it's composability

I was trying to figure out how to build a boxplot with Bokeh today. Obviously I want a bunch of rectangles at [(x,0),(x+width, y)]. And indeed, that is what http://bokeh.pydata.org/docs/gallery/histogram.html does. But it isn’t obvious.

Looking at the boxplot example, it’s very cool that you can compose renderers with bokeh to create complex plots. http://bokeh.pydata.org/docs/gallery/boxplot.html . I would expect a higher level boxplot interface.

I created a multiplot interface in 20 lines of python code here. http://nbviewer.ipython.org/github/paddymul/bokeh_tutorial/blob/master/multiplot.ipynb

That builds an interface to assemble multiple plots with a linked x-axis. We should have more examples like that in documentation.

I think we should have more guidance as to when an abstraction should be built into bokeh (as a pull request?). When it should be layered on top of plotting.py in application code. When are JS level mods required?

Any thoughts?

I specifically want a bar-chart interface built into the js api.

I think the glyphspec should look like this

{‘type’:‘barchart’,
‘x’:‘x’,
‘y’:‘y’,
‘width’:5,
‘width_units’:‘screen’}

Actually how should the width units be handled? does something intelligent need to be done for plots with a lot of datapoints.

My above glyphspec is frustrating because it would require me to write a renderer, when I don’t really want a renderer, I want a chance to put in some extension code.

Any more thoughts?

Paddy

As I said in FD, we have plans to provide a high-level user interface… IIRC, Bryan called it something like “Bokeh.charts”…

Particularly, I don’t think we have to “guide” the users to enhance their capacity to “abstract” a high-level interface. We have to provided one, the best possible one :wink:

Regarding the implementation itself, I am not sure about mirroring the high-level API in the JS side. It would be awesome to have it, but I really don’t know if this is the immediate step to take. Probably a pythonic API is enough to start with, but I also see you have some needs… I don’t know…

Finally, it will be awesome to have this “high-level” interface available in Bokeh for people looking for that kind of interaction (I estimate it will be a nice big flow of new people).

Damián

···

On Mon, May 26, 2014 at 2:53 PM, Paddy Mullen [email protected] wrote:

I was trying to figure out how to build a boxplot with Bokeh today. Obviously I want a bunch of rectangles at [(x,0),(x+width, y)]. And indeed, that is what http://bokeh.pydata.org/docs/gallery/histogram.html does. But it isn’t obvious.

Looking at the boxplot example, it’s very cool that you can compose renderers with bokeh to create complex plots. http://bokeh.pydata.org/docs/gallery/boxplot.html . I would expect a higher level boxplot interface.

I created a multiplot interface in 20 lines of python code here. http://nbviewer.ipython.org/github/paddymul/bokeh_tutorial/blob/master/multiplot.ipynb

That builds an interface to assemble multiple plots with a linked x-axis. We should have more examples like that in documentation.

I think we should have more guidance as to when an abstraction should be built into bokeh (as a pull request?). When it should be layered on top of plotting.py in application code. When are JS level mods required?

Any thoughts?

I specifically want a bar-chart interface built into the js api.

I think the glyphspec should look like this

{‘type’:‘barchart’,
‘x’:‘x’,
‘y’:‘y’,

‘width’:5,
‘width_units’:‘screen’}

Actually how should the width units be handled? does something intelligent need to be done for plots with a lot of datapoints.

My above glyphspec is frustrating because it would require me to write a renderer, when I don’t really want a renderer, I want a chance to put in some extension code.

Any more thoughts?

Paddy

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/e3dc18e7-3df1-427f-be97-738545fad18c%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

As I said in FD, we have plans to provide a high-level user interface… IIRC, Bryan called it something like “Bokeh.charts”…

Particularly, I don’t think we have to “guide” the users to enhance their capacity to “abstract” a high-level interface. We have to provided one, the best possible one :wink:

Regarding the implementation itself, I am not sure about mirroring the high-level API in the JS side. It would be awesome to have it, but I really don’t know if this is the immediate step to take. Probably a pythonic API is enough to start with, but I also see you have some needs… I don’t know…

I am working on my second bokeh integration into an existing js code base. Both are for analytics reporting dashboards. Until the python/js widget story from either ipython or bokeh is much more mature I think dashboards will be built out using the js side of bokeh. Many people already do this with d3, and that takes a lot more work than our existing bokehjs implementation.

···

On May 26, 2014 6:21 PM, “Damian Avila” [email protected] wrote:

Finally, it will be awesome to have this “high-level” interface available in Bokeh for people looking for that kind of interaction (I estimate it will be a nice big flow of new people).

Damián

On Mon, May 26, 2014 at 2:53 PM, Paddy Mullen [email protected] wrote:

I was trying to figure out how to build a boxplot with Bokeh today. Obviously I want a bunch of rectangles at [(x,0),(x+width, y)]. And indeed, that is what http://bokeh.pydata.org/docs/gallery/histogram.html does. But it isn’t obvious.

Looking at the boxplot example, it’s very cool that you can compose renderers with bokeh to create complex plots. http://bokeh.pydata.org/docs/gallery/boxplot.html . I would expect a higher level boxplot interface.

I created a multiplot interface in 20 lines of python code here. http://nbviewer.ipython.org/github/paddymul/bokeh_tutorial/blob/master/multiplot.ipynb

That builds an interface to assemble multiple plots with a linked x-axis. We should have more examples like that in documentation.

I think we should have more guidance as to when an abstraction should be built into bokeh (as a pull request?). When it should be layered on top of plotting.py in application code. When are JS level mods required?

Any thoughts?

I specifically want a bar-chart interface built into the js api.

I think the glyphspec should look like this

{‘type’:‘barchart’,
‘x’:‘x’,
‘y’:‘y’,
‘width’:5,
‘width_units’:‘screen’}

Actually how should the width units be handled? does something intelligent need to be done for plots with a lot of datapoints.

My above glyphspec is frustrating because it would require me to write a renderer, when I don’t really want a renderer, I want a chance to put in some extension code.

Any more thoughts?

Paddy


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/e3dc18e7-3df1-427f-be97-738545fad18c%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAM9Ly3FCQ6c_QMeDHAqwQFUsVd2vUvUY%3DqL-8w3HUU7%2BeWyLPA%40mail.gmail.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.