Jupyter subcommand to export interactive HTML pages
Project description
nbinteract
=================
[![Read the Docs](https://img.shields.io/badge/docs-gitbook-green.svg)][docs]
[![PyPI](https://img.shields.io/pypi/v/nbinteract.svg)](https://pypi.python.org/pypi/nbinteract/0.0.10)
[![npm](https://img.shields.io/npm/v/nbinteract.svg)](https://www.npmjs.com/package/nbinteract)
nbinteract is a tool to convert Jupyter Notebooks to interactive webpages. It
allows notebooks that use [ipywidgets][] or [bqplot][] to be hosted online as
HTML pages for anyone to view and interact with.
## Demo
![nbinteract](https://user-images.githubusercontent.com/2468904/34280356-01a147a2-e66c-11e7-8c81-6e06b5445e38.gif)
[Click this link to view live.][demo]
## Motivation
Making interactive webpages is challenging since it requires deep knowledge of
web technologies and especially Javascript. Python developers/data scientists
might not have this skillset but can create interactive demos in a Jupyter
notebook through [Jupyter widgets][widgets]. Unfortunately, sharing these
interactive demos requires other users to download the notebook and run a
notebook server on their own machines.
nbinteract allows users to author a notebook using widgets and convert it to an
HTML page that still retains interactivity. These pages can then be hosted
online using, for example, [Github Pages][gh-pages] or [Gitbook][gitbook].
## Getting Started
To install the package, you must first have
[Jupyter Notebook installed][install-nb]. Then, run:
```
pip install nbinteract
```
Navigate to a folder containing notebooks you'd like to convert, then run:
```
jupyter nbconvert --to interact YOUR_NOTEBOOK.ipynb
```
Replace `YOUR_NOTEBOOK.ipynb` with the name of your notebook file. You will now
have an HTML file in the same directory. You can open that HTML file in your
browser and interact with widgets there.
## Documentation
[Here's a link to the documentation for this project.][docs]
## Developer Install
If you are interested in developing this project locally, run the following:
```
git clone https://github.com/SamLau95/nbinteract
cd nbinteract
# Installs the nbconvert exporter
pip install -e .
# To export a notebook to interactive HTML format:
jupyter nbconvert --to interact notebooks/Test.ipynb
pip install -U ipywidgets
jupyter nbextension enable --py --sys-prefix widgetsnbextension
brew install yarn
yarn install
# Start notebook and webpack servers
make -j2 serve
```
[demo]: https://samlau95.gitbooks.io/nbinteract/content/examples/Correlation.html
[ipywidgets]: https://github.com/jupyter-widgets/ipywidgets
[bqplot]: https://github.com/bloomberg/bqplot
[widgets]: http://jupyter.org/widgets.html
[gh-pages]: https://pages.github.com/
[gitbook]: http://gitbook.com/
[install-nb]: http://jupyter.readthedocs.io/en/latest/install.html
[docs]: https://samlau95.gitbooks.io/nbinteract/content/
=================
[![Read the Docs](https://img.shields.io/badge/docs-gitbook-green.svg)][docs]
[![PyPI](https://img.shields.io/pypi/v/nbinteract.svg)](https://pypi.python.org/pypi/nbinteract/0.0.10)
[![npm](https://img.shields.io/npm/v/nbinteract.svg)](https://www.npmjs.com/package/nbinteract)
nbinteract is a tool to convert Jupyter Notebooks to interactive webpages. It
allows notebooks that use [ipywidgets][] or [bqplot][] to be hosted online as
HTML pages for anyone to view and interact with.
## Demo
![nbinteract](https://user-images.githubusercontent.com/2468904/34280356-01a147a2-e66c-11e7-8c81-6e06b5445e38.gif)
[Click this link to view live.][demo]
## Motivation
Making interactive webpages is challenging since it requires deep knowledge of
web technologies and especially Javascript. Python developers/data scientists
might not have this skillset but can create interactive demos in a Jupyter
notebook through [Jupyter widgets][widgets]. Unfortunately, sharing these
interactive demos requires other users to download the notebook and run a
notebook server on their own machines.
nbinteract allows users to author a notebook using widgets and convert it to an
HTML page that still retains interactivity. These pages can then be hosted
online using, for example, [Github Pages][gh-pages] or [Gitbook][gitbook].
## Getting Started
To install the package, you must first have
[Jupyter Notebook installed][install-nb]. Then, run:
```
pip install nbinteract
```
Navigate to a folder containing notebooks you'd like to convert, then run:
```
jupyter nbconvert --to interact YOUR_NOTEBOOK.ipynb
```
Replace `YOUR_NOTEBOOK.ipynb` with the name of your notebook file. You will now
have an HTML file in the same directory. You can open that HTML file in your
browser and interact with widgets there.
## Documentation
[Here's a link to the documentation for this project.][docs]
## Developer Install
If you are interested in developing this project locally, run the following:
```
git clone https://github.com/SamLau95/nbinteract
cd nbinteract
# Installs the nbconvert exporter
pip install -e .
# To export a notebook to interactive HTML format:
jupyter nbconvert --to interact notebooks/Test.ipynb
pip install -U ipywidgets
jupyter nbextension enable --py --sys-prefix widgetsnbextension
brew install yarn
yarn install
# Start notebook and webpack servers
make -j2 serve
```
[demo]: https://samlau95.gitbooks.io/nbinteract/content/examples/Correlation.html
[ipywidgets]: https://github.com/jupyter-widgets/ipywidgets
[bqplot]: https://github.com/bloomberg/bqplot
[widgets]: http://jupyter.org/widgets.html
[gh-pages]: https://pages.github.com/
[gitbook]: http://gitbook.com/
[install-nb]: http://jupyter.readthedocs.io/en/latest/install.html
[docs]: https://samlau95.gitbooks.io/nbinteract/content/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for nbinteract-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cd3d7111c7a6b4fb175c6ad215ec00c914956911124e5227060b423085f8f5f |
|
MD5 | 05b999e4c4f6b5457999fd33f6bfa421 |
|
BLAKE2b-256 | 564ea97a0bad108fe765027344b805d0e5e9f285ed600f7a8050da1ef56babf6 |