Jupyter Notebooks are an incredibly powerful way to conduct R&D in both academia and industry. Our work at Stitch Fix requires us to work with 3D data, and for this we have developed a new Python library to incorporate D3 in Jupyter to streamline our workflow. In this tutorial we’ll cover how to easily employ advanced D3 visualizations in Jupyter Notebooks, be it 3D renderings and more.
Most data visualization tools for Python generally involve the following thought process: given some data, select a plot type from a library of options, possibly tweak some plot config options, press go and iterate. Inversely, D3 starts with sets of user-defined objects on the screen, attaches data to them, and updates their attributes (location, etc.) accordingly. If you can draw it on paper, you can make it in D3 and you can make it interactive. In a research environment, it’s even better when you can connect your D3 visualizations with Python in Jupyter Notebooks.
Learning all of the ins and outs of D3 is challenging, but getting started is easy. We’ll introduce a new package that streamlines this process of using D3 in the Jupyter Notebook and go through a tutorial on how to do it. Within a few minutes, you will be able to grab one of your favorite bl.ocks.org data visualization examples, make a few minor tweaks to it and start using it interactively with your data in Jupyter. We will also show you how to export your resulting graphs for inclusion in web pages, as stand-alone browser-based documents, or viewable in NBViewer so you can share your research with customized and dynamic graphics.