Scientific data with Observable

I would like to visualize satellite remote sensing data with Observable. Looks perfect for quick sketch kind of things and quick shares for collaboration. However. There does not seem to be any way of reading the data. All that Observable supports is NetCDF3, which is about three decades out of date. The formats that are being used now are HDF4 (close to retirement) and NetCDF4 (swiftly becoming king).

There’s a NetCDF4 package for NodeJS, but there doesn’t seem to be any way to bring it into Observable as it installs through NPM and you’re then stuck with your console.

So the question is, how can one read NetCDF4 data with Observable? Or is it simply not possible and I should just go back to Python (which I hate with a passion)?

Hi. When you say “All that Observable supports is NetCDF3”, are you referring to this Observable Framework example? NetCDF | Observable Framework

None of Observable’s products have specific support for NetCDF (of any version). However, Observable Framework is an extremely flexible system that can work with almost any library or data format. I would expect you could use the NetCDF4 package you found from a data loader to use that format in a Framework project.

If that does work, you could also use the Python libraries you are already using as Framework data loaders to integrate NetCDF4 data.

If that all sounds off base, maybe you can provide more details about where you’re seeing CDF data with Observable? If Framework is news to you, I’d suggest checking out the Observable Framework documentation. I think you might like what you see.

Have you tried using h5 wasm?
https://observablehq.com/@fil/netcdf4-h5wasm

Fil, I get a 404 there. Is the notebook public?

Oops, sorry. It is public (unlisted) now.

1 Like