// see https://github.com/quarto-dev/quarto-cli/issues/8823
value_box1 = filtered_last.filter(function(x) {
return x.indicator == "Moins de 20 ans"})[0]["value"]
% de naissances de mères de moins de 20 ans
value_box2 = filtered_last.filter(function(x) {
return x.indicator == "Moins de 2.5kg"})[0]["value"]
% d’enfants de moins de 2,5kg
value_box3 = filtered_last.filter(function(x) {
return x.indicator == "Avant 37 semaines"})[0]["value"]
% de naissance avant 37 semaines
Births by mother age - comparison across areas
// barcode with value
Plot.plot({
x: {label: "%"},
y: {label: null,
domain:["Moins de 20 ans",
"20-24 ans",
"25-29 ans",
"30-34 ans",
"35-39 ans",
"40 ans et plus"]},
marginLeft: 130,
marks : [
Plot.tickX(data_last.filter(function(x) {
return x.isd == "Âge de la mère"}), {x: "value", y: "indicator", stroke:"lightgrey", channels: {Area: "code_geo"}, tip: true}),
Plot.tickX(filtered_last.filter(function(x) {
return x.isd == "Âge de la mère"}), {x: "value", y: "indicator", stroke:"red"})
]
})
Births by mother age - change over time
Plot.plot({
x:{label: "Année", domain: [2012, 2022], tickFormat: ""},
y:{label: "Différence au national (%)"},
color: {
legend: true,
type: "categorical",
domain:[ "Moins de 20 ans",
"20-24 ans",
"25-29 ans",
"30-34 ans",
"35-39 ans",
"40 ans et plus"]}
,
marks : [
Plot.ruleY(filtered_c24, {x1: 2012, x2: 2022, y: 0, stroke: "grey"}),
Plot.lineY(filtered_c24, {x: "annee", y: "diff", stroke: "indicator", marker: "circle", tip: true})
]}
)