{% 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);' } %}
{% for type, data in latestFollowups %} {% 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.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 %} {% if data is defined and (data.count is defined or data.completion is defined) %}


{{ followup_labels[type]|default(type|capitalize) }}
{{ data.count is defined ? data.count.getMeasure() : '?' }}
{{ 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 or completionDelta is not null %} {% 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 %} {% endif %}
{% else %}


{{ followup_labels[type]|default(type|capitalize) }}
N = ?
?%
{% endif %} {% 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 ?

{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}