Population : {{ stats.population|number_format(0, '.', ' ') }}
1 lieu pour
{% set ratio = (stats.population and stats.places|length > 0) ? (stats.population / stats.places|length)|round(0, 'ceil') : '?' %}
{{ ratio|number_format(0, '.', ' ') }} habitants
{{ stats.getAvecNote() }} / {{ stats.places|length }} lieux avec note
{% for group_name, group_types in theme_groups %}
{% for type in group_types %}
{% set data = latestFollowups[type]|default(null) %}
{% set completion = data and data.completion is defined ? data.completion.getMeasure() : null %}
{% set count = data and data.count is defined ? data.count.getMeasure() : null %}
{% set completion_class = '' %}
{% if completion is not null %}
{% if completion < 40 %}
{% set completion_class = 'completion-low' %}
{% elseif completion < 80 %}
{% set completion_class = 'completion-medium' %}
{% else %}
{% set completion_class = 'completion-high' %}
{% endif %}
{% endif %}
{{ completion is not null ? completion ~ '%' : '?' }}
{% if progression7Days[type] is defined %}
{% set countDelta = progression7Days[type].count %}
{% set completionDelta = progression7Days[type].completion %}
{% if countDelta is not null %}
{{ countDelta > 0 ? '+' ~ countDelta : countDelta == 0 ? '0' : countDelta }}
{% endif %}
{% if completionDelta is not null %}
{{ completionDelta > 0 ? '+' ~ completionDelta|round(1) : completionDelta == 0 ? '0' : completionDelta|round(1) }}%
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
{% set all_types = followup_labels|keys %}
{% for type in all_types %}
{% set data = latestFollowups[type]|default(null) %}
{% set overpass_query = '[out:json][timeout:60];\narea["ref:INSEE"="' ~ stats.zone ~ '"]->.searchArea;\n(' ~ overpass_type_queries[type]|default('') ~ ');\n(._;>;);\nout meta;\n>;' %}
{% set completion = data and data.completion is defined ? data.completion.getMeasure() : null %}
{% set completion_class = '' %}
{% if completion is not null %}
{% if completion < 40 %}
{% set completion_class = 'completion-low' %}
{% elseif completion < 80 %}
{% set completion_class = 'completion-medium' %}
{% else %}
{% set completion_class = 'completion-high' %}
{% endif %}
{% endif %}