Hi,
I am trying to adapt the bokeh + data shader app packaged with
datashader-examples to a custom implementation.
The app needs to run alongside some other apps I have that are run
in “directory” format because they have to be wrapped in a bunch of custom
HTML and CSS, which is most convenient in the directory form, e.g.:
bokeh serve —show dashboard
However, the dashboard example as given uses a tornado server (relevant code below):
python dashboard.py
and I cannot see how this could be adapted to directory form, especially since
the example uses the server itself to serve the datashader layer.
So, is it even possible to adapt this example to a standalone server / directory
implementation? Or should I be attempting to incorporate my custom HTML / css
formatting in a different fashion?
Thanks
JT
if name == ‘main’:
def add_roots(doc):
model = AppState(False) # argument = "outofcore" = False by default
view = AppView(model)
GetDataset.model = model # GetDataset.model has type "AppState"
curdoc().add_root(view.layout) # view.layout has type "Row"
app = Application(FunctionHandler(add_roots))
io_loop = IOLoop.current()
server = Server({'/': app}, io_loop=io_loop, extra_patterns=[('/datashader', GetDataset)], port=5006)
server.start()
io_loop.add_callback(server.show, "/")
io_loop.start()
I’m not sure about the specific question you are asking, but there is an example of using datashader with a directory-style Bokeh app with an HTML/CSS template at: https://github.com/ioam/jupytercon2017-holoviews-tutorial/tree/master/notebooks/apps/nyc_taxi
···
On Mon, Nov 6, 2017 at 6:04 PM, Jason Tumlinson [email protected] wrote:
Hi,
I am trying to adapt the bokeh + data shader app packaged with
datashader-examples to a custom implementation.
The app needs to run alongside some other apps I have that are run
in “directory” format because they have to be wrapped in a bunch of custom
HTML and CSS, which is most convenient in the directory form, e.g.:
bokeh serve —show dashboard
However, the dashboard example as given uses a tornado server (relevant code below):
python dashboard.py
and I cannot see how this could be adapted to directory form, especially since
the example uses the server itself to serve the datashader layer.
So, is it even possible to adapt this example to a standalone server / directory
implementation? Or should I be attempting to incorporate my custom HTML / css
formatting in a different fashion?
Thanks
JT
if name == ‘main’:
def add_roots(doc):
model = AppState(False) # argument = "outofcore" = False by default
view = AppView(model)
GetDataset.model = model # GetDataset.model has type "AppState"
curdoc().add_root(view.layout) # view.layout has type "Row"
app = Application(FunctionHandler(add_roots))
io_loop = IOLoop.current()
server = Server({'/': app}, io_loop=io_loop, extra_patterns=[('/datashader', GetDataset)], port=5006)
server.start()
io_loop.add_callback(server.show, "/")
io_loop.start()
–
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/BE6B44A2-70D8-4E4E-98E7-EB522864A22F%40gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.