Unlisted
Edited
Nov 19
Importers
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
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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
implied_values = property_names.entries().map(([id, name]) => {
if (search_derivations.values.has(id)) return {quantifier: "∀", values: search_derivations.values.get(id).value ? "✅" : "❌", id, name}
if (spaces_satisfying_search.size == 0) return {quantifier: "∃", values: "❓", id, name}
return {quantifier: "∃", id, name,
values: (spaces_satisfying_search.values().some(v => v.values.has(id) && v.values.get(id).value) ? "✅" : "")
+ (spaces_satisfying_search.values().some(v => v.values.has(id) && !v.values.get(id).value) ? "❌" : "")
+ (spaces_satisfying_search.values().some(v => !v.values.has(id)) ? "❓" : "")}
}).toArray()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
redundant = distinct_equivalences2.values().map(a=>new Set(a.keys().drop(1)))
.reduce((a,c)=>a.union(c),new Set())
//distinct_equivalences.values().reduce((a,c)=>a.union(c),new Set())
Insert cell
extremal_equivalence_elements = distinct_equivalences2.map(m => {let s = new Set(m.keys());
s.delete("P000071"); //stupid hack
return new Map(m.entries().filter(p => s.intersection(implications.direct.get(p[0])[0]).size == 1 || s.intersection(implications.direct.get(p[0])[1]).size == 1))})
Insert cell
search_derivations.direct.values().reduce((a,c)=>a+c[0].size,0)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
property_names = new Map(data.properties.map(p => [p.uid, p.name]))
Insert cell
Insert cell
Insert cell
Insert cell
data2 = [...spaces_assuming_search.entries()].filter(s => s[1] !== "contradiction").map(s => s[1].values.entries().reduce((a,c)=>(a[c[0]]=c[1], a), {name: s[0]}))
Insert cell
spaces = new Map(data.spaces.map(s=>[s.uid,derive(data.traits.filter(t=>t.space == s.uid).map(t=>new Map([[t.property, t.value]])))]))
Insert cell
[...spaces.values()].reduce((a,c)=>a+c.values.size,0)
Insert cell
data = fetch(`https://pi-base-bundles.s3.us-east-2.amazonaws.com/refs/heads/${branch}.json`).then(response => response.json());
Insert cell
function unpad_uid(text) {
return text.replace(/([A-Z])0+/gi,"$1")
}
Insert cell
Insert cell
Insert cell
selected_space_values = [...spaces_assuming_search.get(space_select[0]).values]
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