Published
Edited
Feb 18, 2021
Insert cell
Insert cell
Insert cell
Insert cell
vl.markBar().data(dataset_target).encode(
vl.x().fieldN("Sample Name"),
vl.y().mean("RQ"),
vl.color().fieldN("Sample Name")
).width(300).height(200).render()
Insert cell
dataset_target = dataset.filter(function(object) {return object["Target Name"] == target})
Insert cell
targets = {
const set_of_targets = new Set(dataset.map(item => item["Target Name"]));
var array_of_targets = Array.from(set_of_targets);
array_of_targets = array_of_targets.filter(function(item) {return item != null});
return array_of_targets;
}
Insert cell
dataset = fetch_dataset_to_array(dataset_url, query_options)
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
query_options = {}
Insert cell
dataset_url = api_url + dataset_id + "/versions/latest/data"
Insert cell
api_url = "https://api.develop.edelweiss.douglasconnect.com/datasets/"
Insert cell
dataset_id = "cb055c01-6022-4662-bd07-87d18943d92e"
Insert cell
import {Select, Range, Toggle} from "@observablehq/inputs"
Insert cell
import {vl} from "@vega/vega-lite-api"
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