Streaming graph

I’ve been keeping an eye on Bokeh since 2013. Did a presentation to the local Python user group back then, but it was a bit too early to be usable. I’ve started revisiting it recently and
with all the changes in the past few months, it is a bit challenging to understand if I can do the following or not.

I have a flask app which serves graphs. Up to now its all good except for linking matplotlib / seaborn charts as I’ve mentioned in my other post, and for streaming graphs.

I have a time series I need to plot from data that is coming from a web service. I have control over that code too, so I can shape it into whatever JSON is needed. What I need to know is how do I add something to my plot definition in my flask app to enable websocket or ajax streaming to the browser? I’m currently using javascript for all of that, but it is less and less sustainable, as all the visual R&D is done in python.

BTW, how many people out there are using flask w/bokeh?

Thanks,
Francois

Everything you've said sounds do-able.

Bokeh is a completely different project than 2013. It almost feels like
a different project from a year ago. I would highly recommend a read
through the User's Guide:
http://bokeh.pydata.org/en/latest/docs/user_guide.html to answer more of
your questions.

What I need to know is how do I add something
to my plot definition in my flask app to enable websocket or ajax
streaming to the browser?

I didn't understand this bit, you may want to run a bokeh server in
parallel to your flask app to handle the real-time updates of plots. See
the happiness demo for examples of that:

v1: https://github.com/bokeh/bokeh-demos/tree/happiness_v1/happiness
v2: https://github.com/bokeh/bokeh-demos/pull/20

Notes on my learnings while building:
http://nbviewer.jupyter.org/github/bokeh/bokeh-demos/blob/happiness_v2/happiness/Building%20happiness.ipynb

The bokeh server is only responsible for serving bokeh plots. I used
django, but you could use flask or whatever you want to do the rest of
your website and the happiness demo hopefully shows how to link it
together.

Sincerely,

Sarah BIrd

···

On 1/30/16 11:45 AM, Francois Dion wrote:

I've been keeping an eye on Bokeh since 2013. Did a presentation to the
local Python user group back then, but it was a bit too early to be
usable. I've started revisiting it recently and
with all the changes in the past few months, it is a bit challenging to
understand if I can do the following or not.

I have a flask app which serves graphs. Up to now its all good except
for linking matplotlib / seaborn charts as I've mentioned in my other
post, and for streaming graphs.

I have a time series I need to plot from data that is coming from a web
service. I have control over that code too, so I can shape it into
whatever JSON is needed. What I need to know is how do I add something
to my plot definition in my flask app to enable websocket or ajax
streaming to the browser? I'm currently using javascript for all of
that, but it is less and less sustainable, as all the visual R&D is done
in python.

BTW, how many people out there are using flask w/bokeh?

Thanks,
Francois

--
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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/bokeh/17e4d5d3-5907-45a0-8fc0-9bd542495052%40continuum.io
<https://groups.google.com/a/continuum.io/d/msgid/bokeh/17e4d5d3-5907-45a0-8fc0-9bd542495052%40continuum.io?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.