Bokeh Server: embedding animated chart

I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid=“71dcea49-64c3-42d3-bac1-373f780fe2fd” keeps changing, so I need to modify the embed script part in HTML.

How to get bokeh_modelid=“XYZ” point to a fix string, so embed script doesn’t have to be modified each time animated script is restarted?

How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.

···

On Sun, Jun 29, 2014 at 6:02 PM, [email protected] wrote:

I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid=“71dcea49-64c3-42d3-bac1-373f780fe2fd” keeps changing, so I need to modify the embed script part in HTML.

How to get bokeh_modelid=“XYZ” point to a fix string, so embed script doesn’t have to be modified each time animated script is restarted?

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/44a9c67b-70ac-4537-b921-6a64901c6725%40continuum.io.

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

I am using current stable version 0.4.4. Embed code looks like below. Plot code Ipython notebook is from samples folder, attached.
Thanks for looking into this!

 <html> <body> <h2>Simple Embed Example</h2> <p>Here is my plot:</p> <p> <script src="http://localhost:5006//bokeh/embed.js" bokeh_plottype="serverconn" bokeh_docid="3980adc2-f1c8-4207-906b-dde7d636ac82" bokeh_ws_conn_string="ws://localhost:5006/bokeh/sub" bokeh_docapikey="43274608-8c07-4d76-9d57-df2da7d14212" bokeh_root_url="http://localhost:5006/" bokeh_modelid="71dcea49-64c3-42d3-bac1-373f780fe2fd" bokeh_modeltype="Plot" async="true"></script>
</p> </body> </html>

animated.ipynb (4.77 KB)

···

On Sunday, June 29, 2014 11:39:48 PM UTC+2, Damian Avila wrote:

How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.

On Sun, Jun 29, 2014 at 6:02 PM, [email protected] wrote:

I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid=“71dcea49-64c3-42d3-bac1-373f780fe2fd” keeps changing, so I need to modify the embed script part in HTML.

How to get bokeh_modelid=“XYZ” point to a fix string, so embed script doesn’t have to be modified each time animated script is restarted?

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/44a9c67b-70ac-4537-b921-6a64901c6725%40continuum.io.

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

In fact, we have refactored all the embed stuff, and right now, in master, it is stronger and simpler than before…
We are releasing the 0.5v in a few days, so you can try the new embed stuff using git master or you can try it using the nightly build.

And for completeness, you have new examples about how to use the new API here: https://github.com/ContinuumIO/bokeh/tree/master/examples/embed

···

On Sun, Jun 29, 2014 at 6:45 PM, [email protected] wrote:

I am using current stable version 0.4.4. Embed code looks like below. Plot code Ipython notebook is from samples folder, attached.
Thanks for looking into this!

 <html> <body> <h2>Simple Embed Example</h2> <p>Here is my plot:</p> <p> <script src="[http://localhost:5006//bokeh/embed.js](http://localhost:5006//bokeh/embed.js)" bokeh_plottype="serverconn" bokeh_docid="3980adc2-f1c8-4207-906b-dde7d636ac82" bokeh_ws_conn_string="ws://localhost:5006/bokeh/sub" bokeh_docapikey="43274608-8c07-4d76-9d57-df2da7d14212" bokeh_root_url="[http://localhost:5006/](http://localhost:5006/) " bokeh_modelid="71dcea49-64c3-42d3-bac1-373f780fe2fd" bokeh_modeltype="Plot" async="true"></script>
</p> </body> </html>

On Sunday, June 29, 2014 11:39:48 PM UTC+2, Damian Avila wrote:

How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.

On Sun, Jun 29, 2014 at 6:02 PM, [email protected] wrote:

I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid=“71dcea49-64c3-42d3-bac1-373f780fe2fd” keeps changing, so I need to modify the embed script part in HTML.

How to get bokeh_modelid=“XYZ” point to a fix string, so embed script doesn’t have to be modified each time animated script is restarted?

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

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/44a9c67b-70ac-4537-b921-6a64901c6725%40continuum.io.

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

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].

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/1af24488-e988-44c5-b55f-7ceca63ece82%40continuum.io.

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

All of that said, I think the problem is actually that you are re-running the animated.py code multiple times which will result in new plots and models getting stored to the server every time. That's why the id is changing. If the intent is to store and embed the plot once, then run a script that can update the data separately, then the data updating script will need to pull the existing datasource object down from the server then update it. This could probably be made easier, I will have to get back to you about the best way to do it, maybe we can write some convenience functions to help with this.

Bryan

···

On Jun 29, 2014, at 4:59 PM, Damian Avila <[email protected]> wrote:

In fact, we have refactored all the embed stuff, and right now, in master, it is stronger and simpler than before...
We are releasing the 0.5v in a few days, so you can try the new embed stuff using git master or you can try it using the nightly build.
And for completeness, you have new examples about how to use the new API here: https://github.com/ContinuumIO/bokeh/tree/master/examples/embed

On Sun, Jun 29, 2014 at 6:45 PM, <[email protected]> wrote:
I am using current stable version 0.4.4. Embed code looks like below. Plot code Ipython notebook is from samples folder, attached.
Thanks for looking into this!

<html>
<body>
<h2>Simple Embed Example</h2>
<p>Here is my plot:</p>
<p>
<script src="
http://localhost:5006//bokeh/embed.js
"
bokeh_plottype="serverconn" bokeh_docid="3980adc2-f1c8-4207-906b-dde7d636ac82"
bokeh_ws_conn_string="ws://localhost:5006/bokeh/sub"
bokeh_docapikey="43274608-8c07-4d76-9d57-df2da7d14212"
bokeh_root_url="
http://localhost:5006/
"
bokeh_modelid="71dcea49-64c3-42d3-bac1-373f780fe2fd"
bokeh_modeltype="Plot" async="true"></script>
</p>
</body>
</html>

On Sunday, June 29, 2014 11:39:48 PM UTC+2, Damian Avila wrote:
How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.

On Sun, Jun 29, 2014 at 6:02 PM, <[email protected]> wrote:
I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid="71dcea49-64c3-42d3-bac1-373f780fe2fd" keeps changing, so I need to modify the embed script part in HTML.

How to get bokeh_modelid="XYZ" point to a fix string, so embed script doesn't have to be modified each time animated script is restarted?

--
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 bokeh+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/44a9c67b-70ac-4537-b921-6a64901c6725%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/1af24488-e988-44c5-b55f-7ceca63ece82%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 visithttps://groups.google.com/a/continuum.io/d/msgid/bokeh/CAM9Ly3HqbTn7mtL9PMjuySNPp9zDVH2UHbfADBbiORYBW_dUNw%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Yes, sorry @maxicus… I did not answer your question… probably it is what Bryan has pointed out… Anyway, I encourage you to look at the new API, you will probably find things more easier that the current status.

Cheers.

···

On Sun, Jun 29, 2014 at 7:04 PM, Bryan Van de Ven [email protected] wrote:

All of that said, I think the problem is actually that you are re-running the animated.py code multiple times which will result in new plots and models getting stored to the server every time. That’s why the id is changing. If the intent is to store and embed the plot once, then run a script that can update the data separately, then the data updating script will need to pull the existing datasource object down from the server then update it. This could probably be made easier, I will have to get back to you about the best way to do it, maybe we can write some convenience functions to help with this.

Bryan

On Jun 29, 2014, at 4:59 PM, Damian Avila [email protected] wrote:

In fact, we have refactored all the embed stuff, and right now, in master, it is stronger and simpler than before…

We are releasing the 0.5v in a few days, so you can try the new embed stuff using git master or you can try it using the nightly build.

And for completeness, you have new examples about how to use the new API here: https://github.com/ContinuumIO/bokeh/tree/master/examples/embed

On Sun, Jun 29, 2014 at 6:45 PM, [email protected] wrote:

I am using current stable version 0.4.4. Embed code looks like below. Plot code Ipython notebook is from samples folder, attached.

Thanks for looking into this!

Simple Embed Example

Here is my plot:

On Sunday, June 29, 2014 11:39:48 PM UTC+2, Damian Avila wrote:

How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.

On Sun, Jun 29, 2014 at 6:02 PM, [email protected] wrote:

