Data are becoming the new raw material of business
The Economist

Embedding D3 in an IPython Notebook

Christian Moscardi is the Director of Technology at The Data Incubator. This was originally posted on his blog.


coding-924920_960_720Jupyter is a fantastic tool that we use at The Data Incubator for instructional purposes. In particular, we like to keep our curriculum compartmentalized via Jupyter notebooks. It allows us to test our code samples across any language there’s a Jupyter kernel for* and keep things in one place, so our Fellows don’t have to rifle through a wide variety of file formats before getting to the information they need.

One area where we only recently integrated Jupyter was frontend web visualization. Our previous structure involved a notebook, possibly with code snippets, that contained links to various HTML files. We expected our Fellows to dig through the code to

  • Look at the HTML source for the basic layout.
  • Expose the Javascript powering the visualization.
  • View the styles making everything pretty.

Oh, and any data processing code was separate/output to a file. Obviously not ideal. We knew IPython had %%javascript magic, and started rifling around to see what we could improve.  Continue reading

Tweet about this on TwitterShare on FacebookShare on LinkedIn