plotly / plotlyhtmlexporter

Plotly friendly, Jupyter Notebook HTML Exporter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PlotlyHTMLExporter

Plotly friendly, Jupyter Notebook HTML Exporter.

NBConvert is a module to convert Jupyter Notebooks to other formats (pdf, html etc.). It supplies HTMLExporter which is used to convert Jupyter Notebooks to html.

PlotlyHTMLExporter is a custom Exporter derived from HTMLExporter. It sanitizes the JS/HTML present in output cells, but keeps the trusted plotly.js output intact, thus allowing the plotly charts to be rendered in the resulting html.

Installation:

Using pip:

$ pip install plotlyhtmlexporter

From Source:

$ git clone https://github.com/plotly/plotlyhtmlexporter
$ cd plotlyhtmlexporter
$ python setup.py install

Usage:

From Command Line (with NBConvert):

$ jupyter nbconvert --to plotlyhtml mynotebook.ipynb

From the Python interpreter:

>>> import nbformat
>>> nb = nbformat.read('mynotebook.ipynb', 4)
>>> from plotlyhtmlexporter import PlotlyHTMLExporter
>>> exp = PlotlyHTMLExporter()
>>> body, resources = exp.from_notebook_node(nb)

License: MIT

About

Plotly friendly, Jupyter Notebook HTML Exporter.

License:MIT License


Languages

Language:HTML 96.0%Language:Python 2.0%Language:Jupyter Notebook 1.4%Language:Smarty 0.5%