I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid=“71dcea49-64c3-42d3-bac1-373f780fe2fd” keeps changing, so I need to modify the embed script part in HTML.

How to get bokeh_modelid=“XYZ” point to a fix string, so embed script doesn’t have to be modified each time animated script is restarted?

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/44a9c67b-70ac-4537-b921-6a64901c6725%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/1af24488-e988-44c5-b55f-7ceca63ece82%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 visithttps://groups.google.com/a/continuum.io/d/msgid/bokeh/CAM9Ly3HqbTn7mtL9PMjuySNPp9zDVH2UHbfADBbiORYBW_dUNw%40mail.gmail.com.
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/E67618C9-FAAD-47F0-B085-91D0F278EB71%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

This is actually really good to have brought up because it is a fairly obvious workflow use case that we managed to forget to make simple. Things we probably need:

* a mechanism to hand-specify some id's (possibly)
* easier ways to get id's of data sources, etc
* convenience functions for pulling data sources down from the server for later updating

We should probably make a ticket for this.

maxicus, these things won't be in the upcoming 0.5 release but hopefully a dev release shortly after. I will try to work up an example using the current interface that stores a plot, and then later in a different script updates, it in the next day or so.

Bryan

Thanks for explaining – the fact that the new model is being created was somehow not so obvious. After reading documentation was under impression if plot docname is provided then it will just use existing storage. Now it’s clearer what happens.
Would appreciate a sample how to pull an existing datasource object and then update it? or a link to documentation how to do it?

Many thanks for the replies again.

···

On Monday, June 30, 2014 12:04:03 AM UTC+2, Bryan Van de ven wrote:

All of that said, I think the problem is actually that you are re-running the animated.py code multiple times which will result in new plots and models getting stored to the server every time. That’s why the id is changing. If the intent is to store and embed the plot once, then run a script that can update the data separately, then the data updating script will need to pull the existing datasource object down from the server then update it. This could probably be made easier, I will have to get back to you about the best way to do it, maybe we can write some convenience functions to help with this.

Bryan

On Jun 29, 2014, at 4:59 PM, Damian Avila [email protected] wrote:

In fact, we have refactored all the embed stuff, and right now, in master, it is stronger and simpler than before…

We are releasing the 0.5v in a few days, so you can try the new embed stuff using git master or you can try it using the nightly build.

And for completeness, you have new examples about how to use the new API here: https://github.com/ContinuumIO/bokeh/tree/master/examples/embed

On Sun, Jun 29, 2014 at 6:45 PM, [email protected] wrote:

I am using current stable version 0.4.4. Embed code looks like below. Plot code Ipython notebook is from samples folder, attached.

Thanks for looking into this!

Simple Embed Example

Here is my plot:

On Sunday, June 29, 2014 11:39:48 PM UTC+2, Damian Avila wrote:

How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.

On Sun, Jun 29, 2014 at 6:02 PM, [email protected] wrote:

I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid=“71dcea49-64c3-42d3-bac1-373f780fe2fd” keeps changing, so I need to modify the embed script part in HTML.

How to get bokeh_modelid=“XYZ” point to a fix string, so embed script doesn’t have to be modified each time animated script is restarted?


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/44a9c67b-70ac-4537-b921-6a64901c6725%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/1af24488-e988-44c5-b55f-7ceca63ece82%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 visithttps://groups.google.com/a/continuum.io/d/msgid/bokeh/CAM9Ly3HqbTn7mtL9PMjuySNPp9zDVH2UHbfADBbiORYBW_dUNw%40mail.gmail.com.

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

Example about how to update it here: https://github.com/ContinuumIO/bokeh/blob/master/examples/embed/animated.py.
Check lines 54-67

Hope it helps…

···

On Sun, Jun 29, 2014 at 7:20 PM, [email protected] wrote:

Thanks for explaining – the fact that the new model is being created was somehow not so obvious. After reading documentation was under impression if plot docname is provided then it will just use existing storage. Now it’s clearer what happens.
Would appreciate a sample how to pull an existing datasource object and then update it? or a link to documentation how to do it?

Many thanks for the replies again.

On Monday, June 30, 2014 12:04:03 AM UTC+2, Bryan Van de ven wrote:

All of that said, I think the problem is actually that you are re-running the animated.py code multiple times which will result in new plots and models getting stored to the server every time. That’s why the id is changing. If the intent is to store and embed the plot once, then run a script that can update the data separately, then the data updating script will need to pull the existing datasource object down from the server then update it. This could probably be made easier, I will have to get back to you about the best way to do it, maybe we can write some convenience functions to help with this.

Bryan

On Jun 29, 2014, at 4:59 PM, Damian Avila [email protected] wrote:

In fact, we have refactored all the embed stuff, and right now, in master, it is stronger and simpler than before…

We are releasing the 0.5v in a few days, so you can try the new embed stuff using git master or you can try it using the nightly build.

And for completeness, you have new examples about how to use the new API here: https://github.com/ContinuumIO/bokeh/tree/master/examples/embed

On Sun, Jun 29, 2014 at 6:45 PM, [email protected] wrote:

I am using current stable version 0.4.4. Embed code looks like below. Plot code Ipython notebook is from samples folder, attached.

Thanks for looking into this!

Simple Embed Example

Here is my plot:

On Sunday, June 29, 2014 11:39:48 PM UTC+2, Damian Avila wrote:

How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.

On Sun, Jun 29, 2014 at 6:02 PM, [email protected] wrote:

I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid=“71dcea49-64c3-42d3-bac1-373f780fe2fd” keeps changing, so I need to modify the embed script part in HTML.

How to get bokeh_modelid=“XYZ” point to a fix string, so embed script doesn’t have to be modified each time animated script is restarted?


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/44a9c67b-70ac-4537-b921-6a64901c6725%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/1af24488-e988-44c5-b55f-7ceca63ece82%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 visithttps://groups.google.com/a/continuum.io/d/msgid/bokeh/CAM9Ly3HqbTn7mtL9PMjuySNPp9zDVH2UHbfADBbiORYBW_dUNw%40mail.gmail.com.

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/55b9490b-be6f-470c-b2c8-87bd006d62ca%40continuum.io.

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

Damian, thanks for the example. Unfortunately I am having issues installing bokeh-master branch next to 0.4.4. Getting “cannot import name Cloud” issue as described in

Will wait ill you release the 0.5 and then update. Many thanks!

···

On Monday, June 30, 2014 12:21:34 AM UTC+2, Damian Avila wrote:

Example about how to update it here: https://github.com/ContinuumIO/bokeh/blob/master/examples/embed/animated.py.
Check lines 54-67

Hope it helps…

On Sun, Jun 29, 2014 at 7:20 PM, [email protected] wrote:

Thanks for explaining – the fact that the new model is being created was somehow not so obvious. After reading documentation was under impression if plot docname is provided then it will just use existing storage. Now it’s clearer what happens.
Would appreciate a sample how to pull an existing datasource object and then update it? or a link to documentation how to do it?

Many thanks for the replies again.

On Monday, June 30, 2014 12:04:03 AM UTC+2, Bryan Van de ven wrote:

All of that said, I think the problem is actually that you are re-running the animated.py code multiple times which will result in new plots and models getting stored to the server every time. That’s why the id is changing. If the intent is to store and embed the plot once, then run a script that can update the data separately, then the data updating script will need to pull the existing datasource object down from the server then update it. This could probably be made easier, I will have to get back to you about the best way to do it, maybe we can write some convenience functions to help with this.

Bryan

On Jun 29, 2014, at 4:59 PM, Damian Avila [email protected] wrote:

In fact, we have refactored all the embed stuff, and right now, in master, it is stronger and simpler than before…

We are releasing the 0.5v in a few days, so you can try the new embed stuff using git master or you can try it using the nightly build.

And for completeness, you have new examples about how to use the new API here: https://github.com/ContinuumIO/bokeh/tree/master/examples/embed

On Sun, Jun 29, 2014 at 6:45 PM, [email protected] wrote:

I am using current stable version 0.4.4. Embed code looks like below. Plot code Ipython notebook is from samples folder, attached.

Thanks for looking into this!

Simple Embed Example

Here is my plot:

