Lurker News

Comments (128) 39 threads

Earlier comments
trevyn1 reply#
A+.

Feedback: I instantly understood that it was something similar to Jupyter, and my very first mental question was "I hope it's in JS", and this took a surprisingly long few seconds and two page navigations to establish -- I expected the choice of language to be on the splash page.
Anyway, very well done, and it's quite clear to me that JS is going to trounce Python for nearly everything long-term. The JS ecosystem is just an unstoppable freight train.

tty7#
lol
jashkenas3 replies#
And good place to drop few links, if you'd like to cut to the chase.

The finished notebook from the screencast (which you can fork): https://beta.observablehq.com/@jashkenas/earthquakes
And a fancier version that spins, reuses the canvas element instead of re-rendering it from scratch, projects the quakes as circles on the surface of the sphere, and offers a bunch of other options to configure (like if you'd like to chart the past day, week or month of quakes): https://beta.observablehq.com/@jashkenas/quakespotter-0-1

d--b2 replies#
Do you guys have a keyboard shortcuts cheatsheet? I can't figure how to move from one cell to another without clicking or creating a new cell.

Continue this thread — 1 reply

mbostock#
If you hit the '?' key (when you don’t have a code editor focused), a help modal appears that shows all the keyboard shortcuts. Most of the keyboard shortcuts are also described in the introduction here: https://beta.observablehq.com/@mbostock/introduction-to-note...

You can change which cell is focused using Option-Tab ⌥⇥ and Shift-Option-Tab ⇧⌥⇥. You can also click on the asterisk (*) in the left margin to edit any cell.

simonw#
I didn't know you were involved in this project too. That screencast is astonishing. Congratulations on the launch!
krebby1 reply#
small bug: the earthquake notebook points to `http://www.example.com` instead of the youtube screencast.
jashkenas#
Right, we didn't have the URL yet last night. Thanks! Fixed.
cpsempek4 replies#
This couldn't have come at a more convenient time for me. After years of telling myself I'd learn D3 I have finally started to as well as use it at work. I was using an extension in Jupyter but it was behaving unpredictably, and not being a frontend engineer by trade I found the process of sublime + browser foreign and cumbersome. As a big fan of jupyter and zeppelin I am stoked to see notebooks entering the js data viz domain.

Curious as to know how developers view the notebook paradigm? I feel like there is a sense of pride in working from the command line or vi, so wonder how these UI heavy approaches are received by the js/python/scala community.

leblancfg#
I know many developers who've integrated Jupyter Notebooks in their workflow too. For Python-specific things, it's a great way to replicate bugs, try out a few initial solution paths, and share them with collaborators who can then interact with.

Regarding D3, I haven't tried that out yet, although I've used the `folium` Python package, which generates leaflet.js code you can put on a website. Otherwise, maybe check out [Jupyter Dashboards](https://github.com/jupyter/dashboards), whose interactive widgets seem to be in the same vein as OP.

softawre#
To me, a netbook like this is similar to a REPL and works well for visualization tasks. You can figure it out in the netbook/REPL and then move it to "real code" once you've got it figured out.
_coveredInBees#
I learned D3 a year back and am reasonably fluent at it now and I'm not sure I would ever pick this platform to learn D3. The easiest way to learn is simply to have a blank HTML file with your D3 code in it. The reason you want to do this is because you want to take advantage of powerful debugging tools that exist within modern browsers (Chrome dev tools, or equivalent from Firefox). ObservableHQ will simply add a layer in between that will make everything more annoying to debug and slow down experimentation.

I think it is really cool, and I have mountains of respect for Mike for his contributions to the field of data visualization/javascript, but my feeling is that this is more suited for sharing "notebooks" that are interactive and also to potentially allow for collaborative notebook building/demos. In essence, this is a giant evolution over his previous work on bl.ocks.org (https://bl.ocks.org/mbostock)

spot1 reply#
The BeakerX extension to Jupyter has good support for D3 visualization of data prepared in Python and other languages. http://BeakerX.com/
krebby1 reply#
To me the killer app for this is to empower data scientists to create useful, ad-hoc visualization apps for their results. Right now the html / presentation story for Jupyter notebooks is awful.

Mike, Jeremy, and Tom, this looks awesome. I'm looking forward to put it through the paces.

joshuamorton1 reply#
>Right now the html / presentation story for Jupyter notebooks is awful.

How so?
Ive found it pretty straightforward to convert matplotlib plots to gif/mp4 for presentation (note: this can be done automatically within the notebook), and plotly is pretty good for truly interactive stuff.

krebby2 replies#
I'm specifically referring to the use case of creating explorable apps. Most data scientists I know would love a way of, say, building a map with a few input controls that alter the data or presentation (colors, layers, filtering, aggregation).

I'm currently working on a JS-powered geospatial exploration app that is meant to be run either standalone or embedded into a Jupyter notebook. We often run into questions around how much the embeddable app should be scriptable or how much user control to allow. This would seemingly solve many of our needs.

claytonjy1 reply#
Have you looked at shiny (R) or dash (python)? I found it pretty easy to

    building a map with a few input controls that alter the data or presentation (colors, layers, filtering, aggregation)
with R + shiny + leaflet

Continue this thread — 1 reply

zeptomu#
Some years ago I tried (and admittedly failed) to do something similar (a Jupyter notebook as an app) when trying to build a domain specific application for water resource management - we ended up building a "classic" web application via Leaflet and Python at the backend.

The idea is intriguing, however it is non trivial to pass information from JS to Python and vice versa. You can do that, but it messes with Jupyter's event system and breaks the usual notebook workflow. Maybe this has changed for the better, but at that time this stuff (IPython widgets I think) was heavily in flux.

Load more comments