

Embedding D3 in an IPython Notebook - c_moscardi
http://www.christianmoscardi.com/blog/2015/08/12/embedding-d3-in-ipython-notebook.html

======
spot
Beaker Notebook has much cleaner support for integrating d3 (or any JS lib)
with Python or other languages:
[http://sharing.beakernotebook.com/gist/anonymous/e21582541d7...](http://sharing.beakernotebook.com/gist/anonymous/e21582541d7c1fe60eb4)

learn more at [http://BeakerNotebook.com/](http://BeakerNotebook.com/)

~~~
tdaltonc
I wonder if using JSON as a data bridge works well in practice. If it does, I
imagine that a polyglot jupyter notebook type must be on the horizon.

~~~
jchendy
Part of the reason we built Beaker was that the IPython devs explicitly stated
they didn't believe in multiple languages within one notebook. It's possible
that this opinion has changed with the Jupyter migration, but I haven't heard
anything to that effect.

~~~
tdaltonc
Why did they object to multiple languages within a notebook? What problem did
they think it would create?

------
teamonkey
The Jupyter web page is a fine example of reverse information distribution. I
went from" I think I know what this is" to "I have no idea what this is"
within seconds of the page loading.

~~~
Zombieball
Glad I am not the only one! I am not familiar with Jupyter so clicked through
to their webpage and was quickly lost.

~~~
mhuffman
Same here! all of the buzz around iPython, and there is no succinct
explanation of wtf it is or why I would want it. Jupyter seems to be a more
generalize version of iPython with pluggable engines, but again, what does
that mean?

So far, I am coming to the conclusion that iPython is a tool for data
scientists, but I am not really sure.

~~~
c_moscardi
IPython itself is a REPL with many, many convenience and magic functions,
auto-completion, etc... If you write any amount of python, it's hugely useful!

Then, there are IPython Notebooks, which give you the HTML, cell-based
frontend for executing code.

Jupyter is the v2/generalization for both of these things - there is the
Jupyter shell, which is a plugin-friendly REPL, and Jupyter notebooks, which
allow you to run code across a variety of langauges. AFAIK so far, you can
only run one language per Jupyter notebook (though having dug around the
source code, the possibility for multiple languages on a per-cell basis is
very much there).

I still find myself using IPython and Jupyter interchangably, which probably
doesn't help the confusion.

In terms of who uses this stuff: IPython notebooks are very popular across
academia and for lectures/talks. Check out all the cool learning material
here: [https://github.com/ipython/ipython/wiki/A-gallery-of-
interes...](https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-
IPython-Notebooks)

------
rasmi
FYI, the latest Jupyter + matplotlib have interactive plotting inline with
"%matplotlib notebook". The server must be running for this to work (so you
can't interact with static ipynb files in nbviewer, for example), but a static
version of the plot is generated for static notebooks. There are also some
changes coming down the line to expose the traits of matplotlib plots so that
libraries like mpld3 can be integrated more seamlessly.

(Also, Hi Christian!)

~~~
c_moscardi
RASMI!!!

Yeah, most of our curriculum uses regular old matplotlib. We only use this
technique specifically in our D3 curriculum. In general I can't think of many
use cases where this is actually better than just having a couple of files,
aside from instructional ones.

------
nl
Interestingly, Zeppelin (a competitor to IPython/Jupyter mostly aimed at use
with Spark) uses D3 for most of its visualizations.

IMHO Jupyter is actually easier to get working (even with Spark support)
though.

[1]
[https://zeppelin.incubator.apache.org/](https://zeppelin.incubator.apache.org/)

------
NelsonMinar
IPython feels like an important new way to do computing, particularly for
exploring and teaching. I love the idea of bringing more powerful HTML tools
into it.

------
fokz
I was wondering if your page menu accept input, and it really does. So cool!

~~~
c_moscardi
Thanks! I'm still working out mobile-friendliness, but yeah, I'm really happy
with how the site turned out generally.

