It was announced on the Datacamp Bokeh course that Anaconda Cloud can serve bokeh code without any complicated installment issues. However, my knowledge regarding Anaconda is unsufficient to achieve this.
My problem is as follows:
Starting point: - I have a piece of Python code for an interactive Bokeh plot
Desired Endpoint: - I want to host the code on Anaconda Cloud so that external users can access the plot through their browser without having to install python.
My main question is, Is there currently an easy 'for dummies' tutorial on how to go from the starting point to the endpoint?
My current understanding of anaconda to fully understand which steps I have to take and which parts of the Anaconda/Bokeh documentation I need to achieve my goal.
Example code was taken from:
http://docs.bokeh.org/en/latest/docs/user_guide/server.html
Oh this is nice, anaconda cloud can display your jupyter
notebooks, and if you put some interactive bokeh
code in them, that part will work great. The notebook will not be interactive, meaning python or whatever other language your notebook is written on will not run, but its cool that html
with embedded JS
code does. Here is a working example from a code I just uploaded to anaconda cloud: https://anaconda.org/pmreyes2/my_bokeh_interactive_code/notebook
The steps that I follow to do that are similar to what @Steven C. Howell writes in his answer:
Note: This is only for viewing it. An html version of it is created just for viewing it, not for running it. But the cool thing is that if it contains bokeh code, it will run as the example I provide: https://anaconda.org/pmreyes2/my_bokeh_interactive_code/notebook
UPDATE
I would also like to mention that the same feature of sharing jupyter notebooks where the bokeh interactive code is alive, can be done using jupyter nbviewer to your GitHub repository. Here the same example shared in anaconda cloud, also in jupyter nbviewer from my GitHub repository: https://nbviewer.jupyter.org/github/pmreyes2/my_jupyter_notebooks/blob/master/My_Bokeh_Interactive_code.ipynb
I doubt Anaconda Cloud is setup to run bokeh server as this would require an active Python backend to update calculations then send the new data to the server. It definitely can host interactive bokeh plots. I have a few examples in this notebook (note that bokeh server would be required for the interactive datashader plots to update when zooming).
You can review the Anaconda Cloud documentation to better understand how to accomplish different tasks using Anaconda Cloud, but here is a consolidated list of the required steps to upload a Jupyter notebook, which in your case should contain bokeh plots:
Install anaconda-client
using one of the following commands:
conda install anaconda-client
pip install anaconda-client
pip install git+https://github.com/Anaconda-Server/anaconda-client
Login to anaconda-client
using your Anaconda Cloud credentials
anaconda login
Install jupyter
conda install jupyter
Create a Jupyter notebook containing the code to your bokeh plot
jupyter notebook interesting_bokeh_plots.ipynb
Upload any notebook containing a rendered bokeh plot
anaconda upload interesting_bokeh_plots.ipynb
All these commands should be executed on the command line, and require the anaconda bin/
directory to be in your $PATH
(getting help with these steps would be a separate question).
Arjun, I would post this question on the https://groups.google.com/a/continuum.io/forum/#!forum/bokeh forum. Bryan Van de ven who made the Anaconda Cloud reference on the Bokeh data camp course is active on that forum (as a core contributor to Bokeh).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With