python - How to embed interactive bokeh plots in a HTML/php site -


i have container website i'd embed interactive bokeh plot. start bokeh server ran bokeh serve scripts/test.py --port 5010 --host ip-address-of-my-server:5010 in server shell.

i have 2 questions:

  • if navigate ip-address-of-my-server:5010/test, connection times out , don't see anything. assume there's wrong py-file. locally, run

    p = make_figure() show(p) 

    on server tried

    p = make_figure() curdoc().add_root(p) 

    is correct way graph display?

  • if have graph, how integrate site? have site called "visualizations". want visitors go site, see embedded bokeh plot , able press buttons , have personal graph change little. literally, code (php? js?) have write see graph? or should iframe?

i'm running digital ocean droplet lamp preinstalled on ubuntu 16.04, bokeh 0.12.4, python 2.7.


Comments