Published
Edited
Mar 31, 2022
1 fork
29 stars
Insert cell
Insert cell
Insert cell
Insert cell
irises = (await fetch("https://data.getty.edu/museum/collection/object/c88b3df0-de91-4f5b-a9ef-7b2b9a6d8abb")).json()
Insert cell
Insert cell
irises.identified_by[4].content
Insert cell
Insert cell
lajs = import("https://cdn.skypack.dev/@thegetty/linkedart.js");
Insert cell
Insert cell
title = lajs.getValueByClassification(irises.identified_by,'http://vocab.getty.edu/aat/300417193')
Insert cell
Insert cell
title2 = lajs.getPrimaryName(irises)
Insert cell
Insert cell
artistName = {
let produced = lajs.normalizeFieldToArray(irises, "produced_by")
return lajs.getValueByClassification(produced[0]['referred_to_by'],"https://data.getty.edu/museum/ontology/linked-data/tms/object/producer-description")
}
Insert cell
Insert cell
material_ids = lajs.normalizeFieldToArray(irises, "made_of").map(m => {let id = m.id.split("/"); return id[id.length-1]});
Insert cell
Insert cell
material_record = (await fetch(`https://data.getty.edu/vocab/aat/${material_ids[0]}`)).json()
Insert cell
Insert cell
material = lajs.getValuesByClassification(material_record.identified_by, "http://vocab.getty.edu/term/POS/Noun","http://vocab.getty.edu/language/en")[0]
Insert cell
Insert cell
thumbnail = lajs.normalizeFieldToArray(irises, "representation").map(r => r.id)[0]
Insert cell
Insert cell
Insert cell
import { aq, op } from '@uwdata/arquero'
Insert cell
Insert cell
irises_data = {
return {"title": title, "artistName": artistName, "material": material, "thumbnail": thumbnail}
}
Insert cell
Insert cell
aq.from([irises_data]).view()
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