On Sunday, June 29, 2014 11:39:48 PM UTC+2, Damian Avila wrote:

How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.

On Sun, Jun 29, 2014 at 6:02 PM, [email protected] wrote:

I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid=“71dcea49-64c3-42d3-bac1-373f780fe2fd” keeps changing, so I need to modify the embed script part in HTML.

How to get bokeh_modelid=“XYZ” point to a fix string, so embed script doesn’t have to be modified each time animated script is restarted?


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/44a9c67b-70ac-4537-b921-6a64901c6725%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/1af24488-e988-44c5-b55f-7ceca63ece82%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 visithttps://groups.google.com/a/continuum.io/d/msgid/bokeh/CAM9Ly3HqbTn7mtL9PMjuySNPp9zDVH2UHbfADBbiORYBW_dUNw%40mail.gmail.com.

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/55b9490b-be6f-470c-b2c8-87bd006d62ca%40continuum.io.

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

maxicus,

there is a directory "session" in bokeh/ in site-packages that needs to be cleaned out. Remove it an things should work fine.

Bryan

···

On Jun 29, 2014, at 6:05 PM, [email protected] wrote:

Damian, thanks for the example. Unfortunately I am having issues installing bokeh-master branch next to 0.4.4. Getting "cannot import name Cloud" issue as described in
cannot import name Cloud · Issue #676 · bokeh/bokeh · GitHub

Will wait ill you release the 0.5 and then update. Many thanks!

On Monday, June 30, 2014 12:21:34 AM UTC+2, Damian Avila wrote:
Example about how to update it here: https://github.com/ContinuumIO/bokeh/blob/master/examples/embed/animated.py\.
Check lines 54-67

Hope it helps...

On Sun, Jun 29, 2014 at 7:20 PM, <[email protected]> wrote:
Thanks for explaining -- the fact that the new model is being created was somehow not so obvious. After reading documentation was under impression if plot docname is provided then it will just use existing storage. Now it's clearer what happens.
Would appreciate a sample how to pull an existing datasource object and then update it? or a link to documentation how to do it?

Many thanks for the replies again.

On Monday, June 30, 2014 12:04:03 AM UTC+2, Bryan Van de ven wrote:
All of that said, I think the problem is actually that you are re-running the animated.py code multiple times which will result in new plots and models getting stored to the server every time. That's why the id is changing. If the intent is to store and embed the plot once, then run a script that can update the data separately, then the data updating script will need to pull the existing datasource object down from the server then update it. This could probably be made easier, I will have to get back to you about the best way to do it, maybe we can write some convenience functions to help with this.

Bryan

On Jun 29, 2014, at 4:59 PM, Damian Avila <[email protected]> wrote:

> In fact, we have refactored all the embed stuff, and right now, in master, it is stronger and simpler than before...
> We are releasing the 0.5v in a few days, so you can try the new embed stuff using git master or you can try it using the nightly build.
> And for completeness, you have new examples about how to use the new API here: https://github.com/ContinuumIO/bokeh/tree/master/examples/embed
>
>
> On Sun, Jun 29, 2014 at 6:45 PM, <[email protected]> wrote:
> I am using current stable version 0.4.4. Embed code looks like below. Plot code Ipython notebook is from samples folder, attached.
> Thanks for looking into this!
>
> <html>
> <body>
> <h2>Simple Embed Example</h2>
> <p>Here is my plot:</p>
> <p>
> <script src="
> http://localhost:5006//bokeh/embed.js
> "
> bokeh_plottype="serverconn" bokeh_docid="3980adc2-f1c8-4207-906b-dde7d636ac82"
> bokeh_ws_conn_string="ws://localhost:5006/bokeh/sub"
> bokeh_docapikey="43274608-8c07-4d76-9d57-df2da7d14212"
> bokeh_root_url="
> http://localhost:5006/
> "
> bokeh_modelid="71dcea49-64c3-42d3-bac1-373f780fe2fd"
> bokeh_modeltype="Plot" async="true"></script>
> </p>
> </body>
> </html>
>
>
>
> On Sunday, June 29, 2014 11:39:48 PM UTC+2, Damian Avila wrote:
> How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.
>
>
> On Sun, Jun 29, 2014 at 6:02 PM, <[email protected]> wrote:
> I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid="71dcea49-64c3-42d3-bac1-373f780fe2fd" keeps changing, so I need to modify the embed script part in HTML.
>
> How to get bokeh_modelid="XYZ" point to a fix string, so embed script doesn't have to be modified each time animated script is restarted?
>
>
> --
> 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 bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
>
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/44a9c67b-70ac-4537-b921-6a64901c6725%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 bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/1af24488-e988-44c5-b55f-7ceca63ece82%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 bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visithttps://groups.google.com/a/continuum.io/d/msgid/bokeh/CAM9Ly3HqbTn7mtL9PMjuySNPp9zDVH2UHbfADBbiORYBW_dUNw%40mail.gmail.com.
> 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 bokeh+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/55b9490b-be6f-470c-b2c8-87bd006d62ca%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/80de740e-cfb0-4359-b8b7-6574f806c486%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Bryan,

thanks on re-iterating on this. Yes, having a way of pulling out an existing model id by document name would be nice feature to have.

As well a possibility to provide own model id or even better a possibility to “tell” the server to re-use the existing model if it exists for a given document.

Thanks for your work!

···

On Monday, June 30, 2014 12:14:24 AM UTC+2, Bryan Van de ven wrote:

This is actually really good to have brought up because it is a fairly obvious workflow use case that we managed to forget to make simple. Things we probably need:

  • a mechanism to hand-specify some id’s (possibly)

  • easier ways to get id’s of data sources, etc

  • convenience functions for pulling data sources down from the server for later updating

We should probably make a ticket for this.

maxicus, these things won’t be in the upcoming 0.5 release but hopefully a dev release shortly after. I will try to work up an example using the current interface that stores a plot, and then later in a different script updates, it in the next day or so.

Bryan

Damian,

this particular example works, since the plot nature itself is kind of stateless, but if I got a continuous line chart with data available incrementally? E.g. stock prices chart with the exchange( price provider) being closed overnight and prices being not available over that period.

What bothers me also a bit is the fact that HTML code is directly in the controller. For a lot of cases it will work, but if I got my own templates the old way with the JS embedded code seemed to be cleaner?

I have this use case in the head that I am trying to build – having N portfolios with stocks from all over the world. As the price server (python script) gets new prices I would like to have some charts siting on the bokeh server being updated. E.g. one is showing portfolios’ value development over time(SUM(PRICE*HOLDING) ). The other showing just stock weights within individual portfolio. The third one showing the world map and stock weights within each country. Interesting would be also to see a heat map showing portfolio stocks breakdown per industry. As new prices come in charts get updated. This would be a bomb sample for the financial industry. Could someone help me with this one? :slight_smile:

Thanks again for your time!

···

On Monday, June 30, 2014 12:21:34 AM UTC+2, Damian Avila wrote:

Example about how to update it here: https://github.com/ContinuumIO/bokeh/blob/master/examples/embed/animated.py.
Check lines 54-67

Hope it helps…

On Sun, Jun 29, 2014 at 7:20 PM, [email protected] wrote:

Thanks for explaining – the fact that the new model is being created was somehow not so obvious. After reading documentation was under impression if plot docname is provided then it will just use existing storage. Now it’s clearer what happens.
Would appreciate a sample how to pull an existing datasource object and then update it? or a link to documentation how to do it?

Many thanks for the replies again.

On Monday, June 30, 2014 12:04:03 AM UTC+2, Bryan Van de ven wrote:

All of that said, I think the problem is actually that you are re-running the animated.py code multiple times which will result in new plots and models getting stored to the server every time. That’s why the id is changing. If the intent is to store and embed the plot once, then run a script that can update the data separately, then the data updating script will need to pull the existing datasource object down from the server then update it. This could probably be made easier, I will have to get back to you about the best way to do it, maybe we can write some convenience functions to help with this.

Bryan

On Jun 29, 2014, at 4:59 PM, Damian Avila [email protected] wrote:

In fact, we have refactored all the embed stuff, and right now, in master, it is stronger and simpler than before…

