Insert cell
Insert cell
Insert cell
Insert cell
nbBarres = selecteurIntervalleTemps[1]-selecteurIntervalleTemps[0]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
graphiqueBarres = Plot.plot({
height: 800,
width: 1150,
marginLeft: 50,
marginRight: 20,
marginTop: 50,
marginBottom: 60,
x: {
domain: annees,
type: "band",
dx: 10,
padding: 1.5,
tickFormat: d => d.toString(),
tickRotate: -45,
label: null,
paddingInner: 1,
},
y: {
label: `${legendeGraphique} (nombre)`,
marginLeft: "20px",
grid: true
},
marks: [
Plot.rectY(
dataGraphique,
Plot.binX(
{
y: "count",
title: "count",
},
{
x: "dateAcquisition",
dx: -10,
fill: "genreAssocie",
thresholds:nbBarres,
order: ["Féminin", "Mixte", "Masculin"],
tip: true,
},
),
),
],
color: {
type: "categorical",
range: [bordeau, noir, jaune],
legend: true,
},
style:{
backgroundColor: gris,
color: noir,
fontSize: "14px",
}
})
Insert cell
Insert cell
Insert cell
Insert cell
dataGraphiqueInstallation = {
var resultat = [];
switch(selectAcquisition){
case "Dons":
resultat = oeuvresMacEtudiees.filter(d => d.numero.substring(0,1) == "D")

break;

case "Achats":
resultat = oeuvresMacEtudiees.filter(d => d.numero.substring(0,1) == "A")
break;

case "Tous":
resultat = oeuvresMacEtudiees
break;
}

if (!lavalinEt1992)
resultat = resultat.filter(d => d.dateAcquisition !== 1992)

resultat = resultat.filter(d => d.categorie == "Installation")
//on ignore les œuvres au genre assocé "Inconnu"
resultat = resultat.filter( d => d.genreAssocie != "Inconnu")
return resultat
}
Insert cell
dataGraphiqueInstallation.forEach(d => console.log(typeof(d)))
Insert cell
genres = new Set(oeuvresMacEtudiees.map(d => d.genreAssocie))
Insert cell
categories = new Set(oeuvresMacEtudiees.map( d => d.categorie))
Insert cell
photographies = new Set(oeuvresMacEtudiees.map( d => d.Photographie))
Insert cell
Insert cell
oeuvresMac
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
achats3categories = oeuvresTri3Categories(oeuvresMacEtudiees.filter(d => d.numero.substring(0,1) == "A"))
Insert cell
tout3categories = oeuvresTri3Categories(oeuvresMacEtudiees)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
oeuvresMac.find(d => d.id =="dualite-dualite")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
oeuvreSansArtiste = oeuvresMac.find(d => d.title ="New York Stock Exchange")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {oeuvresTri3Categories} from "1cd6c83a4402c258"
Insert cell
import {oeuvresMacEtudiees} from "1cd6c83a4402c258"
Insert cell
import {associationGenreAOeuvre} from "1cd6c83a4402c258"
Insert cell
import {artistesMac} from "1cd6c83a4402c258"
Insert cell
import {oeuvresMac} from "1cd6c83a4402c258"
Insert cell
import {couleurs} from "26cecfbef9723965"
Insert cell
jaune = couleurs[0]
Insert cell
noir = couleurs[3]
Insert cell
bordeau = couleurs[2]
Insert cell
gris = couleurs[1]
Insert cell
import {interval} from '@mootari/range-slider@1781'
Insert cell
import {toc} from "@lenamk/toc"

Insert cell
Type Markdown, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

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