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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more