examples icon indicating copy to clipboard operation
examples copied to clipboard

Referenced d3 libraries are not actually in the npm registry?

Open cyphercider opened this issue 3 years ago • 1 comments

Hey, thanks for all of your work on these examples. I'm confused by all of the examples, because they reference libraries prefixed by @d3 that are not actually on npm. For example, @d3/chloropleth from https://observablehq.com/@d3/choropleth. Where can I find these packages?

cyphercider avatar Aug 08 '22 13:08 cyphercider

I'm fairly sure they're meant to be installed directly from observable, like you would see in the embed command. For example:

yarn add "https://api.observablehq.com/@d3/brushable-scatterplot.tgz?v=3"

eiiot avatar Jan 05 '24 22:01 eiiot

Where can I find these packages?

As pointed out by @eiiot, these are notebook modules that need to be imported from api.observablehq.com.

You can find them declared in an example's package.json, e.g. https://github.com/observablehq/examples/blob/aeb4917ac781eb3ea81075d393a6bb67501857a3/react-file-attachment/package.json#L25-L26

mootari avatar Jun 03 '24 09:06 mootari