observablehq / examples

Examples of using Observable in a variety of contexts
106 stars 33 forks source link

Referenced d3 libraries are not actually in the npm registry? #23

Closed cyphercider closed 3 months ago

cyphercider commented 2 years ago

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?

eiiot commented 8 months ago

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"
mootari commented 3 months ago

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