Public
Edited
Jun 9, 2024
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
artworks[0]
Insert cell
Object.keys(artworks[0])
Insert cell
Insert cell
Insert cell
data = {
var result = []
artworks.forEach(artwork => {
result.push({
id: artwork.id,
title: artwork.title.en != null? artwork.title.en : artwork.title.fr,
url: artwork.url ? artwork.url.en : null,
year: artwork.produced_at,
artist: artwork.artists,
gender: genderTranslation(artwork.genreSimplifie),
categories: artwork.categories? artwork.categories.en : null,
territory: artwork.territory,
geolocation: artwork.location
})
})
return result
}
Insert cell
Insert cell
Insert cell
artworks.filter(d => d.categories == null)
Insert cell
Insert cell
function genderTranslation (frenchTerm) {

var translation
switch (frenchTerm){
case "féminin":
translation = "woman"
break;
case "non binaire":
translation = "non binary"
break;
case "collectif":
translation = "collective"
break;
case "inconnu":
translation = "unknown"
break;
case "mixte":
translation = "mixed"
break;
case "masculin":
translation = "man"
break;
default:
translation = "unknown"
break;
}
return translation
}
Insert cell
Insert cell
_.uniq(artworks.map(d => d.genreSimplifie))
Insert cell
Insert cell
_.uniq(data.map(d => d.gender))
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