Public
Edited
Apr 18, 2023
Insert cell
Insert cell
Insert cell
Insert cell
//viewof selected = navio(data, { height, attribWidth, attribs })
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
groupsScale = d3.scaleOrdinal(d3.schemeGreys[3])
Insert cell
brushesScale = d3.scaleOrdinal(d3.schemeAccent)
Insert cell
{
G1; G2 // make it reactive on filter updates
return Swatches(groupsScale, {label: "Grupos"})
}
Insert cell
{
G1; G2 // make it reactive on filter updates
return Swatches(brushesScale, {label: "Grupos"})
}
Insert cell
SelectedTime[0][0].__group
Insert cell
Insert cell
Insert cell
Insert cell
configImpact
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
/*TimeSearcher(transformData(SelectedTime[0],"Code",stages,"CD12").filter(d => d["peso"] < 15000 && d["__time"] > 20 && d["__time"] < 93),"__time","peso","Code",{
defaultAlpha: 0.5,
noSelectedAlpha: 0.01,
selectedAlpha: 0.5,
colorScale: d3.interpolateCool,
doubleYlegend: true,
showGrid: true,
hasDetailed: false,
margin: {left :60,top: 20, bottom: 50, right: 40},
groupAttr: "CD12",
autoUpdate: true,
//curves: curvas
}) */
Insert cell
// Treemap(
// d3.group(data, (d) => d.Iden_Sede),
// {
// // path: (d) => d.name.replaceAll(".", "/"), // e.g. flare/animate/Easing
// // label: (d) => d.name.split(".").pop(), // display text
// // group: (d) => d.name.split(".")[1], // for color; e.g. animate
// // value: (d) => d?.size, // area of each rect
// // title: (d, n) => [n.id, n.value.toLocaleString()].join("\n"), // hover text
// width,
// height: 500
// }
// )
Insert cell
import { navio } from "@john-guerra/navio"
Insert cell
// data
Insert cell
data = FileAttachment("KMC-50k-Base 1993-2022 Jul -20220929.csv.zip")
.zip()
.then((res) => res.file("KMC-50k-Base 1993-2022 Jul -20220929.csv").csv({ typed: true }))
Insert cell
// data10k = FileAttachment("Kanguro_2021_09_26_10k.csv").csv({ typed: true })
Insert cell
data1k = FileAttachment("KMC-1k-Base 1993-2022 Jul -20220929.csv").csv({ typed: true})
Insert cell
curvas = FileAttachment("curvasv2.json").json()
Insert cell
selectedStages = transformData(G1G2, "Code", stages, "__group").filter(
(d) => d["peso"] < 15000 && d["__time"] > 20 && d["__time"] < 93
)
Insert cell
G1G2 = G1.concat(G2)
Insert cell
SelectedTime = {
let aux = [];
SelectedTimeId.forEach((g) => {
let gIds = new Set(g.map((d) => d[0]));
let gData = dataF.filter((d) => gIds.has(d["Code"]) && d["V389"] < 16000);
aux.push(gData);
});

return aux;
}
Insert cell
dataF = data.filter(d => d["ERN_Ballard"] < 50 && d["ERN_Ballard"] > 20)
Insert cell
G1.forEach(d => d["__group"] = nameG1)
Insert cell
G2.forEach(d => d["__group"] = nameG2)
Insert cell
import {Treemap} from "@d3/treemap"
Insert cell
import {searchCheckbox} from "@john-guerra/search-checkbox"
Insert cell
import {TimeSearcher} from "@ivelascog/timesearcher-npm"
Insert cell
import {transformData,stages} from "@ivelascog/to-stages"
Insert cell
import {StatisticalCard, config} from "@ivelascog/statistical-card"
Insert cell
import {comparisionCard} from "@ivelascog/comparison-cards"
Insert cell
import { Swatches } from "@d3/color-legend"
Insert cell
import {FacetedSearch} from "@john-guerra/faceted-search"
Insert cell
import {ViolinPlot, FacetViolinPlot} from "@john-guerra/violin-plot"
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