{% extends 'base.html.twig' %} {% block title %}{{ 'display.stats'|trans }}- {{ stats.zone }} {{ stats.name }} {% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block body %}

{{ 'display.stats'|trans }} - {{ stats.zone }} {{ stats.name }} - {{ stats.completionPercent }}% complété

{% if stats.population %}
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
{% if stats.budgetAnnuel %}
Budget annuel : {{ stats.budgetAnnuel|number_format(0, '.', ' ') }} €
Budget par habitant : {% if stats.population > 0 %} {{ (stats.budgetAnnuel / stats.population)|number_format(0, '.', ' ') }} € {% else %} ? {% endif %}
{% endif %} {% 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'] } %}
{% 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 %} {% endfor %} {% endfor %}
Catégorie Thème Nombre Complétion Évolution Graphique
{% 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 %}
{% 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.
Chargement de la carte...
Fréquence des mises à jour par trimestre pour {{stats.name}}
{% include 'admin/stats_history.html.twig' with {stat: stats} %}

Tableau des {{ stats.places |length }} lieux

{% include 'admin/stats/table-head.html.twig' %} {% for commerce in stats.places %} {% include 'admin/stats/row.html.twig' %} {% endfor %}

Podium des contributeurs OSM de cette ville

{% for row in podium_local %} {% else %} {% endfor %}
# Utilisateur OSM Nombre de lieux Score de complétion moyen Score de complétion pondéré Score pondéré normalisé (0-100)
{{ loop.index }} {{ row.osm_user }} {{ row.nb }} {% if row.completion_moyen is not null %} {{ row.completion_moyen }} % {% else %} N/A {% endif %} {% if row.completion_pondere is not null %} {{ row.completion_pondere }} {% else %} N/A {% endif %} {% if row.completion_pondere_normalisee is not null %} {{ row.completion_pondere_normalisee }} {% else %} N/A {% endif %}
Aucun contributeur trouvé pour cette ville.
{#

Requête Overpass

            {{overpass}}
    
#}

Comment est calculé le score de complétion ?

Tester les JSON Complète tes commerces
    {% set ctc_jsons = stats.getAllCTCUrlsMap() %} {% for key, url in ctc_jsons %}
  • {{ key }}
  • {% endfor %}
{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}