Public
Edited
Jun 6, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
dataset = full_dataset.filter(row => (selected_compound.includes(row.Name)) & (selected_tox.includes(row.Tox)))
Insert cell
array_compounds = get_unique_elements(full_dataset, "Name")
Insert cell
array_tox = get_unique_elements(full_dataset, "Tox")
Insert cell
full_dataset = fetch_dataset_to_array(dataset_url, {})
Insert cell
get_unique_elements = function(array, parameter) {
return Array.from(new Set(array.map(item => item[parameter])))
}
Insert cell
function fetch_dataset_to_array(dataset_url, query_options) {
return fetch(dataset_url, query_options).then(response_dataset => {
if (!response_dataset.ok) throw new Error(response_dataset.status);
return response_dataset.json();}).then(json => json.results.map(x => x.data));
}
Insert cell
dataset_url = base_url_edelweiss + dataset_id + "/versions/latest/data"
Insert cell
dataset_id = "26613086-0ef2-402a-be51-632683961205"
Insert cell
base_url_edelweiss = 'https://api.edelweissdata.com/datasets/'
Insert cell
import {Select, Range, Toggle, Table} from "@observablehq/inputs"
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