Hosting interactive Bokeh plots independent of the Bokeh server - python

I have created a Bokeh Document that currently hosts two plots. The first employs two widgets that control a barchart while the other is a standalone choropleth map. Using the Bokeh server, the plots are completely interactive and dropdown and button widgets are able to dynamically update the source data and sort barchart respectively, but I am trying to share this Document with colleagues that simply want to visualize these data in the same fashion on a web page independent of the Bokeh server.
Is this possible?
Thanks in advance!

Related

"Self-hosting" interactive plotly graph in GitHub pages without Plotly account?

Context
Based on the Plotly descriptions it seems one can self-host plotly and the dash. However, I did not find an MWE to "self-host" plotly inside a GitHub pages website. (To reduce the number of accounts used in such a visualisation (from 2; 1 for GitHub 1 for Plotly, to just one for GitHub)).
Note
"Self-hosted" is in quotations because hosting a page on GitHub is not self-hosting, however, often one can take a self-hosted webpage and host it on GitHub pages. I assume if one can host plotly on GitHub pages, one can also self-host it. And my first approach would consist of simply pushing the self-hosted website with an interactive plotly graph, to GitHub pages. I did not yet find an MWE for this.
Question
How can one host an interactive plotly graph with a slider, inside a GitHub pages website without Plotly account?
Example
This is an example of an interactive Plotly graph with a slider:

How do I post Python generated GFS plots on my website?

I have a Python script that ingests GFS model data and plots it using matplotlib. How do I get those exact plots to display on a website? I am currently using PythonAnywhere to build my webpage.
It looks like Python Anywhere has a variety of options for how you can host your website/web application--so the details of how to do this will depend on how you are hosting your site.
One option is Flask, and I'll just point you to Matplotlib's example on embedding Matplotlib within Flask.
Another option is to generate the plots statically somewhere, and then upload them into your static website content. I'm not sure how exactly one one would go about that with Python Anywhere.

Restrict the number of rows displayed in DataTable on Bokeh Server

I have a Bokeh application, accessed through the command prompt using bokeh serve --show my_app.
On one of the tabs, there is a DataTable widget displaying millions of rows, which makes the page choppy and unresponsive.
Is there any way to restrict the number of rows that are displayed in a DataTable without explicitly restricting the data source behind it? It's important that the user is able to sort the DataTable and see the extremities of the full dataset.
The Bokeh CDSView is probably what you are after (see Filtering Data section)

Real time charting with Plotly and Flask?

I need to add a real-time chart to my Flask-SocketIO app, for that i found Plotly.
Would it be possible with Plotly to generate a chart which shows both real-time data and past data? When the user opens the page he should be able to see both the data from before the webpage was opened and the new data. How would it be possible to accomplish that with Plotly? Is there an example for it?
For this kind of apps it's highly recommended to feed your real time data to a database and connect your visualization with said database, however I think it is possible to achieve what you want in jupyter notebook with plotly 3 FigureWidget's batch_update. I can't quite get the idea of what you want without some code though.

How to draw an html table using bokeh?

I am new to bokeh, I search for examples in the documentation but it appears to me there is not in built method for creating tables. I have some data that I want to show in tabular format. I was wondering what is the easiest way to do that using Bokeh?
The reason I want to draw tables using Bokeh is because I am trying to put a table and two bar charts in the same html report. I was hoping to use one library(Bokeh) to do all my drawing because otherwise I will have to generate table using html generator and then add the html for bar chart generated via Bokeh to that. Hope that explains.
There's no built-in support to create an HTML table as of Bokeh 0.9.1, however it is very simple to embed Bokeh plots and widgets inside your own custom HTML templates. For instance, the new spectrogram shows a very customized HTML document with Bokeh plots and widgets embedded:
https://www.youtube.com/watch?v=L6p7Cd3uDis
So, I would recommend taking this approach. The documentation for embedding is located here:
http://docs.bokeh.org/en/latest/docs/user_guide/embed.html

Categories