Public
Edited
Mar 26
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
dot`digraph {
${b.map((d) => `f${d.fromDefinition} -> f${d.to};`).join("\n")}
}`
Insert cell
Insert cell
Insert cell
/*(a_thing2.onchange = (d) => {
console.log(d);
history.pushState(
{ id: d.target.value, hidden: show_hidden },
"id " + d.target.value,
"?id=" + d.target.value + (show_hidden ? "&hidden=hidden" : "")
);
})*/
Insert cell
Insert cell
Insert cell
v = "373ae56"
Insert cell
Insert cell
Insert cell
fs = await pre_fetch(url)
Insert cell
introspection = JSON.parse(stringify_introspection_info(await getIntrospection(url, fs)))
Insert cell
Insert cell
Insert cell
Insert cell
d3.coll
Insert cell
introspection
Insert cell
inputs = Object.values(introspection.cul_functions)
.filter((d) => d.reason == "input definition")
.map((d) => d.name.slice(0, -3)) // not ACTUAL inputs: I need to traverse graph and get by scope id
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
introspection.cul_links //.map((d) => d.reason) //.filter((d) => d.to.includes("undefined"))
Insert cell
introspection.cul_input_map
Insert cell
introspection.cul_functions
Insert cell
introspection.cul_input_map
Insert cell
Insert cell
a.filter((d) => d.to == "0_net_cf")
Insert cell
introspection.cul_links
.filter((d) => d.reason == "call" && !d.from.includes("undefined"))
.filter((d) => d.to == "0_net_cf")
.map((d) => ({
to: d.to,
from: d.from,
//f: introspection.cul_functions[d.to].reason,
//g: introspection.cul_functions[d.from].reason,
// sometimes > 1 level needed? => Error or indicate when definition not found?
fromDefinition: introspection.cul_functions[d.from].reason.includes(
"import"
)
? //introspection.cul_functions[
introspection.cul_links.filter((e) => e.to == d.from)[0].from
: //].reason
d.from
}))
.map((d) => ({
to: d.to,
fromDefinition:
d.fromDefinition[d.fromDefinition.length - 1] == "_"
? d.fromDefinition.slice(0, d.fromDefinition.length - 1)
: d.fromDefinition
}))
.map((d) => ({
to: d.to,
//from: d.fromDefinition,
//f: introspection.cul_functions[d.to].reason,
//g: introspection.cul_functions[d.from].reason,
// sometimes > 1 level needed? => Error or indicate when definition not found?
fromDefinition: introspection.cul_functions[
d.fromDefinition
].reason.includes("import")
? //introspection.cul_functions[
introspection.cul_links.filter((e) => e.to == d.fromDefinition)[0].from
: //].reason
d.fromDefinition
}))
Insert cell
a = introspection.cul_links
.filter((d) => d.reason == "call" && !d.from.includes("undefined"))
.map((d) => ({
to: d.to,
from: d.from,
//f: introspection.cul_functions[d.to].reason,
//g: introspection.cul_functions[d.from].reason,
// sometimes > 1 level needed? => Error or indicate when definition not found?
fromDefinition: introspection.cul_functions[d.from].reason.includes(
"import"
)
? //introspection.cul_functions[
introspection.cul_links.filter((e) => e.to == d.from)[0].from
: //].reason
d.from
}))
//.map((d) => introspection.cul_functions[d.fromDefinition])
/*.map((d) => ({
to: d.to,
fromDefinition:
d.fromDefinition[d.fromDefinition.length - 1] == "_"
? d.fromDefinition.slice(0, d.fromDefinition.length - 1)
: d.fromDefinition
}))*/
//.map((d) => introspection.cul_functions[d.fromDefinition])

.map((d) => ({
to: d.to,
//from: d.fromDefinition,
//f: introspection.cul_functions[d.to].reason,
//g: introspection.cul_functions[d.from].reason,
// sometimes > 1 level needed? => Error or indicate when definition not found?
fromDefinition: introspection.cul_functions[
d.fromDefinition
].reason.includes("import")
? //introspection.cul_functions[
introspection.cul_links.filter((e) => e.to == d.fromDefinition)[0].from
: //].reason
d.fromDefinition
}))
/*.map((d) => ({
to: d.to,
fromDefinition:
d.fromDefinition[d.fromDefinition.length - 1] == "_"
? d.fromDefinition.slice(0, d.fromDefinition.length - 1)
: d.fromDefinition
}))*/
.map((d) => ({
to: d.to,
//from: d.fromDefinition,
//f: introspection.cul_functions[d.to].reason,
//g: introspection.cul_functions[d.from].reason,
// sometimes > 1 level needed? => Error or indicate when definition not found?
fromDefinition: introspection.cul_functions[
d.fromDefinition
].reason.includes("import")
? //introspection.cul_functions[
introspection.cul_links.filter((e) => e.to == d.fromDefinition)[0].from
: //].reason
d.fromDefinition
}))
/*.map((d) => ({
to: d.to,
fromDefinition:
d.fromDefinition[d.fromDefinition.length - 1] == "_"
? d.fromDefinition.slice(0, d.fromDefinition.length - 1)
: d.fromDefinition
}))*/
.map((d) => ({
to: d.to,
//from: d.fromDefinition,
//f: introspection.cul_functions[d.to].reason,
//g: introspection.cul_functions[d.from].reason,
// sometimes > 1 level needed? => Error or indicate when definition not found?
fromDefinition: introspection.cul_functions[
d.fromDefinition
].reason.includes("import")
? //introspection.cul_functions[
introspection.cul_links.filter((e) => e.to == d.fromDefinition)[0].from
: //].reason
d.fromDefinition
}))
/*.map((d) => ({
to: d.to,
fromDefinition:
d.fromDefinition[d.fromDefinition.length - 1] == "_"
? d.fromDefinition.slice(0, d.fromDefinition.length - 1)
: d.fromDefinition
}))*/
Insert cell
b = _.uniqWith(a, _.isEqual).map((d) => ({
...d,
// unrename:
fromDefinitionReason:
introspection.cul_functions[
d.fromDefinition[d.fromDefinition.length - 1] == "_"
? d.fromDefinition.slice(0, d.fromDefinition.length - 1)
: d.fromDefinition
].reason
}))
Insert cell
Insert cell
Insert cell
Insert cell
//d3 = require("d3@7")
Insert cell
Insert cell
//width = width // 1700 - margin.left - margin.right
Insert cell
Insert cell
introspection.cul_links
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more