Settings

Theme

Embedding D3 in an IPython Notebook

christianmoscardi.com

72 points by c_moscardi 10 years ago · 20 comments

Reader

spot 10 years ago

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...

learn more at http://BeakerNotebook.com/

teamonkey 10 years ago

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 10 years ago

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

    • mhuffman 10 years ago

      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_moscardiOP 10 years ago

        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...

  • cstuder 10 years ago

    The project is currently (this month) moving from it's previous incantation called 'IPython'* to 'Jupyter'. The website apparently hasn't catched up yet.

    This is the description you're looking for: http://ipython.org/notebook.html

    * = http://ipython.org/

rasmi 10 years ago

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_moscardiOP 10 years ago

    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.

  • mng2 10 years ago

    Yeah, I've been using Jupyter with inline plotting and it's really quite nice. A notebook that's not tied to proprietary software (i.e. Mathematica) and which can run a full-fledged programming language is a marvelous tool.

nl 10 years ago

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/

NelsonMinar 10 years ago

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 10 years ago

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

  • c_moscardiOP 10 years ago

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

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection