Public
Edited
May 9, 2023
Paused
Insert cell
Insert cell
d = introspection.cul_links.map(({to,from}) => ({to,from,id:`${from}-${to}`}))
Insert cell
dd = _.uniqBy(d, d => d.id) // lost negs here
Insert cell
Insert cell
root = {
const parent = item => dd.find(y => y.from == item.to) ?? item

return parent(parent(parent(parent(parent(parent(parent(parent(parent(dd[0]))))))))) // cycle in climate-simple;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// from https://observablehq.com/@mootari/list-github-repo-contents
html`<div class=gh-list>
<ul>${model_folder_list.data
// Sort: folders (type "dir") first, files (type "file") next
.slice().sort(({type:a},{type:b})=>a<b?-1:a>b?1:0)
.map(({name, html_url, type}) => html`<li data-type=${type}><a href="${html_url}">${DOM.text(name)}`)}
`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
require(URL.createObjectURL(new Blob([b64_to_utf8(module_response.data.content)], { type: "text/javascript" })))
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more