June 25, 2019 · Originally published at Future of Coding
Observable is a reactive, notebook-style, JavaScript-ish programming environment for the web. It was founded in 2016 by Mike Bostock (d3) and later joined by Jeremy Ashkenas (CoffeeScript, Backbone, Underscore). The tool is particularly useful for the interactive exploration of data. It is an alternative to other browser-based notebooks, such as Jupyter and Wolfram, and data exploration platforms, such as RStudio.
The above video (6 min) produced this doc and demonstrates the following features:
require()yield() to inspect intermediate resultsIt's eponymous feature is its reactivity: like a spreadsheet, cells in the document evaluate when dependencies update.
This contrasts the linear order of other code notebooks, such as Jupyter and Wolfram, which are non-reactive. Below I demonstrate how evaluation order can cause issues in Jupyter:
This one feature is not to be underestimated. For one, it makes notebooks trivially reproducible -- no more worrying about evaluation order.
Paired with a slightly-modified JavaScript syntax, it also greatly reduces the complexity of asynchronous code by automatically awaiting cells that return Promises.
Markdown with JavaScript template literals is a very ergonomic way to combine text and data.
Easily require modules from npm and from other Observable notebooks.
require()Past wishes that were granted:
They recently released a $9/month/user plan for teams.