HN user

mbostock

4,313 karma

https://bost.ocks.org/mike/

Posts39
Comments295
View on HN
observablehq.com 10mo ago

Observable Notebooks Data Loaders

mbostock
79pts20
observablehq.com 11mo ago

Observable Notebooks 2.0 Technology Preview

mbostock
235pts57
github.com 2y ago

Observable Framework 1.9

mbostock
29pts5
github.com 2y ago

Observable Framework 1.1

mbostock
20pts2
ertdfgcvb.xyz 2y ago

Ertdfgcvb

mbostock
238pts60
twitter.com 3y ago

Observable Plot 0.6.7 released: pointer interaction, tip mark

mbostock
65pts8
observablehq.com 3y ago

Observable Plot: A JavaScript library for exploratory data visualization

mbostock
216pts62
github.com 3y ago

Observable Plot 0.6.1

mbostock
107pts25
github.com 4y ago

Observable Plot 0.2

mbostock
4pts0
observablehq.com 5y ago

Evaluating Schwarz–Christoffel Maps in Pie Slices

mbostock
29pts2
observablehq.com 6y ago

Learn D3

mbostock
621pts71
observablehq.com 6y ago

Bar Chart Race, Explained

mbostock
134pts21
observablehq.com 7y ago

Hillshader

mbostock
1pts0
beta.observablehq.com 7y ago

Suggestions and Comments: Collaborate on Observable Notebooks

mbostock
3pts0
beta.observablehq.com 7y ago

SQL 3d engine (interactive preview)

mbostock
6pts1
beta.observablehq.com 7y ago

Let’s Try t-SNE

mbostock
77pts13
observablehq.com 7y ago

Comma-Separated Tree

mbostock
153pts61
beta.observablehq.com 7y ago

Observable Playground

mbostock
152pts15
beta.observablehq.com 7y ago

How well does population density predict U.S. voting outcomes?

mbostock
148pts109
www.jon.gold 10y ago

Declarative Design Tools

mbostock
3pts0
roadstorome.moovellab.com 10y ago

Roads to Rome

mbostock
32pts9
www.clickhole.com 10y ago

An Oral History of Facebook

mbostock
2pts0
www.redblobgames.com 11y ago

Line drawing on a grid

mbostock
127pts21
bost.ocks.org 11y ago

How To Scroll

mbostock
233pts75
bl.ocks.org 12y ago

Solar Oscillator

mbostock
1pts0
marvl.infotech.monash.edu 12y ago

WebCoLa: Constraint-Based Layout in the Browser

mbostock
2pts0
cometison.gsfc.nasa.gov 12y ago

SDO Views Comet ISON

mbostock
1pts0
bl.ocks.org 12y ago

Floating Landmasses

mbostock
4pts0
github.com 12y ago

D3 3.3 Released

mbostock
166pts57
www.jasondavies.com 13y ago

Reprojected Zoomable Raster Tiles

mbostock
16pts5

There’s a similar principle of congruence in information visualization, stated in Animated Transitions in Statistical Data Graphics by Heer & Robertson as: “Maintain valid data graphics during transitions. To ensure viewers’ mental models are congruent with the semantics of the data, we suggest that, as much as possible, intermediate interpolation states remain valid data graphics.” https://idl.uw.edu/papers/animated-transitions

tldraw uses this font. It’s a great fit for emulating hand-written notes on a whiteboard; feels human.

Thank you. I don’t want to commit to a public timeline on the web editor yet, but rest assured it is a top priority, and we also value the convenience of a web editor, instant collaboration, and community!

Thanks for the feedback. We implemented the transform to strip TypeScript annotations (using esbuild)…

https://github.com/observablehq/framework/pull/129

but this approach stalled because it doesn’t implement validation of TypeScript: the TypeScript annotations are simply ignored. I felt this defeats the point of using TypeScript. We probably need to use tsc instead of esbuild to get type checking. Hints welcome!

D3 in Depth 2 years ago

In what way are these free open-source tools “locked-in” to Observable? Observable Plot is a vanilla JavaScript library that is released under the ISC license and can be used with any style of web development (e.g., React, Svelte, whatever). And likewise Observable Framework is released under the ISC license and you’re able to self-host projects anywhere and develop locally?

Thanks for the feedback. We have a PR open to make it easier to register new interpreters (without needing to fallback to .sh or .exe); it’ll let you specify the interpreter associated with a given file extension (e.g., .kts for Kotlin). https://github.com/observablehq/framework/pull/935

As for inputs-driving-data-loaders, that does go against the grain a bit since Framework favors static data snapshots so that the built site is self-contained and performant. But a technique that works well is to generate Parquet files in data loaders representing the superset of data that you want to interact with, and then using DuckDB/SQL in the client to extract the subset you want to visualize. This tends to perform well, though obviously it’s dependent on the size of the superset you want to interact with.

We’re planning to allow changing the default options for blocks (either per-page in front matter or across an entire project using the project config); you could then make `js run=false` the default and `js run` to opt-in to live code as you wish. But we chose to make live code the default since that’s our primary use case.

That “More from Observable creators” is just a standard footer we put across the site for signed-out users to showcase community content across Observable. It’s not part of the notebook. You can ignore everything below the “Appendix”.

See Leland Wilkinson’s The Grammar of Graphics. He describes the difference between a chart typology (a fixed set of chart types with a fixed set of configuration options) and a grammar of graphics (a set of orthogonal primitives that can be composed in arbitrary ways).

