Mike Bostock's Avatar

Mike Bostock

@ocks.org.bsky.social

Visualization toolmaker. Founder of Observable. Creator of D3. Former NYT Graphics. Pronounced BOSS-tock.

2,463 Followers  |  68 Following  |  44 Posts  |  Joined: 06.02.2024  |  1.8886

Latest posts by ocks.org on Bluesky

Preview
fix ojs viewof and mutable imports ยท observablehq/notebook-kit@4262531

The viewof import syntax error is fixed here. Iโ€™ll publish a new release in the next day or two. Thanks for the bug report! github.com/observablehq...

03.08.2025 20:45 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

You can also use import attributes (which allows you to self-host compiled notebooks):

import {figure, viewof$rotation} from "https://api.observablehq.com/@rreusser/drawing-3d-objects-with-svg.js?v=4" with {type: "observable"};

03.08.2025 20:32 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

You can import a viewof in a vanilla JavaScript cell like this:

import {figure, viewof$rotation} from "observable:@rreusser/drawing-3d-objects-with-svg";

I can look into the ojs syntax error, but definitely recommend adopting vanilla JavaScript wherever possible! Thanks for the write-up.

03.08.2025 20:03 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Observable Notebooksย 2.0 Technology Preview | Observable

I've been playing with the new Observable Notebooks 2.0 over the past days and I'm amazed. While still a preview I think it's already a serious alternative to R or Jupyter notebooks. Love that it works locally now and that notebooks are just HTML files with vanilla JS observablehq.com/notebook-kit/

02.08.2025 10:26 โ€” ๐Ÿ‘ 37    ๐Ÿ” 8    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 1
Observable Notebook Kit | Observable

Yes, you can use page templates with Notebook Kit: observablehq.com/notebook-kit... You can see the one we made for our documentation site here: github.com/observablehq...

31.07.2025 18:27 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
A screenshot of Observable Desktop showing a JavaScript cell importing the geoviz library, followed by a JavaScript cell rendering a world map.

A screenshot of Observable Desktop showing a JavaScript cell importing the geoviz library, followed by a JavaScript cell rendering a world map.

Thanks for sharing, Nicolas! One tip, if you like you can use static imports in (vanilla) JavaScript cells now:

import * as geoviz from "npm:geoviz";

31.07.2025 18:26 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Reactivity | Observable Framework

Mutable is still there, just as a function rather than a nonstandard operator. Itโ€™s the same as in Framework (though not currently importable; just available by default). observablehq.com/framework/re...

31.07.2025 13:02 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Thanks for the suggestions. We recommend our editor (Observable Desktop, and a future web-based editor) if you want an easy way to edit notebooks.

31.07.2025 13:00 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Happy to help, reach out if you have any questions about the Notebook Kit API. Would also love any contributions back.

30.07.2025 15:08 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

You donโ€™t have to use Observable Desktop to author notebooks. We designed the file format (HTML) to be easily edited in standard editors. Desktop is just a specialized editor intended to be best in class for this purpose.

30.07.2025 15:07 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Notebook Kit calls this the โ€œbuildโ€ command which likewise produces runnable HTML. Itโ€™s about half self-hosted currently, but if we add some more npm: import resolution to the Vite plugin we could make it fully self-contained. Being built on Vite gives a lot of leverage.

30.07.2025 15:06 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Notebook Kit exposes a low-level Build and Runtime API which can help with this.

30.07.2025 15:03 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
GitHub - observablehq/notebook-kit: A command-line tool for building static sites from Observable Notebooks A command-line tool for building static sites from Observable Notebooks - observablehq/notebook-kit

Please try out Observable Desktop and Observable Notebook Kit today. Weโ€™d love your feedback, bug reports, ideas, etc.! github.com/observablehq...

29.07.2025 14:38 โ€” ๐Ÿ‘ 10    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Vibe coding a choropleth map in Observable Notebooks 2.0
YouTube video by Observable Vibe coding a choropleth map in Observable Notebooks 2.0

And last, the new editorโ€™s AI is pretty mind-blowing ๐Ÿคฏ, focused on quick ideation and iterationโ€ฆ www.youtube.com/watch?v=BeH6...

29.07.2025 14:38 โ€” ๐Ÿ‘ 15    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Observable Desktop User guide | Observable

Third, weโ€™ve built a whole new streamlined editor for Notebooks, focused on a clean interface and a great developer experience. observablehq.com/notebook-kit...

29.07.2025 14:38 โ€” ๐Ÿ‘ 5    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Observable Notebooks 2.0 System guide | Observable

Second, Notebooks 2.0 is now (finally) vanilla JavaScript! Itโ€™s the standard syntax that works everywhere and like you expect. Say goodbye to quirky Observable JavaScript, and hello to const, let, static import, etc. observablehq.com/notebook-kit...

29.07.2025 14:38 โ€” ๐Ÿ‘ 8    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

First and foremost, weโ€™re unlocking file-based workflows for notebooks โ€” edit them locally, check them into git, build them in CI, self-host them as superfast static sites, integrate them into custom apps, etc. etc. Weโ€™re doubling down on file over app.

29.07.2025 14:38 โ€” ๐Ÿ‘ 9    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Observable Notebooksย 2.0 Technology Preview | Observable

Notebooks 2.0 is here! ๐Ÿ““๐Ÿ”ฎ Previewing today:โ€จNotebook Kit, an open file format for notebooks with open-source tooling for generating static sites; andโ€จObservable Desktop, a macOS desktop application for editing notebooks as local files, with a radical new approach to AI. observablehq.com/notebooks/2/

