Embedding interactive Bokeh or Plotly figures in Github-hosted site
bokeh, github, jupyter-notebook, plotly, python
Solution
GitHub scrubs all user-supplied JavaScript from content that it renders. This means JavaSript-based browser plotting libraries cannot function at all in pages rendered directly by GitHub.
However, you can point https://nbviewer.jupyter.org/ at a GitHub repo, and any statically rendered notebooks in the repo will fully function, including plots. See, e.g. the notebooks in
https://nbviewer.jupyter.org/github/bokeh/bokeh-notebooks/blob/master/index.ipynb
Another option is to opeb notebooks in GitHub repos in MyBinder, which provides live, actually running notebooks that can be interacted with. E.g.
https://mybinder.org/v2/gh/bokeh/bokeh-notebooks/master?filepath=tutorial%2F00%20-%20Introduction%20and%20Setup.ipynb
Problem
Does anyone have experience embedding interactive plots in a Github-hosted site? I've read that github won't render interactive plots from Bokeh, Plotly, etc., but then other sites seem to be able to? Ideally, what I would like to do is upload a Jupyter notebook containing these plots, and have them show up on my github blog. For some reason though, they won't render while everything else looks fine. Thanks!