We are releasing the 0.5v in a few days, so you can try the new embed stuff using git master or you can try it using the nightly build.

And for completeness, you have new examples about how to use the new API here: https://github.com/ContinuumIO/bokeh/tree/master/examples/embed

On Sun, Jun 29, 2014 at 6:45 PM, [email protected] wrote:

I am using current stable version 0.4.4. Embed code looks like below. Plot code Ipython notebook is from samples folder, attached.

Thanks for looking into this!

Simple Embed Example

Here is my plot:

On Sunday, June 29, 2014 11:39:48 PM UTC+2, Damian Avila wrote:

How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.

On Sun, Jun 29, 2014 at 6:02 PM, [email protected] wrote:

I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid=“71dcea49-64c3-42d3-bac1-373f780fe2fd” keeps changing, so I need to modify the embed script part in HTML.

How to get bokeh_modelid=“XYZ” point to a fix string, so embed script doesn’t have to be modified each time animated script is restarted?


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/44a9c67b-70ac-4537-b921-6a64901c6725%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/1af24488-e988-44c5-b55f-7ceca63ece82%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 visithttps://groups.google.com/a/continuum.io/d/msgid/bokeh/CAM9Ly3HqbTn7mtL9PMjuySNPp9zDVH2UHbfADBbiORYBW_dUNw%40mail.gmail.com.

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/55b9490b-be6f-470c-b2c8-87bd006d62ca%40continuum.io.

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

maxicus,

my apologies, we are working pretty furiously to get out the 0.5 release, I have not had a chance to work out a complete example for you. It's still on my TODO. :slight_smile: I did want to mention in the mean time if you are on the dev builds, I will point you at the output_server docstring implementation:

  https://github.com/ContinuumIO/bokeh/blob/master/bokeh/plotting.py#L94

So you could do something along the lines of:

output_server("mydoc")
# plotting commands here
save()

... later ...

output_server("mydoc")
sess = cursession()
doc = curdoc()
# pull the data source out of doc, this should be made easier
# update data
sess.push()

Bryan

···

On Jun 30, 2014, at 12:33 AM, [email protected] wrote:

Damian,

this particular example works, since the plot nature itself is kind of stateless, but if I got a continuous line chart with data available incrementally? E.g. stock prices chart with the exchange( price provider) being closed overnight and prices being not available over that period.
What bothers me also a bit is the fact that HTML code is directly in the controller. For a lot of cases it will work, but if I got my own templates the old way with the JS embedded code seemed to be cleaner?

I have this use case in the head that I am trying to build -- having N portfolios with stocks from all over the world. As the price server (python script) gets new prices I would like to have some charts siting on the bokeh server being updated. E.g. one is showing portfolios' value development over time(SUM(PRICE*HOLDING) ). The other showing just stock weights within individual portfolio. The third one showing the world map and stock weights within each country. Interesting would be also to see a heat map showing portfolio stocks breakdown per industry. As new prices come in charts get updated. This would be a bomb sample for the financial industry. Could someone help me with this one? :slight_smile:

Thanks again for your time!

On Monday, June 30, 2014 12:21:34 AM UTC+2, Damian Avila wrote:
Example about how to update it here: https://github.com/ContinuumIO/bokeh/blob/master/examples/embed/animated.py\.
Check lines 54-67

Hope it helps...

On Sun, Jun 29, 2014 at 7:20 PM, <[email protected]> wrote:
Thanks for explaining -- the fact that the new model is being created was somehow not so obvious. After reading documentation was under impression if plot docname is provided then it will just use existing storage. Now it's clearer what happens.
Would appreciate a sample how to pull an existing datasource object and then update it? or a link to documentation how to do it?

Many thanks for the replies again.

On Monday, June 30, 2014 12:04:03 AM UTC+2, Bryan Van de ven wrote:
All of that said, I think the problem is actually that you are re-running the animated.py code multiple times which will result in new plots and models getting stored to the server every time. That's why the id is changing. If the intent is to store and embed the plot once, then run a script that can update the data separately, then the data updating script will need to pull the existing datasource object down from the server then update it. This could probably be made easier, I will have to get back to you about the best way to do it, maybe we can write some convenience functions to help with this.

Bryan

On Jun 29, 2014, at 4:59 PM, Damian Avila <[email protected]> wrote:

> In fact, we have refactored all the embed stuff, and right now, in master, it is stronger and simpler than before...
> We are releasing the 0.5v in a few days, so you can try the new embed stuff using git master or you can try it using the nightly build.
> And for completeness, you have new examples about how to use the new API here: https://github.com/ContinuumIO/bokeh/tree/master/examples/embed
>
>
> On Sun, Jun 29, 2014 at 6:45 PM, <[email protected]> wrote:
> I am using current stable version 0.4.4. Embed code looks like below. Plot code Ipython notebook is from samples folder, attached.
> Thanks for looking into this!
>
> <html>
> <body>
> <h2>Simple Embed Example</h2>
> <p>Here is my plot:</p>
> <p>
> <script src="
> http://localhost:5006//bokeh/embed.js
> "
> bokeh_plottype="serverconn" bokeh_docid="3980adc2-f1c8-4207-906b-dde7d636ac82"
> bokeh_ws_conn_string="ws://localhost:5006/bokeh/sub"
> bokeh_docapikey="43274608-8c07-4d76-9d57-df2da7d14212"
> bokeh_root_url="
> http://localhost:5006/
> "
> bokeh_modelid="71dcea49-64c3-42d3-bac1-373f780fe2fd"
> bokeh_modeltype="Plot" async="true"></script>
> </p>
> </body>
> </html>
>
>
>
> On Sunday, June 29, 2014 11:39:48 PM UTC+2, Damian Avila wrote:
> How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.
>
>
> On Sun, Jun 29, 2014 at 6:02 PM, <[email protected]> wrote:
> I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid="71dcea49-64c3-42d3-bac1-373f780fe2fd" keeps changing, so I need to modify the embed script part in HTML.
>
> How to get bokeh_modelid="XYZ" point to a fix string, so embed script doesn't have to be modified each time animated script is restarted?
>
>
> --
> 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 bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
>
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/44a9c67b-70ac-4537-b921-6a64901c6725%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 bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/1af24488-e988-44c5-b55f-7ceca63ece82%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 bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visithttps://groups.google.com/a/continuum.io/d/msgid/bokeh/CAM9Ly3HqbTn7mtL9PMjuySNPp9zDVH2UHbfADBbiORYBW_dUNw%40mail.gmail.com.
> 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 bokeh+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/55b9490b-be6f-470c-b2c8-87bd006d62ca%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/0d58aba8-004c-489d-8d7c-c5ef3d180fe8%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Bryan,

appreciate your work, looking forward to the 0.5 release. I installed from git master, seeing some strange behaviour:

  • delete buttons to the right side of documents have disappeared?

  • output_notebook(url=“default”,docname=“Test212”,name=“Test212”) throws an exception

  • output_notebook() writes output only to the server and not to the IPython notebook itself. used to work in 0.4.4

  • output_server(“mydoc”) used within animated.py sample generates a document with all of the preview plots beneath.

It seems 5.0 still in the works?

···

On Thursday, July 3, 2014 6:37:29 PM UTC+2, Bryan Van de ven wrote:

maxicus,

