Published
Edited
Jun 19, 2021
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
pristine_filtered = dataset.filter(function(obj) {
return (obj["Sample type"] == "Pristine material") && (obj["Method"] == method)
})
Insert cell
consumer_product_filtered = dataset.filter(function(obj) {
return (obj["Sample type"] == sample_type) && (obj["Method"] !== null)
})
Insert cell
pristine = dataset.filter(function(obj) {
return (obj["Sample type"] == "Pristine material") && (obj["Method"] !== null)
})
Insert cell
pristine_pta = dataset.filter(function(obj) {
return (obj["Method"] == "Particle tracking analysis") && (obj["Sample type"] == "Pristine material")
})
Insert cell
pristine_icpms = dataset.filter(function(obj) {
return (obj["Method"] == "Single particle ICP/MS") && (obj["Sample type"] == "Pristine material")
})
Insert cell
pristine_tsem = dataset.filter(function(obj) {
return ((obj["Method"] == "TEM") || (obj["Method"] == "SEM")) && (obj["Sample type"] == "Pristine material")
})
Insert cell
dataset = fetch_dataset_to_array(dataset_url, {})
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 = api_url + dataset_id + "/versions/latest/data";
Insert cell
dataset_id = "1037bcd8-ffb6-4cc2-8aec-325742c56aed"
Insert cell
api_url = 'https://api.edelweissdata.com/datasets/'
Insert cell
import {vl} from "@vega/vega-lite-api"
Insert cell
import {Select, Range, Toggle} 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