Hi
all,
First, for those that missed today's Bokeh webinar, here is
a link to the video:
[https://continuum-analytics.wistia.com/medias/f6wp9dam91](https://continuum-analytics.wistia.com/medias/f6wp9dam91)
And here are some answers to the great questions from the
webinar we didn’t get to answer due to the technical
problems at the end.
------
Q: Seaborn doesn't incorporate bokeh - is Bokeh being used
to wrap seaborn/matplotlib?
A: Bokeh has some basic support for converting Matplotlib
plots directly into Bokeh plots. See our examples gallery,
for example: http://bokeh.pydata.org/en/latest/docs/gallery/violin.html
More and better matplotlib coming when MPL implements their
new serialization scheme.
Q: How can you schedule your python code to run at intervals
in Bokeh? Will the update with cpu scheduled data be real
time?
A: Hopefully you saw this in the streaming example with the
wedges, but just to reiterate: you can just use time.sleep()
in your python code. In 0.11 (coming January 6) there is a
new add_periodic_callback that makes this even easier.
Q: A lot of fiddling to figure it out is needed to figure
out the documentation. Can you suggest where we can find
more examples and more information to create customized
plots
A: There are actually a lot of docs for bokeh, both in terms
of the API reference and user guides, as well as a live
gallery at http://bokeh.pydata.org/en/latest/docs/gallery.html .
However, we do appreciate that with a library of this
amount of capability, what we need are things more akin to
“cookbooks” that show people how to compose plots that
address certain kinds of tasks. Right now, you can see many
more examples in the Github repo, e.g. https://github.com/bokeh/ bokeh/tree/0.10.0/examples
has the examples for version 0.10.
Q: Can you make a server-style application run in jupyter
notebook, or does it need to run from the command line?
A: Yes you can. You need to run the bokeh server explicitly
from the command line, and then write Python code in the
notebook that pushes data to it and such, but the app output
can be embedded directly in the notebook. Additionally
improved notebook comms are coming which will make
integration with native Jupyter notebook interactors even
better.
Q: Is it possible to interactively change the scale of the
plots (linear, log, semilog)?
A: Yes you can. We haven’t shown any examples of this, but
the type of scaling on each axis, as well as any axis
properties, are all just attributes that can be modified
dynamically, and will get reflected in the browser.
Q: Do we always need to run the Bokeh server?
A: No. Bokeh can generate standalone interactive plots that
are fully contained in an HTML file or even embedded in the
output cell of a notebook. The bokeh server is only
necessary when you want to have Python code get called in
response to user interaction, or you want to have Python
code that streams or loops data up to the browser. In any
of the examples where we are using a CustomJS callback, the
interactivity did not require the bokeh server. So, for
example, you send them in an email and they would retain all
their interactivity.
Q: How can you run the same python script again and again at
particular time interval - if a server is not required?
A: It is necessary to run the Bokeh server in order to run
any python code, and for certain other kinds of plots and
capabilities.
Q: Is there ability to add cool transitions while sliding
between years? For GapMinder
A: Yes you could drive this “by hand” with a little JS code,
or from python code if you use a Bokeh server. We plan to
make this even simpler with built in animation transitions
and easing functions in the near future.
Q: Are all visualizations and the interface mobile
responsive?
A: Some of the tools are mobile-friendly (both touch and
size-responsive), but it’s not something we’ve optimized for
at this time.
Q: Have you used Bokeh in data driven mobile applications?
A: Bokeh currently has limited mobile/touch capability, but
we intend to make mobile support completely
supported/maintained under test in 2016
Q: Can you point to an example app for real time twitter
data using bokeh?
A: One difficulty with OSS development is that people don’t
always come talk to you when things “just work”. So I am not
sure of one offhand, but we’d be happy to help answer
questions to get you started making one. (Especially if we
can show it off later!)
Q: How does Bokeh relate/compare to other interactive
plotting libraries like plotly?
A: Bokeh is similar to plotly, but all of Bokeh, including
the Bokeh server and the upcoming DataShader library is
completely open source (BSD licensed).
Q: What are the limitations with Bokeh, when compared to the
traditional method of creating web applications?
A: Bokeh doesn’t really let you make web applications in the
traditional sense. As a web developer, I think of Bokeh more
like d3 in the sense that it is a library that I work with
to make visualizations. If I’m writing a web application, I
want a framework that handles requests, sessions,
authentication, maybe has an ORM etc. bokeh-server does one
thing which is to keep a synchronous connection between
plot(s) on a client and the server.
A: You could use bokeh-server directly to write a very tight
data driven application with a few pages, but more than that
I’d be looking to use a normal web framework and embed bokeh
into it.
A: You may want to embed bokeh charts as standalone charts
that are just powered by data from your web application’s
database. Or you may want to build something more dynamic
that leverages bokeh-server and your web application - a
demonstration of that will be coming with the 0.11 release.
Q: It is said in Jupyter at the upper right that you use
Python 2. Is there a need to use Python 2 for bokeh, rather
than the 3?
A: Bokeh is fully supported and continuously tested with
Python 2.7 and Python 3.4 and Python 3.5. Bokeh may function
with other versions of Python (including PyPy) but these
configurations are not guaranteed.
Q: Does Bokeh support 3d plotting?
A: Not yet, but this is a longer term goal.
Q: Is there a Shiny equivalent product in python ecosystem?
A: Our vision is for Bokeh Server to fill this capability.
When combined with the new Jupyter workbook with its new
layout system that we are helping to develop, python will
have a rock solid story in this arena, with capabilities
well beyond what Shiny can do.
Q: How can you embed bokeh plots on a website? Does it make
HTML/embed codes?
A: Information about embedding standalone Bokeh app is here:
http://bokeh.pydata.org/en/latest/docs/user_guide/embed.html#components
Q: Hello. I am a Django developer really interested in using
Bokeh for online visualization. What would be the best way
for serving Bokeh plots within a Django project?
A: In addition to the embedding section of the userguide
(above) the 0.11 release coming on January 6 will also have
complete Django example integrating with the Bokeh server.
But in general the outline goes like this: include BokehJS
(from CDN) in your head, use ‘bokeh.embed.components’ in
your view code, and pass the resulting script and div into
context and use them in your template.
Q: For a simple chart, how many points can you handle before
performance is an issue? And what can you do then to scale
up further?
A: Standard Bokeh with HTML canvas can easily display tens
of thousands of points. The Bokeh WebGL backend can scale up
to hundreds of thousands of points (but only supports a
subset of glyphs yet). The DataShader library arriving in
early 2016 extends this range to millions to billions of
points.
Q: Can bokeh be used to display spatial data?
A: Yes, we have support for Google Maps together with Bokeh
plots and we just added a new generic Tile Renderer to be
able to use many tile sources, as well as a GeoJSON data
source. Many more GIS features coming in 2016.
Q: Is is possible to write CustomJS that interact with the
CustomJS slider? ie in every second increase the year?
A: Yes definitely, the slider can be updated
programmatically from Javascript (e.g., slider.set(‘value’,
10) ) or from python if you are using the Bokeh server,
(e.g, slider.value = 10).
Q: Does Bokeh provide functions that display data arrays in
a spreadsheet (cellular) format? I want to eliminate the
Excel auto-import portion of my data display requirements,
and also get the benefits of dynamic data display that Bokeh
provides.
A: There are lots of great Open Source tools for integrating
Python and Excel, you can a list of some at http://docs.continuum.io/ anaconda/excel
Look specifically for tighter Bokeh/Excel integrations
coming in 2016.
Q: CustomJS with a Python function is very exciting since
one can avoid writing JS, but the python allowed is limited.
I’d love to use callbacks with pandas code to update data
plotted. Any chance this will happen down the road?
A: If you need to run real python code (e.g. interact with
Pandas) then you will need to use the Bokeh server.
Q: What limits the frame rate for the animations shown?
A: The framerates are actually at 30+ FPS; however, the
GotoWebinar software is not able to broadcast at that
framework. They run very very smoothly! (Even the
spectrogram.) When we make the recording of the webinar
available, you can see that they are running at full
framerate.
Q: Say I have a streaming data coming in every 0.1 second,
what do I need to pay attention to about the computational
load using Bokeh? My past experience with matplotlib is the
plot freezes after running for a while?
A: The exact answer depends on particulars of your
situation, of course. But as an example the spectrogram has
been run continuously for 8+ hours at conferences, with ~30
updates per second.
Q: Some time ago I was planning to use Bokeh to make contour
plots…I’ve noted a lack of a “cmap” and data tips… Are
there plans to add those features?
A: My understanding of the question is: will hover tips work
with “colormap image plots”? If so, yes, we intend to add
hover capability to image plots in early 2016
Q: Hello, it looks like the gapminder notebook require the
utils.py package. Is it available
A: You can download utils.py here: [](http://nbviewer.ipython.org/github/bokeh/bokeh-notebooks/tree/master/tutorial/)[http://nbviewer.ipython.org/](http://nbviewer.ipython.org/) github/bokeh/bokeh-notebooks/tree/master/tutorial/
Q: Can you zoom in the right plot and have it reflect in the
left? Or is it monodirectional?
A: You can definitely link plot ranges trivially by sharing
ranges between them, see http://bokeh.pydata.org/en/latest/docs/user_guide/interaction.html#linking-plots
But you can also trigger more sophisticated interactions
too, see: http://bokeh.pydata.org/en/latest/docs/user_guide/interaction.html#customjs-for-range-update
Q: Need rbokeh website
A: [http://hafen.github.io/rbokeh/](http://hafen.github.io/rbokeh/)
Q: How can Bokeh be installed outside of Anaconda for R or
Python…I understand the pip method for Python.
A: “pip install bokeh” should grab everything you need