Public
Edited
Apr 11, 2024
2 forks
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
navio(df.objects(), {height: 500, attribWidth: 16})
Insert cell
selectedSources
Insert cell
data = df.objects()
Insert cell
// Used for extracting the name, url and description from the awful-ai entry
// dataProcessed = data.map((d) => {
// const split0 = d["awful-ai md"].split(" - ");
// const split1 = split0[0].split("](");
// d.name = split1[0].slice(1).trim();
// d.url = split1[1].slice(0, split1[1].length - 1).trim();
// d.description = split0[1];
// return d;
// })
Insert cell
defaultColorBy = "country"
Insert cell
defaultGroupBy = "country"
Insert cell
// defaultRadius = 3
Insert cell
defaultLayout = "map"
Insert cell
defaultDrawLayout = true
Insert cell
style
Insert cell
// taxonomyData = d3.csv("https://docs.google.com/spreadsheets/d/e/2PACX-1vRVpImj8iuMFkJdHBM3G7pTWDrcLRsuy6zcQcsubxPmYR8MWm2GKdB-ammAngqz7f1pRZFadurCnigu/pub?gid=1100408804&single=true&output=csv")

taxonomyData = d3.csv(url)
Insert cell
taxonomy = {
const taxonomy = d3.group(
taxonomyData.filter((d) => d.Class),
(d) => d.Class,
(d) => d.Subclass,
(d) => d.SubSubclass
);

for (let [_, lev1] of taxonomy) {
for (let [k, _] of lev1) {
console.log("entry", lev1, k);
lev1.set(k, null);
}
}

return taxonomy;
}
Insert cell
taxonomy2 = {
const taxonomy = d3.group(taxonomyData.filter(d => d.Application), d => d.Application, d => d.Area);


for (let [_,lev1] of taxonomy) {
for (let [k, _] of lev1) {
console.log("entry", lev1, k)
lev1.set(k, null)
}
}

return taxonomy;
}
Insert cell
taxonomy.get("data bias").set("gender", null)
Insert cell
taxonomyTree = d3.hierarchy(taxonomy)
Insert cell
taxonomyTree.descendants()
Insert cell
Insert cell
Insert cell
// Old data Dec 2023
// url = "https://docs.google.com/spreadsheets/d/e/2PACX-1vRVpImj8iuMFkJdHBM3G7pTWDrcLRsuy6zcQcsubxPmYR8MWm2GKdB-ammAngqz7f1pRZFadurCnigu/pub?gid=0&single=true&output=csv"

// Data Mar 2024
url = "https://docs.google.com/spreadsheets/d/e/2PACX-1vRVpImj8iuMFkJdHBM3G7pTWDrcLRsuy6zcQcsubxPmYR8MWm2GKdB-ammAngqz7f1pRZFadurCnigu/pub?gid=381576458&single=true&output=csv"
Insert cell
rawdata = d3.csv(url, d3.autoType)
Insert cell
d3 = require("d3@7")
Insert cell
import { panel, style } with {
data,
defaultColorBy,
defaultGroupBy,
// defaultRadius,
defaultLayout,
defaultDrawLayout,
myheight
} from "a578473b724795d5"
Insert cell
myheight = 400
Insert cell
// mywidth = 600
Insert cell
import { aq, op } from "@uwdata/arquero"
Insert cell
import { navio } from "@john-guerra/navio"
Insert cell
import {Tree} from "@john-guerra/tidy-tree-component"
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