my apologies, we are working pretty furiously to get out the 0.5 release, I have not had a chance to work out a complete example for you. It’s still on my TODO. :slight_smile: I did want to mention in the mean time if you are on the dev builds, I will point you at the output_server docstring implementation:

    [https://github.com/ContinuumIO/bokeh/blob/master/bokeh/plotting.py#L94](https://github.com/ContinuumIO/bokeh/blob/master/bokeh/plotting.py#L94)

So you could do something along the lines of:

output_server(“mydoc”)

plotting commands here

save()

… later …

output_server(“mydoc”)

sess = cursession()

doc = curdoc()

pull the data source out of doc, this should be made easier

update data

sess.push()

Bryan

On Jun 30, 2014, at 12:33 AM, [email protected] wrote:

Damian,

this particular example works, since the plot nature itself is kind of stateless, but if I got a continuous line chart with data available incrementally? E.g. stock prices chart with the exchange( price provider) being closed overnight and prices being not available over that period.

What bothers me also a bit is the fact that HTML code is directly in the controller. For a lot of cases it will work, but if I got my own templates the old way with the JS embedded code seemed to be cleaner?

I have this use case in the head that I am trying to build – having N portfolios with stocks from all over the world. As the price server (python script) gets new prices I would like to have some charts siting on the bokeh server being updated. E.g. one is showing portfolios’ value development over time(SUM(PRICE*HOLDING) ). The other showing just stock weights within individual portfolio. The third one showing the world map and stock weights within each country. Interesting would be also to see a heat map showing portfolio stocks breakdown per industry. As new prices come in charts get updated. This would be a bomb sample for the financial industry. Could someone help me with this one? :slight_smile:

Thanks again for your time!

On Monday, June 30, 2014 12:21:34 AM UTC+2, Damian Avila wrote:

Example about how to update it here: https://github.com/ContinuumIO/bokeh/blob/master/examples/embed/animated.py.

Check lines 54-67

Hope it helps…

On Sun, Jun 29, 2014 at 7:20 PM, [email protected] wrote:

Thanks for explaining – the fact that the new model is being created was somehow not so obvious. After reading documentation was under impression if plot docname is provided then it will just use existing storage. Now it’s clearer what happens.
Would appreciate a sample how to pull an existing datasource object and then update it? or a link to documentation how to do it?

Many thanks for the replies again.

On Monday, June 30, 2014 12:04:03 AM UTC+2, Bryan Van de ven wrote:

All of that said, I think the problem is actually that you are re-running the animated.py code multiple times which will result in new plots and models getting stored to the server every time. That’s why the id is changing. If the intent is to store and embed the plot once, then run a script that can update the data separately, then the data updating script will need to pull the existing datasource object down from the server then update it. This could probably be made easier, I will have to get back to you about the best way to do it, maybe we can write some convenience functions to help with this.

Bryan

On Jun 29, 2014, at 4:59 PM, Damian Avila [email protected] wrote:

In fact, we have refactored all the embed stuff, and right now, in master, it is stronger and simpler than before…
We are releasing the 0.5v in a few days, so you can try the new embed stuff using git master or you can try it using the nightly build.
And for completeness, you have new examples about how to use the new API here: https://github.com/ContinuumIO/bokeh/tree/master/examples/embed

On Sun, Jun 29, 2014 at 6:45 PM, [email protected] wrote:
I am using current stable version 0.4.4. Embed code looks like below. Plot code Ipython notebook is from samples folder, attached.
Thanks for looking into this!

Simple Embed Example

Here is my plot:

On Sunday, June 29, 2014 11:39:48 PM UTC+2, Damian Avila wrote:
How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.

On Sun, Jun 29, 2014 at 6:02 PM, [email protected] wrote:
I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid=“71dcea49-64c3-42d3-bac1-373f780fe2fd” keeps changing, so I need to modify the embed script part in HTML.

How to get bokeh_modelid=“XYZ” point to a fix string, so embed script doesn’t have to be modified each time animated script is restarted?


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/44a9c67b-70ac-4537-b921-6a64901c6725%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/1af24488-e988-44c5-b55f-7ceca63ece82%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 visithttps://groups.google.com/a/continuum.io/d/msgid/bokeh/CAM9Ly3HqbTn7mtL9PMjuySNPp9zDVH2UHbfADBbiORYBW_dUNw%40mail.gmail.com.
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/55b9490b-be6f-470c-b2c8-87bd006d62ca%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/0d58aba8-004c-489d-8d7c-c5ef3d180fe8%40continuum.io.

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

maxicus,

So, I just checked and I am seeing the trashcan/delete button on the server. Also I have been using the notebook all day. Can you provide any more details or complete examples?

Also did you setup.py install, or develop? If develop, can you verify that your old bokeh directory in site-packages is blown way? That will cause problems.

Bokeh 0.5 is slated for release on the 9th, we have several folks banging on it here without issues but if you are seeing problems I definitely want to get them resolved.

Thanks,

Bryan

···

On Jul 3, 2014, at 4:24 PM, [email protected] wrote:

Bryan,

appreciate your work, looking forward to the 0.5 release. I installed from git master, seeing some strange behaviour:
- delete buttons to the right side of documents have disappeared?
- output_notebook(url="default",docname="Test212",name="Test212") throws an exception
- output_notebook() writes output only to the server and not to the IPython notebook itself. used to work in 0.4.4
- output_server("mydoc") used within animated.py sample generates a document with all of the preview plots beneath.

It seems 5.0 still in the works?

On Thursday, July 3, 2014 6:37:29 PM UTC+2, Bryan Van de ven wrote:
maxicus,

my apologies, we are working pretty furiously to get out the 0.5 release, I have not had a chance to work out a complete example for you. It's still on my TODO. :slight_smile: I did want to mention in the mean time if you are on the dev builds, I will point you at the output_server docstring implementation:

        https://github.com/ContinuumIO/bokeh/blob/master/bokeh/plotting.py#L94

So you could do something along the lines of:

output_server("mydoc")
# plotting commands here
save()

... later ...

output_server("mydoc")
sess = cursession()
doc = curdoc()
# pull the data source out of doc, this should be made easier
# update data
sess.push()
  
Bryan

On Jun 30, 2014, at 12:33 AM, maxi...@gmail.com wrote:

> Damian,
>
> this particular example works, since the plot nature itself is kind of stateless, but if I got a continuous line chart with data available incrementally? E.g. stock prices chart with the exchange( price provider) being closed overnight and prices being not available over that period.
> What bothers me also a bit is the fact that HTML code is directly in the controller. For a lot of cases it will work, but if I got my own templates the old way with the JS embedded code seemed to be cleaner?
>
> I have this use case in the head that I am trying to build -- having N portfolios with stocks from all over the world. As the price server (python script) gets new prices I would like to have some charts siting on the bokeh server being updated. E.g. one is showing portfolios' value development over time(SUM(PRICE*HOLDING) ). The other showing just stock weights within individual portfolio. The third one showing the world map and stock weights within each country. Interesting would be also to see a heat map showing portfolio stocks breakdown per industry. As new prices come in charts get updated. This would be a bomb sample for the financial industry. Could someone help me with this one? :slight_smile:
>
> Thanks again for your time!
>
> On Monday, June 30, 2014 12:21:34 AM UTC+2, Damian Avila wrote:
> Example about how to update it here: https://github.com/ContinuumIO/bokeh/blob/master/examples/embed/animated.py\.
> Check lines 54-67
>
> Hope it helps...
>
>
> On Sun, Jun 29, 2014 at 7:20 PM, <[email protected]> wrote:
> Thanks for explaining -- the fact that the new model is being created was somehow not so obvious. After reading documentation was under impression if plot docname is provided then it will just use existing storage. Now it's clearer what happens.
> Would appreciate a sample how to pull an existing datasource object and then update it? or a link to documentation how to do it?
>
> Many thanks for the replies again.
>
> On Monday, June 30, 2014 12:04:03 AM UTC+2, Bryan Van de ven wrote:
> All of that said, I think the problem is actually that you are re-running the animated.py code multiple times which will result in new plots and models getting stored to the server every time. That's why the id is changing. If the intent is to store and embed the plot once, then run a script that can update the data separately, then the data updating script will need to pull the existing datasource object down from the server then update it. This could probably be made easier, I will have to get back to you about the best way to do it, maybe we can write some convenience functions to help with this.
>
> Bryan
>
> On Jun 29, 2014, at 4:59 PM, Damian Avila <[email protected]> wrote:
>
> > In fact, we have refactored all the embed stuff, and right now, in master, it is stronger and simpler than before...
> > We are releasing the 0.5v in a few days, so you can try the new embed stuff using git master or you can try it using the nightly build.
> > And for completeness, you have new examples about how to use the new API here: https://github.com/ContinuumIO/bokeh/tree/master/examples/embed
> >
> >
> > On Sun, Jun 29, 2014 at 6:45 PM, <[email protected]> wrote:
> > I am using current stable version 0.4.4. Embed code looks like below. Plot code Ipython notebook is from samples folder, attached.
> > Thanks for looking into this!
> >
> > <html>
> > <body>
> > <h2>Simple Embed Example</h2>
> > <p>Here is my plot:</p>
> > <p>
> > <script src="
> > http://localhost:5006//bokeh/embed.js
> > "
> > bokeh_plottype="serverconn" bokeh_docid="3980adc2-f1c8-4207-906b-dde7d636ac82"
> > bokeh_ws_conn_string="ws://localhost:5006/bokeh/sub"
> > bokeh_docapikey="43274608-8c07-4d76-9d57-df2da7d14212"
> > bokeh_root_url="
> > http://localhost:5006/
> > "
> > bokeh_modelid="71dcea49-64c3-42d3-bac1-373f780fe2fd"
> > bokeh_modeltype="Plot" async="true"></script>
> > </p>
> > </body>
> > </html>
> >
> >
> >
> > On Sunday, June 29, 2014 11:39:48 PM UTC+2, Damian Avila wrote:
> > How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.
> >
> >
> > On Sun, Jun 29, 2014 at 6:02 PM, <[email protected]> wrote:
> > I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid="71dcea49-64c3-42d3-bac1-373f780fe2fd" keeps changing, so I need to modify the embed script part in HTML.
> >
> > How to get bokeh_modelid="XYZ" point to a fix string, so embed script doesn't have to be modified each time animated script is restarted?
> >
> >
> > --
> > 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 bokeh+un...@continuum.io.
> > To post to this group, send email to bo...@continuum.io.
> >
> > To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/44a9c67b-70ac-4537-b921-6a64901c6725%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 bokeh+un...@continuum.io.
> > To post to this group, send email to bo...@continuum.io.
> > To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/1af24488-e988-44c5-b55f-7ceca63ece82%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 bokeh+un...@continuum.io.
> > To post to this group, send email to bo...@continuum.io.
> > To view this discussion on the web visithttps://groups.google.com/a/continuum.io/d/msgid/bokeh/CAM9Ly3HqbTn7mtL9PMjuySNPp9zDVH2UHbfADBbiORYBW_dUNw%40mail.gmail.com.
> > 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 bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/55b9490b-be6f-470c-b2c8-87bd006d62ca%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 bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/0d58aba8-004c-489d-8d7c-c5ef3d180fe8%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/05164c03-eba2-453a-948b-55bf8e7221b2%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Bryan,

guess, then it’s me, not able to install it properly… did the following:

  1. downloaded master from the git home (tried both download zip and git clone)

  2. did python setup.py install

  3. got all sort of errors about crossfilter missing, so deleted the /bokeh/ folder in /site-packages/ and moved /bokeh/ from master to /site-packages/, it started to work.

  4. using started animated.py sample from /examples/notebook/

  5. Getting “Error loading the abstract rendering package. To use the ar_downsample module, you must install the abstract rendering framework.” on bokeh startup. I am on OSX, latest anaconda build.

  6. Another observation – going to http://localhost:5006 throws an internal error, but http://localhost:5006/bokeh/ works fine. I think this worked ok in 0.4.4?

2014-07-03 23:48:38,497:INFO:bokeh.server.start:GET / 500 INTERNAL SERVER ERROR 412 2.2ms

2014-07-03 23:48:48,887:ERROR:bokeh.server:Exception on / [GET]

Traceback (most recent call last):

File “/Users/maxicus/anaconda/lib/python2.7/site-packages/flask/app.py”, line 1817, in wsgi_app

response = self.full_dispatch_request()

File “/Users/maxicus/anaconda/lib/python2.7/site-packages/flask/app.py”, line 1478, in full_dispatch_request

response = self.make_response(rv)

File “/Users/maxicus/anaconda/lib/python2.7/site-packages/flask/app.py”, line 1566, in make_response

raise ValueError(‘View function did not return a response’)

ValueError: View function did not return a response

2014-07-03 23:48:48,888:INFO:bokeh.server.start:GET / 500 INTERNAL SERVER ERROR 412 1.4ms

···

On Thursday, July 3, 2014 11:34:47 PM UTC+2, Bryan Van de ven wrote:

maxicus,

So, I just checked and I am seeing the trashcan/delete button on the server. Also I have been using the notebook all day. Can you provide any more details or complete examples?

Also did you setup.py install, or develop? If develop, can you verify that your old bokeh directory in site-packages is blown way? That will cause problems.

Bokeh 0.5 is slated for release on the 9th, we have several folks banging on it here without issues but if you are seeing problems I definitely want to get them resolved.

Thanks,

Bryan

On Jul 3, 2014, at 4:24 PM, [email protected] wrote:

Bryan,

appreciate your work, looking forward to the 0.5 release. I installed from git master, seeing some strange behaviour:

  • delete buttons to the right side of documents have disappeared?
  • output_notebook(url=“default”,docname=“Test212”,name=“Test212”) throws an exception
  • output_notebook() writes output only to the server and not to the IPython notebook itself. used to work in 0.4.4
  • output_server(“mydoc”) used within animated.py sample generates a document with all of the preview plots beneath.

It seems 5.0 still in the works?

On Thursday, July 3, 2014 6:37:29 PM UTC+2, Bryan Van de ven wrote:

maxicus,

my apologies, we are working pretty furiously to get out the 0.5 release, I have not had a chance to work out a complete example for you. It’s still on my TODO. :slight_smile: I did want to mention in the mean time if you are on the dev builds, I will point you at the output_server docstring implementation:

    [https://github.com/ContinuumIO/bokeh/blob/master/bokeh/plotting.py#L94](https://github.com/ContinuumIO/bokeh/blob/master/bokeh/plotting.py#L94)

So you could do something along the lines of:

output_server(“mydoc”)

plotting commands here

save()

… later …

output_server(“mydoc”)
sess = cursession()
doc = curdoc()

pull the data source out of doc, this should be made easier

update data

sess.push()

Bryan

On Jun 30, 2014, at 12:33 AM, [email protected] wrote:

Damian,

this particular example works, since the plot nature itself is kind of stateless, but if I got a continuous line chart with data available incrementally? E.g. stock prices chart with the exchange( price provider) being closed overnight and prices being not available over that period.
What bothers me also a bit is the fact that HTML code is directly in the controller. For a lot of cases it will work, but if I got my own templates the old way with the JS embedded code seemed to be cleaner?

I have this use case in the head that I am trying to build – having N portfolios with stocks from all over the world. As the price server (python script) gets new prices I would like to have some charts siting on the bokeh server being updated. E.g. one is showing portfolios’ value development over time(SUM(PRICE*HOLDING) ). The other showing just stock weights within individual portfolio. The third one showing the world map and stock weights within each country. Interesting would be also to see a heat map showing portfolio stocks breakdown per industry. As new prices come in charts get updated. This would be a bomb sample for the financial industry. Could someone help me with this one? :slight_smile:

Thanks again for your time!

On Monday, June 30, 2014 12:21:34 AM UTC+2, Damian Avila wrote:
Example about how to update it here: https://github.com/ContinuumIO/bokeh/blob/master/examples/embed/animated.py.
Check lines 54-67

Hope it helps…

On Sun, Jun 29, 2014 at 7:20 PM, [email protected] wrote:
Thanks for explaining – the fact that the new model is being created was somehow not so obvious. After reading documentation was under impression if plot docname is provided then it will just use existing storage. Now it’s clearer what happens.
Would appreciate a sample how to pull an existing datasource object and then update it? or a link to documentation how to do it?

Many thanks for the replies again.

On Monday, June 30, 2014 12:04:03 AM UTC+2, Bryan Van de ven wrote:
All of that said, I think the problem is actually that you are re-running the animated.py code multiple times which will result in new plots and models getting stored to the server every time. That’s why the id is changing. If the intent is to store and embed the plot once, then run a script that can update the data separately, then the data updating script will need to pull the existing datasource object down from the server then update it. This could probably be made easier, I will have to get back to you about the best way to do it, maybe we can write some convenience functions to help with this.

Bryan

On Jun 29, 2014, at 4:59 PM, Damian Avila [email protected] wrote:

In fact, we have refactored all the embed stuff, and right now, in master, it is stronger and simpler than before…
We are releasing the 0.5v in a few days, so you can try the new embed stuff using git master or you can try it using the nightly build.
And for completeness, you have new examples about how to use the new API here: https://github.com/ContinuumIO/bokeh/tree/master/examples/embed

On Sun, Jun 29, 2014 at 6:45 PM, [email protected] wrote:
I am using current stable version 0.4.4. Embed code looks like below. Plot code Ipython notebook is from samples folder, attached.
Thanks for looking into this!

Simple Embed Example

Here is my plot:

On Sunday, June 29, 2014 11:39:48 PM UTC+2, Damian Avila wrote:
How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.

On Sun, Jun 29, 2014 at 6:02 PM, [email protected] wrote:
I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid=“71dcea49-64c3-42d3-bac1-373f780fe2fd” keeps changing, so I need to modify the embed script part in HTML.

How to get bokeh_modelid=“XYZ” point to a fix string, so embed script doesn’t have to be modified each time animated script is restarted?


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/44a9c67b-70ac-4537-b921-6a64901c6725%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/1af24488-e988-44c5-b55f-7ceca63ece82%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 visithttps://groups.google.com/a/continuum.io/d/msgid/bokeh/CAM9Ly3HqbTn7mtL9PMjuySNPp9zDVH2UHbfADBbiORYBW_dUNw%40mail.gmail.com.
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/55b9490b-be6f-470c-b2c8-87bd006d62ca%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/0d58aba8-004c-489d-8d7c-c5ef3d180fe8%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/05164c03-eba2-453a-948b-55bf8e7221b2%40continuum.io.

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

maxicus,

A few notes:

* Abstract Rendering is an optional dependency. There was a short time when I think it popped up an error but it should not anymore.

* To run from master, you will have to rebuild the bokehjs JS library. If you can wait, I am going to upload some new dev build to binstar tonight so you could try out the latest, without having to do the js build yourself. There are install instructions in a recent mailing list post. If you would like to try and build the bokehjs yourself, there are instructions in the Dev Guide on bokeh.pydata.org

* I would suggest this: blow away bokeh in site-packages, then regular install (either setup.py or install dev build)

Bryan

···

On Jul 3, 2014, at 4:53 PM, [email protected] wrote:

Bryan,

guess, then it's me, not able to install it properly... did the following:
1) downloaded master from the git home (tried both download zip and git clone)
2) did python setup.py install
3) got all sort of errors about crossfilter missing, so deleted the /bokeh/ folder in /site-packages/ and moved /bokeh/ from master to /site-packages/, it started to work.
4) using started animated.py sample from /examples/notebook/
4) Getting "Error loading the abstract rendering package. To use the ar_downsample module, you must install the abstract rendering framework." on bokeh startup. I am on OSX, latest anaconda build.
5) Another observation -- going to http://localhost:5006 throws an internal error, but http://localhost:5006/bokeh/ works fine. I think this worked ok in 0.4.4?
2014-07-03 23:48:38,497:INFO:bokeh.server.start:GET / 500 INTERNAL SERVER ERROR 412 2.2ms
2014-07-03 23:48:48,887:ERROR:bokeh.server:Exception on / [GET]
Traceback (most recent call last):
  File "/Users/maxicus/anaconda/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/maxicus/anaconda/lib/python2.7/site-packages/flask/app.py", line 1478, in full_dispatch_request
    response = self.make_response(rv)
  File "/Users/maxicus/anaconda/lib/python2.7/site-packages/flask/app.py", line 1566, in make_response
    raise ValueError('View function did not return a response')
