License for @mbostock's notebook & using observable for .NET Web App

Hello,

I could not find a way to contact the author directly on Observable, so please pardon me for posting it here.

This is the example I’m interested in:

  1. I have a .NET MVC Web app and I would like to use this notebook inside my app.
    My understanding is I need to get the license from the author if i’ll be using the code outside of Observable. I could not find any license associated with this notebook, so I was wondering what would be the best way to get the license from the author (for Enterprise use).

  2. Secondly, if I am allowed to use the codes in my Web app, I have a question regarding using notebook codes as local .js files.
    I need to support the case where there is no/limited Interent (only Intranet available). So I usually reference all js files locally, not through https links.

Therefore, I will need to save these js files as local files inside my web app, and import from them (as opposed to https links).

For instance,
import {Runtime, Inspector} from “./ObservableHQ/runtime.js”;
import define from “./ObservableHQ/solar-path.js”;

I noticed that this solar-path.js referencese ./scrubber.js. Then srubber.js references ./disposal.js.
So it seems like I would need to grab those scrubber.js and disposal.js files as well and tweak the reference path in those files.

(For instance, change the observable path to local path in solar-path.js as below:
//import define1 from “/@mbostock/scrubber.js?v=3”;
import define1 from “./scrubber.js”;
)

image

I just wanted to see if this sounds like a reasonable approach for the cases that cannot use https links.

Thank you very much in advance.

1 Like

You can contact the author by posting a comment on the notebook.

Since I am that author, I can also reply to your query directly: I plan to release most of my notebooks under the ISC license in the near future. We are currently working on making it easier to license notebooks in Observable. When that’s available, we’ll have a little announcement and I’ll circle back here to close the loop.

If you want to use this code in your application, we highly recommend that you use the Download Code option in the notebook menu, which gives you a self-contained tarball of this notebook and all its transitive dependencies (and files, if any). See Download and Embedding for details.

3 Likes

Junnam,
One more thing (in addition to Mike’s pointer to the Download and Embedding notebook) is that you will notice that all the files will be downloaded and locally referenced (scrubber, solar-path, etc.) except for the code that is required from external repositories, in this case:

require("d3@5")
require("solar-calculator@0.2")

The easiest way around that is probably to redefine these as described in this thread: Understanding Observable - Downloading HTML & JS

Good luck and let us know how it goes.

2 Likes

Great to know! Thank you for clarification!

Thanks much for bringing this point up, Cobus. I will definitely take the approach you mentioned.

2 Likes

We just shipped support for licenses and I’ve released this notebook under the ISC license. Enjoy!

1 Like

Awesome. Thank you!