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
Budget annuel : {{ stats.budgetAnnuel|number_format(0, '.', ' ') }} €
Budget par habitant :
{% if stats.population > 0 %}
{{ (stats.budgetAnnuel / stats.population)|number_format(0, '.', ' ') }} €
{% else %}
?
{% endif %}
{% set overpass_type_queries = {
'fire_hydrant': 'nwr["emergency"="fire_hydrant"](area.searchArea);',
'charging_station': 'nwr["amenity"="charging_station"](area.searchArea);',
'toilets': 'nwr["amenity"="toilets"](area.searchArea);',
'bus_stop': 'nwr["highway"="bus_stop"](area.searchArea);',
'defibrillator': 'nwr["emergency"="defibrillator"](area.searchArea);',
'camera': 'nwr["man_made"="surveillance"](area.searchArea);',
'recycling': 'nwr["amenity"="recycling"](area.searchArea);',
'substation': 'nwr["power"="substation"](area.searchArea);',
'laboratory': 'nwr["healthcare"="laboratory"](area.searchArea);',
'school': 'nwr["amenity"="school"](area.searchArea);',
'police': 'nwr["amenity"="police"](area.searchArea);',
'healthcare': 'nwr["healthcare"](area.searchArea);nwr["amenity"="doctors"](area.searchArea);nwr["amenity"="pharmacy"](area.searchArea);nwr["amenity"="hospital"](area.searchArea);nwr["amenity"="clinic"](area.searchArea);nwr["amenity"="social_facility"](area.searchArea);'
} %}
{% set theme_groups = {
'emergency': ['fire_hydrant', 'defibrillator'],
'transport': ['bus_stop', 'charging_station'],
'healthcare': ['healthcare', 'laboratory'],
'education': ['school'],
'security': ['police', 'camera'],
'infrastructure': ['toilets', 'recycling', 'substation']
} %}
Catégorie |
Thème |
Nombre |
Complétion |
Évolution |
Graphique |
{% 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 %}
{% if loop.first %}
{% if group_name == 'emergency' %}🚨 Urgence
{% elseif group_name == 'transport' %}🚌 Transport
{% elseif group_name == 'healthcare' %}🏥 Santé
{% elseif group_name == 'education' %}🎓 Éducation
{% elseif group_name == 'security' %}🛡️ Sécurité
{% elseif group_name == 'infrastructure' %}🏗️ Infrastructure
{% else %}{{ group_name|capitalize }}
{% endif %}
{% endif %}
|
{{ followup_labels[type]|default(type|capitalize) }}
|
{{ count is not null ? count : '?' }} |
{{ 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 %}
{{ data and data.count is defined ? data.count.getMeasure() : '?' }} |
{{ completion is not null ? completion : '?' }}%
{% endfor %}
{{ stats.getCompletionPercent() }} %
complété sur les critères donnés.
{{ stats.places | length}}
lieux dans la zone.
{{ stats.getAvecHoraires() }}
lieux avec horaires.
{{ stats.getAvecAdresse() }}
lieux avec adresse.
{{ stats.getAvecSite() }}
lieux avec site web renseigné.
{{ stats.getAvecAccessibilite() }}
lieux avec accessibilité PMR renseignée.
{{ stats.getAvecNote() }}
lieux avec note renseignée.