ValueError: View function did not return a response
2014-07-03 23:48:48,888:INFO:bokeh.server.start:GET / 500 INTERNAL SERVER ERROR 412 1.4ms

On Thursday, July 3, 2014 11:34:47 PM UTC+2, Bryan Van de ven wrote:
maxicus,

So, I just checked and I am seeing the trashcan/delete button on the server. Also I have been using the notebook all day. Can you provide any more details or complete examples?

Also did you setup.py install, or develop? If develop, can you verify that your old bokeh directory in site-packages is blown way? That will cause problems.

Bokeh 0.5 is slated for release on the 9th, we have several folks banging on it here without issues but if you are seeing problems I definitely want to get them resolved.

Thanks,

Bryan

On Jul 3, 2014, at 4:24 PM, maxi...@gmail.com wrote:

> Bryan,
>
> appreciate your work, looking forward to the 0.5 release. I installed from git master, seeing some strange behaviour:
> - delete buttons to the right side of documents have disappeared?
> - output_notebook(url="default",docname="Test212",name="Test212") throws an exception
> - output_notebook() writes output only to the server and not to the IPython notebook itself. used to work in 0.4.4
> - output_server("mydoc") used within animated.py sample generates a document with all of the preview plots beneath.
>
> It seems 5.0 still in the works?
>
>
> On Thursday, July 3, 2014 6:37:29 PM UTC+2, Bryan Van de ven wrote:
> maxicus,
>
> my apologies, we are working pretty furiously to get out the 0.5 release, I have not had a chance to work out a complete example for you. It's still on my TODO. :slight_smile: I did want to mention in the mean time if you are on the dev builds, I will point you at the output_server docstring implementation:
>
> https://github.com/ContinuumIO/bokeh/blob/master/bokeh/plotting.py#L94
>
> So you could do something along the lines of:
>
> output_server("mydoc")
> # plotting commands here
> save()
>
> ... later ...
>
> output_server("mydoc")
> sess = cursession()
> doc = curdoc()
> # pull the data source out of doc, this should be made easier
> # update data
> sess.push()
>
> Bryan
>
> On Jun 30, 2014, at 12:33 AM, maxi...@gmail.com wrote:
>
> > Damian,
> >
> > this particular example works, since the plot nature itself is kind of stateless, but if I got a continuous line chart with data available incrementally? E.g. stock prices chart with the exchange( price provider) being closed overnight and prices being not available over that period.
> > What bothers me also a bit is the fact that HTML code is directly in the controller. For a lot of cases it will work, but if I got my own templates the old way with the JS embedded code seemed to be cleaner?
> >
> > I have this use case in the head that I am trying to build -- having N portfolios with stocks from all over the world. As the price server (python script) gets new prices I would like to have some charts siting on the bokeh server being updated. E.g. one is showing portfolios' value development over time(SUM(PRICE*HOLDING) ). The other showing just stock weights within individual portfolio. The third one showing the world map and stock weights within each country. Interesting would be also to see a heat map showing portfolio stocks breakdown per industry. As new prices come in charts get updated. This would be a bomb sample for the financial industry. Could someone help me with this one? :slight_smile:
> >
> > Thanks again for your time!
> >
> > On Monday, June 30, 2014 12:21:34 AM UTC+2, Damian Avila wrote:
> > Example about how to update it here: https://github.com/ContinuumIO/bokeh/blob/master/examples/embed/animated.py\.
> > Check lines 54-67
> >
> > Hope it helps...
> >
> >
> > On Sun, Jun 29, 2014 at 7:20 PM, <[email protected]> wrote:
> > Thanks for explaining -- the fact that the new model is being created was somehow not so obvious. After reading documentation was under impression if plot docname is provided then it will just use existing storage. Now it's clearer what happens.
> > Would appreciate a sample how to pull an existing datasource object and then update it? or a link to documentation how to do it?
> >
> > Many thanks for the replies again.
> >
> > On Monday, June 30, 2014 12:04:03 AM UTC+2, Bryan Van de ven wrote:
> > All of that said, I think the problem is actually that you are re-running the animated.py code multiple times which will result in new plots and models getting stored to the server every time. That's why the id is changing. If the intent is to store and embed the plot once, then run a script that can update the data separately, then the data updating script will need to pull the existing datasource object down from the server then update it. This could probably be made easier, I will have to get back to you about the best way to do it, maybe we can write some convenience functions to help with this.
> >
> > Bryan
> >
> > On Jun 29, 2014, at 4:59 PM, Damian Avila <[email protected]> wrote:
> >
> > > In fact, we have refactored all the embed stuff, and right now, in master, it is stronger and simpler than before...
> > > We are releasing the 0.5v in a few days, so you can try the new embed stuff using git master or you can try it using the nightly build.
> > > And for completeness, you have new examples about how to use the new API here: https://github.com/ContinuumIO/bokeh/tree/master/examples/embed
> > >
> > >
> > > On Sun, Jun 29, 2014 at 6:45 PM, <[email protected]> wrote:
> > > I am using current stable version 0.4.4. Embed code looks like below. Plot code Ipython notebook is from samples folder, attached.
> > > Thanks for looking into this!
> > >
> > > <html>
> > > <body>
> > > <h2>Simple Embed Example</h2>
> > > <p>Here is my plot:</p>
> > > <p>
> > > <script src="
> > > http://localhost:5006//bokeh/embed.js
> > > "
> > > bokeh_plottype="serverconn" bokeh_docid="3980adc2-f1c8-4207-906b-dde7d636ac82"
> > > bokeh_ws_conn_string="ws://localhost:5006/bokeh/sub"
> > > bokeh_docapikey="43274608-8c07-4d76-9d57-df2da7d14212"
> > > bokeh_root_url="
> > > http://localhost:5006/
> > > "
> > > bokeh_modelid="71dcea49-64c3-42d3-bac1-373f780fe2fd"
> > > bokeh_modeltype="Plot" async="true"></script>
> > > </p>
> > > </body>
> > > </html>
> > >
> > >
> > >
> > > On Sunday, June 29, 2014 11:39:48 PM UTC+2, Damian Avila wrote:
> > > How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.
> > >
> > >
> > > On Sun, Jun 29, 2014 at 6:02 PM, <[email protected]> wrote:
> > > I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid="71dcea49-64c3-42d3-bac1-373f780fe2fd" keeps changing, so I need to modify the embed script part in HTML.
> > >
> > > How to get bokeh_modelid="XYZ" point to a fix string, so embed script doesn't have to be modified each time animated script is restarted?
> > >
> > >
> > > --
> > > 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 bokeh+un...@continuum.io.
> > > To post to this group, send email to bo...@continuum.io.
> > >
> > > To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/44a9c67b-70ac-4537-b921-6a64901c6725%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 bokeh+un...@continuum.io.
> > > To post to this group, send email to bo...@continuum.io.
> > > To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/1af24488-e988-44c5-b55f-7ceca63ece82%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 bokeh+un...@continuum.io.
> > > To post to this group, send email to bo...@continuum.io.
> > > To view this discussion on the web visithttps://groups.google.com/a/continuum.io/d/msgid/bokeh/CAM9Ly3HqbTn7mtL9PMjuySNPp9zDVH2UHbfADBbiORYBW_dUNw%40mail.gmail.com.
> > > 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 bokeh+un...@continuum.io.
> > To post to this group, send email to bo...@continuum.io.
> > To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/55b9490b-be6f-470c-b2c8-87bd006d62ca%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 bokeh+un...@continuum.io.
> > To post to this group, send email to bo...@continuum.io.
> > To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/0d58aba8-004c-489d-8d7c-c5ef3d180fe8%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 bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/05164c03-eba2-453a-948b-55bf8e7221b2%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/393a4bbe-c9dc-4ed0-a30a-ed1fb603bd81%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Bryan,