If you’re developing the models locally, perhaps Framework’s preview server could work: it watches local files and automatically pushes updates to the browser when files change. This enables reactive updates for data loaders, but also works with static files. So you could visualize the models as they are being generated — meaning as some external process writes local files.

But in general the use case we’re targeting is a shared data app, dashboard, or report. Not something just for you individually, or something ephemeral (that you look at in real-time during training). For example, Framework would work well for sharing a report or dashboard evaluating the performance of the latest models you’ve built with your team.

Right, conceptually it’s static files, but we could develop a hybrid approach where the server does additional data processing on-demand. We already offer access control, but we could also serve different data snapshots to different users, or even filter the data snapshots based on the user. It still has to be fast, though.

There are lots of ways to do heatmaps with Observable Plot. See the raster, contour, and cell marks.

https://observablehq.com/plot/marks/raster https://observablehq.com/plot/marks/contour https://observablehq.com/plot/marks/cell

We generally recommend stacked bar charts over pie and donut charts, so we haven’t prioritized those. But you can already implement them using custom marks, and there’s even a hacky way of doing them using Plot’s map projection system.

https://observablehq.com/@observablehq/pie-to-donut-chart

I don’t understand your comment about the “D3 example.” If you’re looking for Plot examples, you can find them linked from the Plot documentation and the gallery:

https://observablehq.com/@observablehq/plot-gallery

Plot is designed to be extended with JavaScript (rather than a non-JavaScript DSL such as Vega-Lite), such as for custom marks and data transforms. So you might occasionally see other libraries being used together with Plot.

We plan on downloading the imported libraries during build so that they are self-hosted, so it’s effectively another way to install them without having to run `npm install`. We also plan on supporting importing libraries from node_modules. And you can already import local modules so you can install libraries by manually downloading them, too.

Yes, we use continuous deployment (cron) to rebuild as needed. You can also get realtime data on the client if you need to (via fetch or WebSocket to your own servers — it’s “just” JavaScript), but generally we find building static data snapshots a useful constraint because it forces you to think about exactly what data is needed, and as a result the dashboard loads instantly.

Thank you. At a minimum, you could iframe pages built with Framework, or have them live alongside your other pages and link to them. Maybe it would be possible to use Framework’s internal API to generate HTML that could be embedded within another static site generator page but we haven’t explored that idea yet.

We’re not expressly targeting the blogging use case — we primarily want to support data apps, dashboards, and reports. But Observable Framework is quite flexible and you can use it for a lot of things; the Framework documentation is itself written using Framework, for example. So I would say that if you are working with data and you want an automated process to keep your data up-to-date, or to work with multiple languages (e.g., Python and JavaScript), or if you want to do a lot of interactive visualizations then you should give Framework a go. But we don’t have much built-in affordances for blogging, so you might find some things missing. Feel free to file feature requests! We’d love to hear your ideas, though we’re primarily focused on reporting and data app development for work.

I’m not sure what better integration with other blogging frameworks would look like — like, part of the page is rendered by Framework, but the site as a whole is handled by the blogging framework? Perhaps we could develop Framework’s API further so it could function like a plugin. But this is speculative and not a priority for us currently. If you explore the possibilities here please let us know!

We’re working on the interactivity, but we’re not going to do a Python wrapper as the goal of Observable Framework (and Plot) is to leverage web technologies with JavaScript in the front-end for interactive graphics — while doing whatever language you like, including Python, on the back-end for data analysis. There is a R wrapper for Observable Plot (https://github.com/juba/obsplot) and so I imagine someone could write one for Python, but ultimately we don’t think you’ll need it with Framework’s polyglot data loaders since you can seamlessly move between languages (front-end and back-end).

If you generate Apache Parquet files you can use DuckDB to make range requests and not download everything to the client. This is pretty magical and allows you to have surprisingly large datasets still queryable at interactive speeds.

But the general idea is to not send everything the client — to be more deliberate and restrictive in what you send, and also what you show. So you probably shouldn’t use this for a general-purpose pivot table that’s trying to show “everything” in your data warehouse and enable ad hoc exploration. You’d instead design more specific, opinionated views, and then craft corresponding data loaders that generate specific pre-aggregated datasets.

You can read about our reactive runtime here (it’s the same as Observable notebooks even though Framework uses vanilla JavaScript syntax):

https://observablehq.com/@observablehq/how-observable-runs

And the source is here:

https://github.com/observablehq/runtime

The “trick” is to structure all code as reactive variables (or nodes, defined as pure functions) within a dataflow graph. So if you replace one variable (by replacing a function with a new import), you then have to recompute any downstream variables that depend on the replaced variable, while cleaning up old variables and updating the display.

Invalid syntax doesn’t prevent other code blocks from running (though if it means a variable is then undefined, that might cause downstream errors). Syntax errors are displayed in the page, and also in the console for the running preview server. We’d like to improve the error display in the console to show more context around where the error occurred, since unlike notebooks the code isn’t immediately adjacent to the output.

We don’t support TypeScript yet, but there’s a PR (https://github.com/observablehq/framework/pull/129) and we are interested in stronger validation at build time to catch more errors.

And yes, we’re making different tradeoffs, optimizing for data apps and dashboards (more polished presentation) rather than ad hoc exploration in notebooks. So it’s more work to find and edit the code, but conversely it’s a more careful, deliberate process that allows code review, unit tests, continuous integration, etc. And we think that’s appropriate for data apps that are depended on by many people.

But still, a view source link back to your source control would be nice, yes!