{% set roomTotal = 0 %}
|
{{roomNames[index]}}
|
{% for age in minAge .. maxAge %}
{% set total = 0 %}
{% for triplet in roomData %}
{% if( age == triplet["age"] and triplet["sexe"]=="0" ) %}
{{triplet["poids"]}}
{% set total = total + triplet["poids"] %}
{% endif %}
{% endfor %}
|
{% for triplet in roomData %}
{% if( age == triplet["age"] and triplet["sexe"]=="1" ) %}
{{triplet["poids"]}}
{% set total = total + triplet["poids"] %}
{% endif %}
{% endfor %}
|
{{total}}
{% set roomTotal = roomTotal + total %}
|
{% endfor %}
{{roomTotal}}
|
{% for triplet in roomData %}
{% set effectifPerAge = effectifPerAge|merge({ (triplet["age"] ~ "ans") : (attribute(effectifPerAge,(triplet["age"] ~ "ans")) + triplet["poids"]) }) %}
{% if( triplet["sexe"]=="1" ) %}
{% set effectifFemPerAge = effectifFemPerAge|merge({ (triplet["age"] ~ "ans") : (attribute(effectifFemPerAge,(triplet["age"] ~ "ans")) + triplet["poids"]) }) %}
{% else %}
{% set effectifMascPerAge = effectifMascPerAge|merge({ (triplet["age"] ~ "ans") : (attribute(effectifMascPerAge,(triplet["age"] ~ "ans")) + triplet["poids"]) }) %}
{% endif %}
{% endfor %}
{% endfor %}
|
TOTAL
|
{% for age in minAge .. maxAge %}
{{attribute(effectifMascPerAge,(age ~ "ans"))}}
|
{{attribute(effectifFemPerAge,(age ~ "ans"))}}
|
{{attribute(effectifPerAge,(age ~ "ans"))}}
|
{% endfor %}