29.07.2025 14:38 โ€” ๐Ÿ‘ 58    ๐Ÿ” 25    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 4

Our goal is to make visual exploration (+ AI) sufficient for common use cases, but also fully embrace code if you want or need it. Itโ€™s unusual to be pushing on both ends of the power spectrum like this, but this is how we make canvases cross-functional, bringing data team & business users together.

15.04.2025 15:14 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

I wouldnโ€™t characterize it as no-code. You can use as much code as you want (SQL or JavaScript), and seamlessly mix code with direct-manipulation visual exploration.

15.04.2025 15:10 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
A selection of custom marks generated with Observable Plot. From top to bottom: A categorical bar chart with black hachured patterns in 6 different directions; A faceted bar chart using Isotope symbols showing cattle, pigs and sheep in red, grey and blue; a sequence of geometric symbols in blue gradually increasing in size: circle, triangle, square and fan, repeating 3 times, below which is a sequence of 12 human-like figures also increasing in size; A curve made up of ellipses that transition from vertical to horizontal to cicrcular shapes; a set of thee dot and whisker symbols in black and white; an abstract geometric arrangement of teardrop shapes in green to brown colours forming concentric bands away from the bottom left; a map of cycle hire journeys in London represented by asymmetric curves in a range of colours, overlaid over the river Thames; a map on London boroughs symbolised with dots of varying density with the highest density of dots towards the outside, lowest in the centre; a 'chart' of flowers of different shades of purple and orange.

A selection of custom marks generated with Observable Plot. From top to bottom: A categorical bar chart with black hachured patterns in 6 different directions; A faceted bar chart using Isotope symbols showing cattle, pigs and sheep in red, grey and blue; a sequence of geometric symbols in blue gradually increasing in size: circle, triangle, square and fan, repeating 3 times, below which is a sequence of 12 human-like figures also increasing in size; A curve made up of ellipses that transition from vertical to horizontal to cicrcular shapes; a set of thee dot and whisker symbols in black and white; an abstract geometric arrangement of teardrop shapes in green to brown colours forming concentric bands away from the bottom left; a map of cycle hire journeys in London represented by asymmetric curves in a range of colours, overlaid over the river Thames; a map on London boroughs symbolised with dots of varying density with the highest density of dots towards the outside, lowest in the centre; a 'chart' of flowers of different shades of purple and orange.

Want to create your own custom marks in @observablehq.com Plot, but don't want to go full D3?

I've created a guide with 6 approaches of varying sophistication for specifying reusable custom marks:

observablehq.com/@jwolondon/h...

31.03.2025 20:15 โ€” ๐Ÿ‘ 59    ๐Ÿ” 15    ๐Ÿ’ฌ 8    ๐Ÿ“Œ 3
Preview
We can always talk about maps Fil Riviรจre, Data Visualization Engineer at Observable, describes his path into data visualization, what he likes in a map, whatโ€™s hard about mapmaking, and why heโ€™s asking if we need a โ€œslow cartogra...

AMA about my love of maps
observablehq.com/blog/maps-an...

thanks @allisonhorst.bsky.social for the cosy chat

24.02.2025 14:11 โ€” ๐Ÿ‘ 69    ๐Ÿ” 25    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 9
Plot: Pivot longer Ref. https://observablehq.com/d/8e978837f56432be

Kinda cryptic, but hereโ€™s a quick take on a โ€œpivot longerโ€ transform in Plot: observablehq.com/d/1913762d16...

17.12.2024 02:22 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Iโ€™d love if you wrote more approachable guides to Plot though!

16.12.2024 23:08 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Plots | Plot The JavaScript library for exploratory data visualization

FWIW we attempted to document the common expected shape of data here:
observablehq.com/plot/feature...
observablehq.com/plot/feature...

16.12.2024 23:04 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

(Though the tip semantics change when you use multiple marks: you end up with one tip per series rather than one tip across seriesโ€ฆ)

16.12.2024 23:01 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Plot: One line per series

Totally valid to use multiple marks, too. You can avoid repeating yourself or hard-coding colors by mapping an array, e.g., ["AAPL", "GOOG", "IBM", "AMZN"].map((y) => Plot.lineY(stocks, {x: "Date", y, stroke: () => y})). observablehq.com/d/471ba8fb2e...

16.12.2024 22:59 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Plot prefers โ€œtidyโ€ data. (And Plot doesnโ€™t really โ€œpreferโ€ array-of-objects; it uses columnar data internally. The most performant approach is to pass arrays of values to each channel, but array-of-objects is ubiquitous in JavaScript, so we make that easy.) vita.had.co.nz/papers/tidy-...

16.12.2024 22:59 โ€” ๐Ÿ‘ 5    ๐Ÿ” 2    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

The attention to detail is impressive. Good work!

27.11.2024 05:56 โ€” ๐Ÿ‘ 4    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
waffle tips + waffle stroke + waffle unit: auto by Fil ยท Pull Request #2215 ยท observablehq/plot unit: auto (closes waffle unit: autoย #2214) waffle tipsย #2132 (merge commit, closes Waffle mark tooltips are always on axis lineย #2129) waffle strokeย #2204 (merge commit closes Waffle pattern doe...

@fil.rezo.net and I are working on further improvements to the waffle mark, including better tooltips, better stroke, and a better default unit for very large or very small values. github.com/observablehq...

20.11.2024 20:47 โ€” ๐Ÿ‘ 3    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

@ocks.org is following 20 prominent accounts