bokeh

how can a bokeh server access arguments from server_document()

不想你离开。 提交于 2020-07-07 09:09:59
问题 I have a flask app which talks to a bokeh server. I want to pass arguments to the bokeh server so that the bokeh server can use that information to display things differently. Here's my flask route, complete with how I'm attempting to pass arguments to bokeh: @app.route('/test') def test(): return render_template( 'bokeh.html', template='Flask', script=server_document( url='http://localhost:6001/test', arguments={'foo': 'bar'} )) I think I'm passing the arguments correctly but I don't know

how can a bokeh server access arguments from server_document()

跟風遠走 提交于 2020-07-07 09:06:05
问题 I have a flask app which talks to a bokeh server. I want to pass arguments to the bokeh server so that the bokeh server can use that information to display things differently. Here's my flask route, complete with how I'm attempting to pass arguments to bokeh: @app.route('/test') def test(): return render_template( 'bokeh.html', template='Flask', script=server_document( url='http://localhost:6001/test', arguments={'foo': 'bar'} )) I think I'm passing the arguments correctly but I don't know

Saving Bokeh dashdoard (standalone) with all the data made inside

眉间皱痕 提交于 2020-05-27 12:08:11
问题 Is there any method to save Bokeh dashboard after editing it? For example, I've loaded my dashboard, created some plots and saved them (last tab). And then I want to save my "progress" to .html-file so that I wouldn't have to do all of this again every time after initializing my script. This is the screenshot of my dashboard: Thank you! 回答1: So the solution is: 1 Convert your bokeh-document (your whole dashboard) to .json and download it as a file. For example, you do it by clicking a button.

How to import external javascript library into Bokeh generated html

一笑奈何 提交于 2020-05-27 06:23:08
问题 I would like to make use of a javascript library (specifically this one) in my Bokeh javascript callback. How can I specify importing of this javascript library such that the library is accessible from Bokeh's js callback functions? The examples at: https://docs.bokeh.org/en/latest/docs/user_guide/extensions.html mainly talk about creating a custom Bokeh Model. I am not particularly interested in creating a new Model, just want to use the library functions in a callback to modify the data

How to import external javascript library into Bokeh generated html

笑着哭i 提交于 2020-05-27 06:21:09
问题 I would like to make use of a javascript library (specifically this one) in my Bokeh javascript callback. How can I specify importing of this javascript library such that the library is accessible from Bokeh's js callback functions? The examples at: https://docs.bokeh.org/en/latest/docs/user_guide/extensions.html mainly talk about creating a custom Bokeh Model. I am not particularly interested in creating a new Model, just want to use the library functions in a callback to modify the data

Python bokeh slider not refreshing plot

杀马特。学长 韩版系。学妹 提交于 2020-05-18 01:47:05
问题 I am creating a bokeh plot with a slider to refresh plot accordingly. There are 2 issues with the code posted. 1. The plot is not refreshed as per the slider. Please help in providing a fix for this issue. 2. Plot is not displayed with curdoc() when bokeh serve --show fn.ipynb is used I'm trying to visualise this CSV file. import pandas as pd import numpy as np from bokeh.models import ColumnDataSource, CategoricalColorMapper, HoverTool, Slider from bokeh.plotting import figure, curdoc from

bokeh 2.0 Dropdown missing value attribute

余生颓废 提交于 2020-05-17 09:07:07
问题 bokeh 1.4.0 >>> import bokeh >>> bokeh.__version__ '1.4.0' >>> from bokeh.models import Dropdown >>> Dropdown().value is None True bokeh 2.0 >>> import bokeh >>> bokeh.__version__ '2.0.0' >>> from bokeh.models import Dropdown >>> Dropdown().value is None Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'Dropdown' object has no attribute 'value' Is there another attribute that is meant to be used now in place of value? see here for a use-case of the value

Asynchronous Streaming To Embedded Bokeh Server

怎甘沉沦 提交于 2020-05-14 07:09:30
问题 The question: My python application starts a Bokeh server a described in this article: http://matthewrocklin.com/blog/work/2017/06/28/simple-bokeh-server now, I want to visualize streaming data, which is generated in the python application, which started the bokeh server and push it a asynchronously to my bokeh visualization. Is this possible? How? 回答1: Yes it is possible. I think the best option is to have a separate thread that fills the data-bucket and on the other side the Bokeh periodic

Bokeh histogram will not plot

对着背影说爱祢 提交于 2020-05-13 11:58:34
问题 My issue seems exactly like this post (albeit column types may be different): Cannot plot Histogram on Ubuntu 14.04 The code is straight out of the docs http://docs.bokeh.org/en/0.10.0/docs/user_guide/charts.html#histograms I couldn't comment on that post so needed to ask again if a solution was found... My system is SUSE. Just trying to plot a simple histogram of datetimes from a pandas df series. >>>df ACQ_DATE 0 2017-01-28 1 2017-01-28 ... ... 456365 2017-07-25 456366 2017-07-25 >>>hist =

Bokeh histogram will not plot

吃可爱长大的小学妹 提交于 2020-05-13 11:57:29
问题 My issue seems exactly like this post (albeit column types may be different): Cannot plot Histogram on Ubuntu 14.04 The code is straight out of the docs http://docs.bokeh.org/en/0.10.0/docs/user_guide/charts.html#histograms I couldn't comment on that post so needed to ask again if a solution was found... My system is SUSE. Just trying to plot a simple histogram of datetimes from a pandas df series. >>>df ACQ_DATE 0 2017-01-28 1 2017-01-28 ... ... 456365 2017-07-25 456366 2017-07-25 >>>hist =