Bokeh - Higher level steps needed to present a bokeh patch on a personal website?
This is my project: I want to automatically run a python script every day that will pull and transform personal data (I have a SQL database that gets updates daily). Then I want to use Bokeh to post an updated interactive render to a personal website (which I haven't created yet). I'm a complete noob when it comes to website development, so I'm looking for a higher level guide to help me fill in the details more easily.
I was hoping that someone could explain to me, at a higher level, the steps I need to take to implement this plan. I have a remote computer that is always connected to the internet and a SQL database. I thought:
- On the remote machine, set up the ETL python script (run automatically every day with a cron job)
- On the remote computer, write the Bokeh code that generates the desired rendering based on the data from step 1.
- Setting up a personal website using a web host
- ?
How do I push the bokeh visualization and refreshed (updated daily) data to My Site?
source to share
There are many different options, depending on whether you will be running your own server or simply deploying static pages. If I understand your question, it looks like you are going to deploy static files to a web host. There are several options for this.
If you are happy with the standard Bokeh HTML template:
-
create your plot using output_file and save ()
-
Download this .html file to your web host and link to it however you like
-
re-create and upload the resulting .html file to your web host periodically
If you want to embed the plot in your own HTML with more control:
-
Use bokeh.embed.autoload_static to create a my_plot.js file that contains all the information for your plot. Docs here: http://bokeh.pydata.org/en/latest/docs/user_guide/embedding.html#static-data
-
Download my_plot.js to your host and add the appropriate link to my_plot.js in static HTML
-
restart autoload_static periodically to create a new graph JS file and upload it to your web host to replace the old version
source to share