I’ve installed the 0.5 rc build out of binstar – seems to work fine.

Having a hard time getting saved document from the server and updating it.

Would appreciate greatly if you, guys, could prepare a sample on how to do this. e.g. a) create a line chart document if it doesn’t exist, add three points to it; b) if the document exists, fetch the plot and add another three points to it.

Many thanks for all the work!

···

On Thursday, July 3, 2014 6:37:29 PM UTC+2, Bryan Van de ven wrote:

maxicus,

my apologies, we are working pretty furiously to get out the 0.5 release, I have not had a chance to work out a complete example for you. It’s still on my TODO. :slight_smile: I did want to mention in the mean time if you are on the dev builds, I will point you at the output_server docstring implementation:

    [https://github.com/ContinuumIO/bokeh/blob/master/bokeh/plotting.py#L94](https://github.com/ContinuumIO/bokeh/blob/master/bokeh/plotting.py#L94)

So you could do something along the lines of:

output_server(“mydoc”)

plotting commands here

save()

… later …

output_server(“mydoc”)

sess = cursession()

doc = curdoc()

pull the data source out of doc, this should be made easier

update data

sess.push()

Bryan

On Jun 30, 2014, at 12:33 AM, [email protected] wrote:

Damian,

this particular example works, since the plot nature itself is kind of stateless, but if I got a continuous line chart with data available incrementally? E.g. stock prices chart with the exchange( price provider) being closed overnight and prices being not available over that period.

What bothers me also a bit is the fact that HTML code is directly in the controller. For a lot of cases it will work, but if I got my own templates the old way with the JS embedded code seemed to be cleaner?

I have this use case in the head that I am trying to build – having N portfolios with stocks from all over the world. As the price server (python script) gets new prices I would like to have some charts siting on the bokeh server being updated. E.g. one is showing portfolios’ value development over time(SUM(PRICE*HOLDING) ). The other showing just stock weights within individual portfolio. The third one showing the world map and stock weights within each country. Interesting would be also to see a heat map showing portfolio stocks breakdown per industry. As new prices come in charts get updated. This would be a bomb sample for the financial industry. Could someone help me with this one? :slight_smile:

Thanks again for your time!

On Monday, June 30, 2014 12:21:34 AM UTC+2, Damian Avila wrote:

Example about how to update it here: https://github.com/ContinuumIO/bokeh/blob/master/examples/embed/animated.py.

Check lines 54-67

Hope it helps…

On Sun, Jun 29, 2014 at 7:20 PM, [email protected] wrote:

Thanks for explaining – the fact that the new model is being created was somehow not so obvious. After reading documentation was under impression if plot docname is provided then it will just use existing storage. Now it’s clearer what happens.
Would appreciate a sample how to pull an existing datasource object and then update it? or a link to documentation how to do it?

Many thanks for the replies again.

On Monday, June 30, 2014 12:04:03 AM UTC+2, Bryan Van de ven wrote:

All of that said, I think the problem is actually that you are re-running the animated.py code multiple times which will result in new plots and models getting stored to the server every time. That’s why the id is changing. If the intent is to store and embed the plot once, then run a script that can update the data separately, then the data updating script will need to pull the existing datasource object down from the server then update it. This could probably be made easier, I will have to get back to you about the best way to do it, maybe we can write some convenience functions to help with this.

Bryan

On Jun 29, 2014, at 4:59 PM, Damian Avila [email protected] wrote:

In fact, we have refactored all the embed stuff, and right now, in master, it is stronger and simpler than before…
We are releasing the 0.5v in a few days, so you can try the new embed stuff using git master or you can try it using the nightly build.
And for completeness, you have new examples about how to use the new API here: https://github.com/ContinuumIO/bokeh/tree/master/examples/embed

On Sun, Jun 29, 2014 at 6:45 PM, [email protected] wrote:
I am using current stable version 0.4.4. Embed code looks like below. Plot code Ipython notebook is from samples folder, attached.
Thanks for looking into this!

Simple Embed Example

Here is my plot:

On Sunday, June 29, 2014 11:39:48 PM UTC+2, Damian Avila wrote:
How are you embedding the plot? Are you using the new API, I mean, which Bokeh version are you using? Finally, can you post or link the example? Thanks.

On Sun, Jun 29, 2014 at 6:02 PM, [email protected] wrote:
I have embedded animated plot sample into a web page, that works fine. After restarting the animated.py plot script the bokeh_modelid=“71dcea49-64c3-42d3-bac1-373f780fe2fd” keeps changing, so I need to modify the embed script part in HTML.

How to get bokeh_modelid=“XYZ” point to a fix string, so embed script doesn’t have to be modified each time animated script is restarted?


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/44a9c67b-70ac-4537-b921-6a64901c6725%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/1af24488-e988-44c5-b55f-7ceca63ece82%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 visithttps://groups.google.com/a/continuum.io/d/msgid/bokeh/CAM9Ly3HqbTn7mtL9PMjuySNPp9zDVH2UHbfADBbiORYBW_dUNw%40mail.gmail.com.
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/55b9490b-be6f-470c-b2c8-87bd006d62ca%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/0d58aba8-004c-489d-8d7c-c5ef3d180fe8%40continuum.io.

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