A Living with Machines repository for code underlying a blogpost about how to put a D3 JavaScript visualisation in a Python Jupyter notebook. The blogpost text is duplicated in blogpost.md
.
Try the notebook live on myBinder.org:
Clone the repository:
$ git clone https://github.com/Living-with-machines/D3_JS_viz_in_a_Python_Jupyter_notebook
...
Navigate into the directory:
$ cd D3_JS_viz_in_a_Python_Jupyter_notebook
Set up all the dependencies:
$ conda create --name d3forJupyter --file requirements.txt
...
Activate the environment:
$ conda activate d3forJupyter
Set up a kernel for Jupyter:
$ python -m ipykernel install --user --name=d3forJupyter
Installed kernelspec d3forJupyter in <path>
Start up Jupyter notebook:
$ jupyter notebook
[I 17:36:30.869 NotebookApp] Serving notebooks from local directory: <path>
...
Now you should be able to open up the notebook in this repository, D3_JS_viz_in_a_Python_Jupyter_notebook.ipynb
and try it out for yourself.