Published
Edited
Jan 15, 2021
1 fork
Insert cell
Insert cell
Insert cell
runs = (await fetch(apiUrl + '/v0/runs')).json()
Insert cell
all_runs = runs.map(run => run.id)
Insert cell
import {select} from "@jashkenas/inputs"
Insert cell
dominance = fetch(apiUrl + '/run/' + selected_run + '/dominance_new', {
headers: { "content-type": "application/json" },
method: "GET",
mode: "cors"
})
.then(response => {
return response.json();
})
.then(function(resultJson) {
return resultJson;
})
Insert cell
//dominance_loop = Object.keys(dominance).map(function(idx) {
// let dom = dominance[idx];
// dominance_array.push([dom.name, dom.low, dom.high]);
//});
Insert cell
dominance_array = dominance.map((dom, idx) => {
return (['class' + idx, dom[0], dom[1]])
});
Insert cell
dominance_chart = dominance.map((dom, idx) => {
return { low: dom[0], high: dom[1], name: 'classe ' + idx };
});
Insert cell
viewof selected_run = select(all_runs)
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