diff --git a/assets/scripts/components/pages/Consommation.tsx b/assets/scripts/components/pages/Consommation.tsx index fc5a60078..396249ac3 100644 --- a/assets/scripts/components/pages/Consommation.tsx +++ b/assets/scripts/components/pages/Consommation.tsx @@ -32,8 +32,10 @@ const Consommation: React.FC<{ endpoint: string }> = ({ endpoint }) => { 'comparison_chart', 'chart_determinant', 'pie_determinant', - 'surface_chart', - 'surface_proportional_chart' + 'surface_proportional_chart', + 'population_density_chart', + 'population_conso_progression_chart', + 'population_conso_comparison_chart', ], isLoading); useEffect(() => { diff --git a/assets/scripts/highcharts/lineargauge.js b/assets/scripts/highcharts/lineargauge.js new file mode 100644 index 000000000..3e2b1d9b5 --- /dev/null +++ b/assets/scripts/highcharts/lineargauge.js @@ -0,0 +1,52 @@ +import Highcharts from 'highcharts'; + +(function lineargaugeModule(H) +{ + H.seriesType('lineargauge', 'column', null, { + setVisible(...args) + { + H.seriesTypes.column.prototype.setVisible.apply(this, args) + if (this.markLine) + { + this.markLine[this.visible ? 'show' : 'hide']() + } + }, + drawPoints() + { + const series = this + const { chart } = this + const { inverted } = chart + const { xAxis } = this + const { yAxis } = this + const point = this.points[0] + + // Hide the column as it is unused for display purposes + if (point.graphic) + { + point.graphic.hide() + } + + // Create or animate the marker + if (!this.markLine) + { + const path = inverted + ? ['M', 0, 0, 'L', -5, -5, 'L', 5, -5, 'L', 0, 0, 'L', 0, xAxis.len] + : ['M', 0, 0, 'L', -5, -5, 'L', -5, 5, 'L', 0, 0, 'L', xAxis.len, 0] + + this.markLine = chart.renderer.path(path) + .attr({ + fill: series.color, + stroke: series.color, + 'stroke-width': 1, + }) + .add() + } + + // Update position + this.markLine.animate({ + translateX: inverted ? xAxis.left + yAxis.translate(point.y) : xAxis.left, + translateY: inverted ? xAxis.top : yAxis.top + yAxis.len - yAxis.translate(point.y), + }) + }, + }) +}(Highcharts)) diff --git a/assets/scripts/hooks/useHighcharts.ts b/assets/scripts/hooks/useHighcharts.ts index f2119e47f..5796e765f 100644 --- a/assets/scripts/hooks/useHighcharts.ts +++ b/assets/scripts/hooks/useHighcharts.ts @@ -6,6 +6,9 @@ import highchartsAccessibility from 'highcharts/modules/accessibility'; import DependencyWheel from 'highcharts/modules/dependency-wheel'; import Sankey from 'highcharts/modules/sankey'; +// Importation du type personnalisé lineargauge +import '../highcharts/lineargauge.js'; + highchartsExporting(Highcharts); exportDataModule(Highcharts); highchartsAccessibility(Highcharts); diff --git a/assets/scripts/map_libre/events.js b/assets/scripts/map_libre/events.js index 363850d79..17bd87613 100644 --- a/assets/scripts/map_libre/events.js +++ b/assets/scripts/map_libre/events.js @@ -137,39 +137,49 @@ export default class Events } } - showArtifCommunesInfoBox(_event, _options) + showArtifCommunesInfoBox(_event) { if (!this.infoBoxNode) this.setInfoBox() - if (_event.features.length > 0) + if (!_event.features.length > 0) { - const { properties } = _event.features[0] - const artifEvo = JSON.parse(properties.artif_evo)[0] + this.infoBoxNode.innerHTML = '' + return + } + const feature = _event.features[0] - this.infoBoxNode.innerHTML = `
${_options.title}
-
Commune: ${properties.name}
-
Code INSEE: ${properties.insee}
-
Surface: ${formatData('number', ['fr-FR', 'unit', 'hectare', 2], properties.area)}
-
Surface artificialisée: ${formatData('number', ['fr-FR', 'unit', 'hectare', 2], properties.surface_artif)}
-
Évolution de l'artificialisation entre ${artifEvo.year_old} et ${artifEvo.year_new}:
- - - - - - - - - - - - - - - -
Surface artificialiséeSurface désartificialiséeArtificialisation nette
${formatData('number', ['fr-FR', 'unit', 'hectare', 2], artifEvo.new_artif)}${formatData('number', ['fr-FR', 'unit', 'hectare', 2], artifEvo.new_natural)}${formatData('number', ['fr-FR', 'unit', 'hectare', 2], artifEvo.net_artif)}
` - this.infoBoxNode.classList.add('visible') + const { properties } = feature + const artifEvo = JSON.parse(properties.artif_evo)[0] + + if (!artifEvo) + { + this.infoBoxNode.innerHTML = '' + return } + + this.infoBoxNode.innerHTML = ` +
Commune : ${properties.name} (${feature.id})
+
Taux d'artificialisation : ${formatData('number', ['fr-FR', 'unit', 'percent', 2], properties.percent_artif)}
+
Surface : ${formatData('number', ['fr-FR', 'unit', 'hectare', 2], properties.area)}
+
Surface artificialisée : ${formatData('number', ['fr-FR', 'unit', 'hectare', 2], properties.surface_artif)}
+
Évolution de l'artificialisation entre ${artifEvo.year_old} et ${artifEvo.year_new} :
+ + + + + + + + + + + + + + + +
Surface artificialiséeSurface désartificialiséeArtificialisation nette
${formatData('number', ['fr-FR', 'unit', 'hectare', 2], artifEvo.new_artif)}${formatData('number', ['fr-FR', 'unit', 'hectare', 2], artifEvo.new_natural)}${formatData('number', ['fr-FR', 'unit', 'hectare', 2], artifEvo.net_artif)}
` + this.infoBoxNode.classList.add('visible') } hideInfoBox() diff --git a/assets/styles/index.css b/assets/styles/index.css index eeebb12a7..f0ea43738 100644 --- a/assets/styles/index.css +++ b/assets/styles/index.css @@ -727,3 +727,39 @@ Utilities width: auto; } } + +/* +Guide +*/ +.guide-container { + display: flex; + align-items: center; + gap: 1.5rem; + padding: 1rem; + border-radius: 6px; + background: #C8F2E5; + margin-bottom: 2rem; +} + +.guide-container--column { + flex-direction: column; + justify-content: space-around; +} + +.guide-icon { + max-width: 75px; + height: auto; +} + +.guide-title { + font-weight: 600; + font-size: 0.9em; + margin-bottom: 0.9rem; +} + +.guide-description { + font-size: 0.8em; + padding: 0; + margin: 0; + margin-bottom: 1rem; +} diff --git a/project/api_views.py b/project/api_views.py index fa3594153..d281a0e46 100644 --- a/project/api_views.py +++ b/project/api_views.py @@ -1,23 +1,8 @@ -"""Public data API views.""" - -from django.contrib.gis.geos import Polygon -from django.db.models import F, OuterRef, Subquery -from django.http import JsonResponse from rest_framework import generics, viewsets -from rest_framework.decorators import action from rest_framework.exceptions import ParseError -from public_data.models import Cerema, Commune -from public_data.models.gpu import ZoneUrba -from public_data.serializers import ZoneUrbaSerializer - from .models import Emprise, Project -from .serializers import ( - EmpriseSerializer, - ProjectCommuneSerializer, - ProjectDetailSerializer, -) -from .views.mixins import UserQuerysetOrPublicMixin +from .serializers import EmpriseSerializer, ProjectDetailSerializer class EmpriseViewSet(viewsets.ReadOnlyModelViewSet): @@ -42,37 +27,3 @@ def get_queryset(self): class ProjectDetailView(generics.RetrieveAPIView): queryset = Project.objects.all() serializer_class = ProjectDetailSerializer - - -class ProjectViewSet(UserQuerysetOrPublicMixin, viewsets.ReadOnlyModelViewSet): - queryset = Project.objects.all() - serializer_class = ProjectCommuneSerializer - - @action(detail=True, methods=["get"]) - def communes(self, request, pk): - project = self.get_object() - sum_function = sum( - [F(f) / 10000 for f in Cerema.get_art_field(project.analyse_start_date, project.analyse_end_date)] - ) - sub_cerema = Cerema.objects.annotate(artif_area=sum_function) - sub_cerema = sub_cerema.filter(city_insee=OuterRef("insee")) - queryset = Commune.objects.annotate( - artif_area=Subquery(sub_cerema.values("artif_area")[:1]), - conso_1121_art=Subquery(sub_cerema.values("naf11art21")[:1]) / 10000, - conso_1121_hab=Subquery(sub_cerema.values("art11hab21")[:1]) / 10000, - conso_1121_act=Subquery(sub_cerema.values("art11act21")[:1]) / 10000, - ).prefetch_related("communediff_set") - - bbox = self.request.GET.get("in_bbox", None) - if bbox is not None and len(bbox) > 0: - polygon_box = Polygon.from_bbox(bbox.split(",")) - queryset = queryset.filter(mpoly__bboverlaps=polygon_box) - serializer = ProjectCommuneSerializer(queryset, many=True) - return JsonResponse(serializer.data, status=200) - - @action(detail=True, methods=["get"]) - def zones(self, request, pk): - project = self.get_object() - queryset = ZoneUrba.objects.intersect(project.combined_emprise) - serializer = ZoneUrbaSerializer(queryset, many=True) - return JsonResponse(serializer.data, status=200) diff --git a/project/charts/AnnualConsoChart.py b/project/charts/AnnualConsoChart.py index 2f548573b..8295be9da 100644 --- a/project/charts/AnnualConsoChart.py +++ b/project/charts/AnnualConsoChart.py @@ -7,6 +7,7 @@ HIGHLIGHT_COLOR, LEGEND_NAVIGATION_EXPORT, ) +from public_data.domain.containers import PublicDataContainer from public_data.models import AdminRef @@ -35,18 +36,12 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def get_series(self): - if not self.series: - if self.level == "REGION": - self.series = self.project.get_land_conso_per_year("region_name") - elif self.level == "DEPART": - self.series = self.project.get_land_conso_per_year("dept_name") - elif self.level == "SCOT": - self.series = self.project.get_land_conso_per_year("scot") - elif self.level == "EPCI": - self.series = self.project.get_land_conso_per_year("epci_name") - else: - self.series = self.project.get_city_conso_per_year(group_name=self.group_name) - return self.series + conso = PublicDataContainer.consommation_progression_service().get_by_land( + land=self.project.land_proxy, + start_date=self.project.analyse_start_date, + end_date=self.project.analyse_end_date, + ) + return {f"{self.project.territory_name}": {f"{c.year}": c.total for c in conso.consommation}} def add_series(self): super().add_series() diff --git a/project/charts/__init__.py b/project/charts/__init__.py index 09bf5168d..6c6e576a7 100644 --- a/project/charts/__init__.py +++ b/project/charts/__init__.py @@ -48,6 +48,9 @@ "NetArtifComparaisonChartExport", "ImperNetteProgression", "ImperNetteProgressionExport", + "PopulationDensityChart", + "PopulationConsoProgressionChart", + "PopulationConsoComparisonChart", ] from .AnnualArtifChart import AnnualArtifChart @@ -89,6 +92,9 @@ CouvertureProgressionChart, CouvertureProgressionChartExport, ) +from .demography.PopulationConsoComparisonChart import PopulationConsoComparisonChart +from .demography.PopulationConsoProgressionChart import PopulationConsoProgressionChart +from .demography.PopulationDensityChart import PopulationDensityChart from .impermeabilisation.ImperByCouverturePieChart import ( ImperByCouverturePieChart, ImperByCouverturePieChartExport, diff --git a/project/charts/consommation/AnnualConsoComparisonChart.py b/project/charts/consommation/AnnualConsoComparisonChart.py index 7d734f376..793a6e85b 100644 --- a/project/charts/consommation/AnnualConsoComparisonChart.py +++ b/project/charts/consommation/AnnualConsoComparisonChart.py @@ -19,12 +19,6 @@ class AnnualConsoComparisonChart(ProjectChart): def param(self): return super().param | { "title": {"text": "Consommation d'espace du territoire et des territoires similaires (en ha)"}, - "subtitle": { - "text": ( - "Proposition de territoires de même maille administrative, " - "il est possible de modifier cette selection dans la légende" - ), - }, "yAxis": {"title": {"text": "Consommé (en ha)"}}, "xAxis": {"type": "category"}, "tooltip": { diff --git a/project/charts/constants.py b/project/charts/constants.py index cdd41d52e..2d6b14074 100644 --- a/project/charts/constants.py +++ b/project/charts/constants.py @@ -85,3 +85,5 @@ def missing_ocsge_diff_message(missing_indicateur: str) -> str: DESARTIFICIALISATION_COLOR = "#00e272" ARTIFICIALISATION_NETTE_COLOR = "#6a6af4" HIGHLIGHT_COLOR = "#fa4b42" + +DENSITY_MAX_IN_HA = 250 # Valeur arbitraire maximale de densité de population, Paris étant la plus elevée à 205 hab/ha diff --git a/project/charts/demography/PopulationConsoComparisonChart.py b/project/charts/demography/PopulationConsoComparisonChart.py new file mode 100644 index 000000000..0a23d3fd3 --- /dev/null +++ b/project/charts/demography/PopulationConsoComparisonChart.py @@ -0,0 +1,91 @@ +from project.charts.base_project_chart import ProjectChart +from project.charts.constants import HIGHLIGHT_COLOR +from public_data.domain.containers import PublicDataContainer + + +class PopulationConsoComparisonChart(ProjectChart): + name = "population conso comparison" + + @property + def param(self): + return super().param | { + "chart": {"type": "bubble"}, + "legend": { + "layout": "vertical", + "align": "right", + "verticalAlign": "middle", + "bubbleLegend": { + "enabled": True, + "borderWidth": 1, + "legendIndex": 100, + "labels": {"format": "{value:.0f} hab"}, + "color": "transparent", + "connectorDistance": 40, + }, + }, + "credits": {"enabled": False}, + "title": { + "text": ( + "Consommation d'espace au regard de l'évolution de la population " + "du territoire et des territoires similaires" + ) + }, + "xAxis": { + "gridLineWidth": 1, + "title": {"text": "Évolution démographique (hab)"}, + "plotLines": [{"color": "#000", "width": 1, "value": 0, "zIndex": 3}], + }, + "yAxis": { + "title": {"text": "Consommation d'espaces NAF (ha)"}, + "maxPadding": 0.2, + "min": 0, + }, + "tooltip": { + "pointFormat": ( + "Consommation : {point.y} ha
" + "Évolution démographique : {point.x} hab
" + "Population totale (%s) : {point.z} hab" + % self.project.analyse_end_date + ), + }, + "series": [], + } + + def get_bubble_series(self): + lands = self.project.comparison_lands_and_self_land() + start_date = int(self.project.analyse_start_date) + end_date = int(self.project.analyse_end_date) + highlighted_land_id = self.project.land_proxy.id + + consommation_total = { + c.land.id: round(c.total, 2) + for c in PublicDataContainer.consommation_stats_service().get_by_lands(lands, start_date, end_date) + } + population_evolution_total = { + p.land.id: p.evolution + for p in PublicDataContainer.population_stats_service().get_by_lands(lands, start_date, end_date) + } + + last_year_populations = { + p.land.id: p.last_year_population.population + for p in PublicDataContainer.population_progression_service().get_by_lands(lands, start_date, end_date) + } + + return [ + { + "name": land.name, + "data": [ + { + "x": population_evolution_total.get(land.id, 0), + "y": consommation_total.get(land.id, 0), + "z": last_year_populations.get(land.id, 0), + } + ], + "color": HIGHLIGHT_COLOR if land.id == highlighted_land_id else None, + # La couleur du territoire diagnostiqué est précisée, les autres sont aléatoires (valeur None) + } + for land in lands + ] + + def add_series(self): + self.chart["series"] = self.get_bubble_series() diff --git a/project/charts/demography/PopulationConsoProgressionChart.py b/project/charts/demography/PopulationConsoProgressionChart.py new file mode 100644 index 000000000..e77e50f40 --- /dev/null +++ b/project/charts/demography/PopulationConsoProgressionChart.py @@ -0,0 +1,114 @@ +from django.utils.functional import cached_property + +from project.charts.base_project_chart import ProjectChart +from public_data.domain.containers import PublicDataContainer + + +class PopulationConsoProgressionChart(ProjectChart): + name = "population conso progression" + + @property + def param(self): + return super().param | { + "title": {"text": "Évolutions de la consommation d'espaces NAF et de la population du territoire"}, + "credits": {"enabled": False}, + "plotOptions": {"series": {"grouping": False, "borderWidth": 0}}, + "xAxis": [ + { + "categories": [ + str(year) + for year in range(int(self.project.analyse_start_date), int(self.project.analyse_end_date) + 1) + ] + } + ], + "yAxis": [ + { + "title": {"text": "Population totale (hab)", "style": {"color": "#fa4b42"}}, + "labels": {"style": {"color": "#fa4b42"}}, + "opposite": True, + }, + { + "labels": {"style": {"color": "#6a6af4"}}, + "title": {"text": "Consommation d'espaces NAF (ha)", "style": {"color": "#6a6af4"}}, + }, + ], + "tooltip": {"shared": True}, + "series": [], + } + + @cached_property + def land_population(self): + return PublicDataContainer.population_progression_service().get_by_land( + land=self.project.land_proxy, + start_date=int(self.project.analyse_start_date), + end_date=int(self.project.analyse_end_date), + ) + + @cached_property + def stock_population_from_insee(self): + return [year.population for year in self.land_population.population if not year.population_calculated] + + @cached_property + def stock_population_calculted(self): + empty_years = [None] * (len(self.stock_population_from_insee) - 2) + last_year_from_insee = self.stock_population_from_insee[-1] + return ( + empty_years + + [last_year_from_insee] + + [year.population for year in self.land_population.population if year.population_calculated] + ) + + def get_progression_consommation(self): + progresison_consommation = ( + PublicDataContainer.consommation_progression_service() + .get_by_land( + land=self.project.land_proxy, + start_date=int(self.project.analyse_start_date), + end_date=int(self.project.analyse_end_date), + ) + .consommation + ) + + return { + "total": [round(year.total, 2) for year in progresison_consommation], + "habitat": [round(year.habitat, 2) for year in progresison_consommation], + } + + def add_series(self): + progression_consommation = self.get_progression_consommation() + + self.chart["series"] = [ + { + "name": "Consommation totale ", + "type": "column", + "yAxis": 1, + "data": progression_consommation["total"], + "tooltip": {"valueSuffix": " ha"}, + "color": "#CFD1E5", + "id": "main", + }, + { + "name": "Consommation à destination de l'habitat ", + "type": "column", + "yAxis": 1, + "data": progression_consommation["habitat"], + "tooltip": {"valueSuffix": " ha"}, + "color": "#6a6af4", + "linkTo": "main", + }, + { + "name": "Population totale", + "type": "spline", + "data": self.stock_population_from_insee, + "tooltip": {"valueSuffix": " hab"}, + "color": "#fa4b42", + }, + { + "name": "Population totale estimée", + "type": "spline", + "data": [None] + self.stock_population_calculted, + "tooltip": {"valueSuffix": " hab"}, + "color": "#fa4b42", + "dashStyle": "Dash", + }, + ] diff --git a/project/charts/demography/PopulationDensityChart.py b/project/charts/demography/PopulationDensityChart.py new file mode 100644 index 000000000..fe1d280c4 --- /dev/null +++ b/project/charts/demography/PopulationDensityChart.py @@ -0,0 +1,72 @@ +import math + +from project.charts.base_project_chart import ProjectChart +from project.charts.constants import DENSITY_MAX_IN_HA +from public_data.domain.containers import PublicDataContainer + + +class PopulationDensityChart(ProjectChart): + name = "population density" + + @property + def param(self): + return super().param | { + "chart": { + "type": "lineargauge", + "inverted": True, + "height": 130, + "marginTop": 80, + "marginLeft": 50, + "marginRight": 50, + }, + "title": {"text": f"Densité de population ({self.project.analyse_end_date})"}, + "xAxis": {"lineColor": "transparent", "labels": {"enabled": False}, "tickLength": 0}, + "yAxis": { + "tickPositions": [0, 50, 100, 150, 200, DENSITY_MAX_IN_HA], + "min": 0, + "max": DENSITY_MAX_IN_HA, + "gridLineWidth": 0, + "title": None, + "labels": {"format": "{value}"}, + "plotBands": [ + {"from": 0, "to": 50, "color": "rgb(242, 181, 168)"}, + {"from": 50, "to": 100, "color": "rgb(242, 159, 142)"}, + {"from": 100, "to": 150, "color": "rgb(242, 133, 111)"}, + {"from": 150, "to": 200, "color": "rgb(242, 77, 45)"}, + {"from": 200, "to": DENSITY_MAX_IN_HA, "color": "rgb(185, 52, 27)"}, + ], + }, + "legend": {"enabled": False}, + "tooltip": {"enabled": False}, + "series": [], + } + + def add_series(self): + progression_population = PublicDataContainer.population_progression_service().get_by_land( + land=self.project.land_proxy, + start_date=int(self.project.analyse_start_date), + end_date=int(self.project.analyse_end_date), + ) + + # On récupére la dernier année de pop sur la période disponible + last_year_data_available = progression_population.population[-1] + density_ha = math.ceil(last_year_data_available.population / self.project.land_proxy.area) + density_km2 = density_ha * 100 + + self.chart["subtitle"] = {"text": f"{density_ha} hab/ha (soit {density_km2} hab/km²)"} + + self.chart["series"] = [ + { + "data": [density_ha], + "color": "#000000", + "dataLabels": { + "enabled": True, + "align": "center", + "color": "#000000", + "format": "{point.y} hab/ha", + "crop": False, + "overflow": "allow", + "y": -20, + }, + } + ] diff --git a/project/charts/demography/__init__.py b/project/charts/demography/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/project/migrations/0103_alter_historicalproject_land_type_and_more.py b/project/migrations/0103_alter_historicalproject_land_type_and_more.py new file mode 100644 index 000000000..91a0755c3 --- /dev/null +++ b/project/migrations/0103_alter_historicalproject_land_type_and_more.py @@ -0,0 +1,12 @@ +# Generated by Django 4.2.13 on 2024-11-28 19:13 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("public_data", "0192_landconso_landconsocomparison_landconsostats_landpop_and_more"), + ("project", "0102_alter_projectcommune_commune"), + ] + + operations = [] diff --git a/project/migrations/0104_merge_20241202_1049.py b/project/migrations/0104_merge_20241202_1049.py new file mode 100644 index 000000000..c10431b1e --- /dev/null +++ b/project/migrations/0104_merge_20241202_1049.py @@ -0,0 +1,12 @@ +# Generated by Django 4.2.13 on 2024-12-02 09:49 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("project", "0103_alter_historicalproject_land_type_and_more"), + ("project", "0103_merge_20241128_1446"), + ] + + operations = [] diff --git a/project/models/project_base.py b/project/models/project_base.py index da253eace..dc42aad70 100644 --- a/project/models/project_base.py +++ b/project/models/project_base.py @@ -23,7 +23,6 @@ from public_data.exceptions import LandException from public_data.models import ( AdminRef, - Cerema, CommuneDiff, CommuneSol, CouvertureSol, @@ -553,125 +552,71 @@ def get_look_a_like(self): self.save(update_fields=["look_a_like"]) return sorted(lands, key=lambda x: x.name) - def get_cerema_cities(self, group_name=None): - if not group_name: - code_insee = self.cities.all().values_list("insee", flat=True) - else: - code_insee = self.projectcommune_set.filter(group_name=group_name) - code_insee = code_insee.values_list("commune__insee", flat=True) - qs = Cerema.objects.pre_annotated() - qs = qs.filter(city_insee__in=code_insee) - return qs - def get_determinants(self, group_name=None): - """Return determinant for project's periode - { - "house" - { - "2015": 10, - "2016": 3, - "2018": 1, - }, - "activity": {...}, - "both": {...}, - "unknown": {...}, - } - """ - determinants = { - "hab": "Habitat", - "act": "Activité", - "mix": "Mixte", - "rou": "Route", - "fer": "Ferré", - "inc": "Inconnu", - } - results = {f: dict() for f in determinants.values()} - args = [] - for year in self.years: - start = year[-2:] - end = str(int(year) + 1)[-2:] - for det in determinants.keys(): - args.append(Sum(f"art{start}{det}{end}")) - qs = self.get_cerema_cities(group_name=group_name).aggregate(*args) - for key, val in qs.items(): - if val is not None: - year = f"20{key[3:5]}" - det = determinants[key[5:8]] - surface_in_sqm = val / 10000 - results[det][year] = surface_in_sqm if surface_in_sqm >= 0 else 0 - return results + from public_data.domain.containers import PublicDataContainer + + conso = PublicDataContainer.consommation_progression_service().get_by_land( + land=self.land_proxy, + start_date=self.analyse_start_date, + end_date=self.analyse_end_date, + ) + data = {"Habitat": {}, "Activité": {}, "Mixte": {}, "Route": {}, "Ferré": {}, "Inconnu": {}} + + for annual_conso in conso.consommation: + year_as_str = str(annual_conso.year) + data["Habitat"][year_as_str] = annual_conso.habitat + data["Activité"][year_as_str] = annual_conso.activite + data["Mixte"][year_as_str] = annual_conso.mixte + data["Route"][year_as_str] = annual_conso.route + data["Ferré"][year_as_str] = annual_conso.ferre + data["Inconnu"][year_as_str] = annual_conso.non_reseigne + + return data def get_bilan_conso(self): """Return the space consummed between 2011 and 2020 in hectare""" - qs = self.get_cerema_cities().aggregate(bilan=Coalesce(Sum("naf11art21"), float(0))) - return qs["bilan"] / 10000 + from public_data.domain.containers import PublicDataContainer + + conso = PublicDataContainer.consommation_stats_service().get_by_land( + land=self.land_proxy, start_date=2011, end_date=2020 + ) + return conso.total def get_bilan_conso_per_year(self): - """Return the space consummed per year between 2011 and 2020""" - qs = self.get_cerema_cities().aggregate( - **{f"20{f[3:5]}": Sum(f) / 10000 for f in Cerema.get_art_field("2011", "2021")} + from public_data.domain.containers import PublicDataContainer + + conso = PublicDataContainer.consommation_progression_service().get_by_land( + land=self.land_proxy, start_date=2011, end_date=2020 ) - return qs + return {f"{c.year}": c.total for c in conso.consommation} def get_bilan_conso_time_scoped(self): - """Return land consummed during the project time scope (between - analyze_start_data and analyze_end_date) - Evaluation is based on city consumption, not geo work.""" - qs = self.get_cerema_cities() - fields = Cerema.get_art_field(self.analyse_start_date, self.analyse_end_date) - sum_function = sum([F(f) for f in fields]) - qs = qs.annotate(line_sum=sum_function) - aggregation = qs.aggregate(bilan=Coalesce(Sum("line_sum"), float(0))) - try: - return aggregation["bilan"] / 10000 - except TypeError: - return 0 + """Return the space consummed between 2011 and 2020 in hectare""" + from public_data.domain.containers import PublicDataContainer + + conso = PublicDataContainer.consommation_stats_service().get_by_land( + land=self.land_proxy, start_date=self.analyse_start_date, end_date=self.analyse_end_date + ) + return conso.total _conso_per_year = None def get_conso_per_year(self, coef=1): - """Return Cerema data for the project, transposed and named after year""" - qs = self.get_cerema_cities() - fields = Cerema.get_art_field(self.analyse_start_date, self.analyse_end_date) - args = (Sum(field) for field in fields) - qs = qs.aggregate(*args) - return {f"20{key[3:5]}": float(val / 10000) * float(coef) for key, val in qs.items()} + from public_data.domain.containers import PublicDataContainer + from public_data.models import Land - def get_land_conso_per_year(self, level, group_name=None): - """Return conso data aggregated by a specific level - { - "dept_name": { - "2015": 10, - "2016": 12, - "2017": 9, - }, - } + conso = PublicDataContainer.consommation_progression_service().get_by_land( + land=Land(public_key=f"{self.land_type}_{self.land_id}"), + start_date=int(self.analyse_start_date), + end_date=int(self.analyse_end_date), + ) - Available level: any Cerema's field - * city_name - * epci_name - * dept_name - * region_name - * scot [experimental] - """ - fields = Cerema.get_art_field(self.analyse_start_date, self.analyse_end_date) - qs = self.get_cerema_cities(group_name=group_name) - qs = qs.values(level) - qs = qs.annotate(**{f"20{field[3:5]}": Sum(field) / 10000 for field in fields}) - return {row[level]: {year: row[year] for year in self.years} for row in qs} + return {f"{c.year}": float(c.total) for c in conso.consommation} - def get_city_conso_per_year(self, group_name=None): - """Return year artificialisation of each city in the project, on project - time scope + def get_land_conso_per_year(self, level, group_name=None): + return {f"{self.territory_name}": self.get_conso_per_year()} - { - "city_name": { - "2015": 10, - "2016": 12, - "2017": 9, - }, - } - """ + def get_city_conso_per_year(self, group_name=None): return self.get_land_conso_per_year("city_name", group_name=group_name) def get_look_a_like_pop_change_per_year( diff --git a/project/serializers.py b/project/serializers.py index e35f93f7c..64f66e69a 100644 --- a/project/serializers.py +++ b/project/serializers.py @@ -71,30 +71,22 @@ class Meta: model = Commune -class CitySpaceConsoMapSerializer(gis_serializers.GeoFeatureModelSerializer): - artif_area = serializers.FloatField() - - class Meta: - fields = ( - "name", - "insee", - "area", - "artif_area", - ) - geo_field = "mpoly" - model = Commune - - class CityArtifMapSerializer(gis_serializers.GeoFeatureModelSerializer): artif_evo = ArtifEvolutionSubSerializer(source="communediff_set", many=True, read_only=True) + percent_artif = serializers.SerializerMethodField() + + def get_percent_artif(self, obj): + return obj.surface_artif * 100 / obj.area class Meta: fields = ( "name", - "insee", "area", "surface_artif", "artif_evo", + "percent_artif", + "insee", ) geo_field = "mpoly" model = Commune + id_field = "insee" diff --git a/project/templates/project/components/charts/artif_detail_couv_chart.html b/project/templates/project/components/charts/artif_detail_couv_chart.html index 80f6836ef..71442b455 100644 --- a/project/templates/project/components/charts/artif_detail_couv_chart.html +++ b/project/templates/project/components/charts/artif_detail_couv_chart.html @@ -78,7 +78,7 @@
Source
-

Données d'OCcupation des Sols à Grande Echelle (OCS GE) de l'IGN, sur la période d'analyse (millésime min : {{ first_millesime }}, millésime max : {{ last_millesime }}).

+ {% include "project/components/widgets/source_ocsge.html" %}
Calcul

OCS GE traduite grâce à la matrice de passage.

diff --git a/project/templates/project/components/charts/artif_detail_usage_chart.html b/project/templates/project/components/charts/artif_detail_usage_chart.html index 361838b29..f440cf79c 100644 --- a/project/templates/project/components/charts/artif_detail_usage_chart.html +++ b/project/templates/project/components/charts/artif_detail_usage_chart.html @@ -79,7 +79,7 @@
Source
-

Données d'OCcupation des Sols à Grande Echelle (OCS GE) de l'IGN, sur la période d'analyse (millésime min : {{ first_millesime }}, millésime max : {{ last_millesime }}).

+ {% include "project/components/widgets/source_ocsge.html" %}
Calcul

OCS GE traduite grâce à la matrice de passage.

diff --git a/project/templates/project/components/charts/report_target_2031_graphic.html b/project/templates/project/components/charts/report_target_2031_graphic.html index eb994c615..5cb70d312 100644 --- a/project/templates/project/components/charts/report_target_2031_graphic.html +++ b/project/templates/project/components/charts/report_target_2031_graphic.html @@ -3,7 +3,7 @@
- {% include "project/components/widgets/chart_buttons.html" with chart="target_2031_chart" %} + {% include "project/components/widgets/chart_buttons.html" with chart="target_2031_chart" show_fullscreen=True %}
diff --git a/project/templates/project/components/dashboard/artificialisation.html b/project/templates/project/components/dashboard/artificialisation.html index 8a276f34e..2485db1ba 100644 --- a/project/templates/project/components/dashboard/artificialisation.html +++ b/project/templates/project/components/dashboard/artificialisation.html @@ -150,20 +150,20 @@

Evolution de l'artificialisation entre {{ first_millesime }} et {{ last_mill
- {% include "project/components/widgets/chart_buttons.html" with chart="chart_waterfall" %} + {% include "project/components/widgets/chart_buttons.html" with chart="chart_waterfall" show_fullscreen=True %}

-
+
{% url 'project:theme-my-artif' project.pk as map_url %} {% include "project/components/map/iframe_map.html" with src=map_url title="Carte comprendre l'artificialisation" %}
-
+
@@ -177,7 +177,7 @@

Evolution de l'artificialisation entre {{ first_millesime }} et {{ last_mill

Source
-

Données d'OCcupation des Sols à Grande Echelle (OCS GE) de l'IGN, sur la période d'analyse traduite grâce à la matrice de passage.

+ {% include "project/components/widgets/source_ocsge.html" %}
Calcul

Artificialisation sur la période - désartificialisation sur la période.

@@ -224,7 +224,7 @@
Données

Artificialisation nette entre {{ first_millesime }} et {{ last_millesime }}

-
+
- {% include "project/components/widgets/chart_buttons.html" with chart="chart_comparison" %} + {% include "project/components/widgets/chart_buttons.html" with chart="chart_comparison" show_fullscreen=True %}
-
- {% url 'project:theme-city-artif' project.pk as dynamic_map_url %} - {% include "project/components/widgets/static_map.html" with dynamic_map_url=dynamic_map_url static_map=project.theme_map_artif title="Carte artificialisation des communes du territoire sur la période (en ha)" %} +
+
+
+ {% url 'project:theme-city-artif' project.pk as map_url %} + {% include "project/components/map/iframe_map.html" with src=map_url title="Carte artificialisation des communes du territoire sur la période (en ha)" %}
@@ -279,7 +281,7 @@

Artificialisation nette entre {{ first_millesime }} et {

Source
-

Données d'OCcupation des Sols à Grande Echelle (OCS GE) de l'IGN, sur la période d'analyse.

+ {% include "project/components/widgets/source_ocsge.html" %}
Calcul

OCS GE traduite grâce à la matrice de passage.

@@ -339,7 +341,7 @@

Grandes familles de couverture des sols des surfaces artificialisées

- {% include "project/components/widgets/chart_buttons.html" with chart="couv_artif_sol" %} + {% include "project/components/widgets/chart_buttons.html" with chart="couv_artif_sol" show_fullscreen=True %}
@@ -348,7 +350,7 @@

Grandes familles de couverture des sols des surfaces artificialisées

- {% include "project/components/widgets/chart_buttons.html" with chart="detail_couv_artif_chart" %} + {% include "project/components/widgets/chart_buttons.html" with chart="detail_couv_artif_chart" show_fullscreen=True %}
@@ -370,7 +372,7 @@

Grandes familles de couverture des sols des surfaces artificialisées

Source
-

Données d'OCcupation des Sols à Grande Echelle (OCS GE) de l'IGN, sur la période d'analyse (millésime min : {{ project.first_year_ocsge }}, millésime max : {{ project.last_year_ocsge }}).

+ {% include "project/components/widgets/source_ocsge.html" %}
Calcul

OCS GE traduite grâce à la matrice de passage.

@@ -435,7 +437,7 @@

Grandes familles d'usages du sol des surfaces artificialisées

- {% include "project/components/widgets/chart_buttons.html" with chart="usage_artif_sol" %} + {% include "project/components/widgets/chart_buttons.html" with chart="usage_artif_sol" show_fullscreen=True %}
@@ -444,7 +446,7 @@

Grandes familles d'usages du sol des surfaces artificialisées

- {% include "project/components/widgets/chart_buttons.html" with chart="detail_usage_artif_chart" %} + {% include "project/components/widgets/chart_buttons.html" with chart="detail_usage_artif_chart" show_fullscreen=True %}
@@ -466,7 +468,7 @@

Grandes familles d'usages du sol des surfaces artificialisées

Source
-

Données d'OCcupation des Sols à Grande Echelle (OCS GE) de l'IGN, sur la période d'analyse (millésime min : {{ project.first_year_ocsge }}, millésime max : {{ project.last_year_ocsge }}).

+ {% include "project/components/widgets/source_ocsge.html" %}
Calcul

OCS GE traduite grâce à la matrice de passage.

diff --git a/project/templates/project/components/dashboard/consommation.html b/project/templates/project/components/dashboard/consommation.html index 4f635b618..b0b143f61 100644 --- a/project/templates/project/components/dashboard/consommation.html +++ b/project/templates/project/components/dashboard/consommation.html @@ -1,11 +1,12 @@ {% load highcharts_tags %} {% load sri %} +
{% include "project/components/widgets/statistic.html" with title=total_surface|floatformat:0|add:" ha" description="Surface du territoire" %}
- {% include "project/components/widgets/statistic.html" with title=conso_period|floatformat:1|add:" ha" description="Consommation de "|add:project.analyse_start_date|add:" à "|add:project.analyse_end_date %} + {% include "project/components/widgets/statistic.html" with title=conso_period|floatformat:2|add:" ha" description="Consommation d'espaces NAF de "|add:project.analyse_start_date|add:" à "|add:project.analyse_end_date %}
@@ -16,7 +17,7 @@

Consommation d'espace annuelle sur le territoire

- {% include "project/components/widgets/chart_buttons.html" with chart="annual_total_conso_chart" %} + {% include "project/components/widgets/chart_buttons.html" with chart="annual_total_conso_chart" show_fullscreen=True %}
@@ -24,7 +25,7 @@

Consommation d'espace annuelle sur le territoire

{% if not is_commune %} -
+
{% url 'project:theme-city-conso' project.pk as map_url %} {% include "project/components/map/iframe_map.html" with src=map_url title="ECarte consommation d'espaces des communes du territoire sur la période (en ha)" %} @@ -46,13 +47,7 @@

Consommation d'espace annuelle sur le territoire

Source
-

- Données d'évolution des fichiers fonciers produits et diffusés par le Cerema depuis 2009 à - partir des fichiers MAJIC (Mise A Jour de l'Information Cadastrale) de la DGFIP. Le dernier - millésime de 2023 est la photographie du territoire au 1er janvier 2023, intégrant les évolutions - réalisées au cours de l'année 2022. - Pour plus d'informations sur "Qu'est-ce qu'un millésime ?". -

+ {% include "project/components/widgets/source_majic.html" %}
Calcul

Données brutes, sans calcul

@@ -95,13 +90,13 @@
Données
-

Destinations de la consommation d'espaces

+

Destinations de la consommation d'espace

- {% include "project/components/widgets/chart_buttons.html" with chart="pie_determinant" %} + {% include "project/components/widgets/chart_buttons.html" with chart="pie_determinant" show_fullscreen=True %}
@@ -110,7 +105,7 @@

Destinations de la consommation d'espaces

- {% include "project/components/widgets/chart_buttons.html" with chart="chart_determinant" %} + {% include "project/components/widgets/chart_buttons.html" with chart="chart_determinant" show_fullscreen=True %}
@@ -132,13 +127,7 @@

Destinations de la consommation d'espaces

Source
-

- Données d'évolution des fichiers fonciers produits et diffusés par le Cerema depuis 2009 à - partir des fichiers MAJIC (Mise A Jour de l'Information Cadastrale) de la DGFIP. Le dernier - millésime de 2023 est la photographie du territoire au 1er janvier 2023, intégrant les évolutions - réalisées au cours de l'année 2022. - Pour plus d'informations sur "Qu'est-ce qu'un millésime ?". -

+ {% include "project/components/widgets/source_majic.html" %}

La ligne "inconnu" comprend les éléments dont la destination n’est pas définie dans les fichiers fonciers. @@ -184,6 +173,103 @@

Données
+
+

Consommation d'espace et démographie

+ +
+
+
+
+
+

{% if population_evolution > 0 %}+{% endif %} {{ population_evolution|floatformat:0 }}

+

Habitant{{ population_evolution|pluralize }} sur la période

+
+
+
+
+

{{ conso_period|floatformat:2 }} ha

+

D'espaces NAF consommés sur la période

+
+
+
+
+
+ {% include "project/components/widgets/chart_buttons.html" with chart="population_density_chart" show_fullscreen=false %} +
+
+
+
+ +
+
+ +
+
Comprendre les données
+
+

+ Sur la période {{ project.analyse_start_date }}-{{ project.analyse_end_date }}, + le territoire de {{ project.territory_name }} + + {% if population_evolution == 0 %} + n'a gagné aucun habitant, + {% else %} + {% if population_evolution > 0 %} + a gagné {{ population_evolution|floatformat:0 }} habitant{{ population_evolution|pluralize }}, + {% else %} + a perdu {{ population_evolution_abs|floatformat:0 }} habitant{{ population_evolution_abs|pluralize }}, + {% endif %} + {% endif %} + soit une évolution de {{ population_evolution_percent|floatformat:2 }}%. +

+

+ Sur cette même période, + {{ consommation_total|floatformat:2 }} ha d'espaces NAF ont été consommés, soit {{ consommation_total_percent|floatformat:2 }}% du territoire. +

+
+
+
+
+
+
+ +
+
+
+ {% include "project/components/widgets/chart_buttons.html" with chart="population_conso_progression_chart" show_fullscreen=True %} +
+
+
+ +
+
+
+
+ + Source de données: +

+ FICHIERS FONCIERS +

+

+ INSEE +

+
+ +
+
+
Source
+ {% include "project/components/widgets/source_majic.html" %} + {% include "project/components/widgets/source_insee.html" %} +
Calcul
+

Données brutes, sans calcul

+

Évolution estimée = (somme des évolutions annuelles de la population) / (nombre d'années)

+ +
Données
+ {{ population_progression_table }} +
+
+
+
+

Comparaison avec les territoires similaires

@@ -223,13 +309,12 @@

Comparaison avec les territoires similaires

Ajouter un territoire de comparaison
- +
- {% include "project/components/widgets/chart_buttons.html" with chart="comparison_chart" %} - + {% include "project/components/widgets/chart_buttons.html" with chart="population_conso_comparison_chart" show_fullscreen=True %}
-
+
@@ -241,40 +326,36 @@

Comparaison avec les territoires similaires

FICHIERS FONCIERS

+

+ INSEE +

- +
-
+
Source
-

- Données d'évolution des fichiers fonciers produits et diffusés par le Cerema depuis 2009 à - partir des fichiers MAJIC (Mise A Jour de l'Information Cadastrale) de la DGFIP. Le dernier - millésime de 2023 est la photographie du territoire au 1er janvier 2023, intégrant les évolutions - réalisées au cours de l'année 2022. - Pour plus d'informations sur "Qu'est-ce qu'un millésime ?". -

+ {% include "project/components/widgets/source_majic.html" %} + {% include "project/components/widgets/source_insee.html" %}
Calcul

Données brutes, sans calcul

Données
- {{ comparison_table }} + {{ population_comparison_table }}
-

Consommation d'espaces rapportée à la surface du territoire

-
- {% include "project/components/widgets/chart_buttons.html" with chart="surface_chart" %} + {% include "project/components/widgets/chart_buttons.html" with chart="surface_proportional_chart" show_fullscreen=True %}
-
+
-
+
@@ -284,62 +365,33 @@

Consommation d'espaces rapportée à la surface du territoire

FICHIERS FONCIERS

- +
-
+
Source
-

- Données d'évolution des fichiers fonciers produits et diffusés par le Cerema depuis 2009 à - partir des fichiers MAJIC (Mise A Jour de l'Information Cadastrale) de la DGFIP. Le dernier - millésime de 2023 est la photographie du territoire au 1er janvier 2023, intégrant les évolutions - réalisées au cours de l'année 2022. - Pour plus d'informations sur "Qu'est-ce qu'un millésime ?". -

+ {% include "project/components/widgets/source_majic.html" %}
Calcul
-

Données brutes, sans calcul

+

+ Pour chaque territoire, la consommation d'espace annuelle est multipliée par 1000 et divisée par + sa surface totale. Le résultat est exprimé en pour mille (‰). +

Données
-
-
-
-
- - - - - - - - - - {% for city_name, data in surface_data_table.items %} - - - {% for year, val in data.items %} - - {% endfor %} - - {% endfor %} - -
- Surface des territoires similaires (en ha) -
Surface des territoires
{{ city_name }}{{ val|floatformat:0 }} Ha
-
-
-
-
+ {{ surface_proportional_data_table }}
- +
+ +
- {% include "project/components/widgets/chart_buttons.html" with chart="surface_proportional_chart" %} - + {% include "project/components/widgets/chart_buttons.html" with chart="comparison_chart" show_fullscreen=True %} +
-
+
- +
@@ -350,28 +402,20 @@
Données
FICHIERS FONCIERS

- +
-
+
Source
-

- Données d'évolution des fichiers fonciers produits et diffusés par le Cerema depuis 2009 à - partir des fichiers MAJIC (Mise A Jour de l'Information Cadastrale) de la DGFIP. Le dernier - millésime de 2023 est la photographie du territoire au 1er janvier 2023, intégrant les évolutions - réalisées au cours de l'année 2022. - Pour plus d'informations sur "Qu'est-ce qu'un millésime ?". -

+ {% include "project/components/widgets/source_majic.html" %}
Calcul
-

- Pour chaque territoire, la consommation d'espace annuelle est multipliée par 1000 et divisée par - sa surface totale. Le résultat est exprimé en pour mille (‰). -

- +

Données brutes, sans calcul

+
Données
- {{ surface_proportional_data_table }} + {{ comparison_table }}
+
@@ -497,5 +541,7 @@

Ajouter un territoire de {% display_chart_data 'comparison_chart' comparison_chart CSP_NONCE %} {% display_chart_data 'chart_determinant' determinant_per_year_chart CSP_NONCE %} {% display_chart_data 'pie_determinant' determinant_pie_chart CSP_NONCE %} -{% display_chart_data 'surface_chart' surface_chart CSP_NONCE %} {% display_chart_data 'surface_proportional_chart' surface_proportional_chart CSP_NONCE %} +{% display_chart_data 'population_density_chart' population_density_chart CSP_NONCE %} +{% display_chart_data 'population_conso_progression_chart' population_conso_progression_chart CSP_NONCE %} +{% display_chart_data 'population_conso_comparison_chart' population_conso_comparison_chart CSP_NONCE %} diff --git a/project/templates/project/components/dashboard/gpu.html b/project/templates/project/components/dashboard/gpu.html index 3c5cea532..d7f7ec2e5 100644 --- a/project/templates/project/components/dashboard/gpu.html +++ b/project/templates/project/components/dashboard/gpu.html @@ -69,7 +69,8 @@

Synthèse

Source
-

Données d'OCcupation des Sols à Grande Echelle (OCS GE) de l'IGN, sur la période d'analyse. Zonages d'Urbanisme issus du Géoportail de l'Urbanisme (GPU) en date de juin 2023: https://www.geoportail-urbanisme.gouv.fr/

+ {% include "project/components/widgets/source_ocsge.html" %} + {% include "project/components/widgets/source_gpu.html" %}
Calcul

Qualifier l'artificialisation de chaque parcelle OCS GE via la matrice d'artficialisation (consulter). Puis comparer la surface totale des parcelles artificialisées dans chaque zonage d'urbanisme à la surface de la zone pour connaître le taux d'occupation.

diff --git a/project/templates/project/components/dashboard/impermeabilisation.html b/project/templates/project/components/dashboard/impermeabilisation.html index adcb7bd18..431220cb8 100644 --- a/project/templates/project/components/dashboard/impermeabilisation.html +++ b/project/templates/project/components/dashboard/impermeabilisation.html @@ -8,7 +8,7 @@

Evolution de l'imperméabilisation entre {{ first_millesime }} et {{ last_mi
- {% include "project/components/widgets/chart_buttons.html" with chart="imper_nette_chart" %} + {% include "project/components/widgets/chart_buttons.html" with chart="imper_nette_chart" show_fullscreen=True %}
@@ -29,7 +29,7 @@

Evolution de l'imperméabilisation entre {{ first_millesime }} et {{ last_mi

Source
-

Données d'OCcupation des Sols à Grande Echelle (OCS GE) de l'IGN, sur la période d'analyse traduite grâce à la matrice de passage.

+ {% include "project/components/widgets/source_ocsge.html" %}
Calcul

Imperméabilisation nette = Imperméabilisation sur la période - Désimperméabilisation sur la période.

@@ -51,7 +51,7 @@

Familles de couverture des sols des surfaces imperméabilisées

- {% include "project/components/widgets/chart_buttons.html" with chart="imper_repartition_couv_chart" %} + {% include "project/components/widgets/chart_buttons.html" with chart="imper_repartition_couv_chart" show_fullscreen=True %}
@@ -60,7 +60,7 @@

Familles de couverture des sols des surfaces imperméabilisées

- {% include "project/components/widgets/chart_buttons.html" with chart="imper_progression_couv_chart" %} + {% include "project/components/widgets/chart_buttons.html" with chart="imper_progression_couv_chart" show_fullscreen=True %}
@@ -82,7 +82,7 @@

Familles de couverture des sols des surfaces imperméabilisées

Source
-

Données d'OCcupation des Sols à Grande Echelle (OCS GE) de l'IGN, sur la période d'analyse (millésime min : {{ project.first_year_ocsge }}, millésime max : {{ project.last_year_ocsge }}).

+ {% include "project/components/widgets/source_ocsge.html" %}
Calcul

OCS GE traduite grâce à la matrice de passage.

@@ -105,7 +105,7 @@

Grandes familles d'usages du sol des surfaces imperméabilisées

- {% include "project/components/widgets/chart_buttons.html" with chart="imper_repartition_usage_chart" %} + {% include "project/components/widgets/chart_buttons.html" with chart="imper_repartition_usage_chart" show_fullscreen=True %}
@@ -114,7 +114,7 @@

Grandes familles d'usages du sol des surfaces imperméabilisées

- {% include "project/components/widgets/chart_buttons.html" with chart="imper_progression_usage_chart" %} + {% include "project/components/widgets/chart_buttons.html" with chart="imper_progression_usage_chart" show_fullscreen=True %}
@@ -136,7 +136,7 @@

Grandes familles d'usages du sol des surfaces imperméabilisées

Source
-

Données d'OCcupation des Sols à Grande Echelle (OCS GE) de l'IGN, sur la période d'analyse (millésime min : {{ project.first_year_ocsge }}, millésime max : {{ project.last_year_ocsge }}).

+ {% include "project/components/widgets/source_ocsge.html" %}
Calcul

OCS GE traduite grâce à la matrice de passage.

diff --git a/project/templates/project/components/dashboard/ocsge.html b/project/templates/project/components/dashboard/ocsge.html index fd69b80c7..545c8ebf0 100644 --- a/project/templates/project/components/dashboard/ocsge.html +++ b/project/templates/project/components/dashboard/ocsge.html @@ -10,7 +10,7 @@

Répartition

- {% include "project/components/widgets/chart_buttons.html" with chart="chart_couv_pie" %} + {% include "project/components/widgets/chart_buttons.html" with chart="chart_couv_pie" show_fullscreen=True %}
@@ -18,7 +18,7 @@

Répartition

- {% include "project/components/widgets/chart_buttons.html" with chart="chart_couv_prog" %} + {% include "project/components/widgets/chart_buttons.html" with chart="chart_couv_prog" show_fullscreen=True %}
@@ -39,7 +39,7 @@

Répartition

Source
-

Données d'Occupation des Sols à Grande Echelle (OCS GE) de l'IGN, sur la période d'analyse traduite grâce à la matrice de passage.

+ {% include "project/components/widgets/source_ocsge.html" %}
Calcul

Données brutes, sans calcul.

@@ -93,7 +93,7 @@

Matrice de passage de {{ first_millesime }} à {{ last_millesime }} :

- {% include "project/components/widgets/chart_buttons.html" with chart="chart_couv_wheel" %} + {% include "project/components/widgets/chart_buttons.html" with chart="chart_couv_wheel" show_fullscreen=True %}
@@ -112,7 +112,7 @@

Matrice de passage de {{ first_millesime }} à {{ last_millesime }} :

Source
-

Données d'OCcupation des Sols à Grande Echelle (OCS GE) de l'IGN, sur la période d'analyse traduite grâce à la matrice de passage.

+ {% include "project/components/widgets/source_ocsge.html" %}
Calcul

Données brutes, sans calcul.

@@ -181,7 +181,7 @@

Répartition

- {% include "project/components/widgets/chart_buttons.html" with chart="chart_usa_pie" %} + {% include "project/components/widgets/chart_buttons.html" with chart="chart_usa_pie" show_fullscreen=True %}
@@ -189,7 +189,7 @@

Répartition

- {% include "project/components/widgets/chart_buttons.html" with chart="chart_usa_prog" %} + {% include "project/components/widgets/chart_buttons.html" with chart="chart_usa_prog" show_fullscreen=True %}
@@ -210,7 +210,7 @@

Répartition

Source
-

Données d'Occupation des Sols à Grande Echelle (OCS GE) de l'IGN, sur la période d'analyse traduite grâce à la matrice de passage.

+ {% include "project/components/widgets/source_ocsge.html" %}
Calcul

Données brutes, sans calcul.

@@ -264,7 +264,7 @@

Matrice de passage de {{ first_millesime }} à {{ last_millesime }} :

- {% include "project/components/widgets/chart_buttons.html" with chart="chart_usa_wheel" %} + {% include "project/components/widgets/chart_buttons.html" with chart="chart_usa_wheel" show_fullscreen=True %}
@@ -283,7 +283,7 @@

Matrice de passage de {{ first_millesime }} à {{ last_millesime }} :

Source
-

Données d'Occupation des Sols à Grande Echelle (OCS GE) de l'IGN, sur la période d'analyse traduite grâce à la matrice de passage.

+ {% include "project/components/widgets/source_ocsge.html" %}
Calcul

Artificialisation sur la période - désartificialisation sur la période.

diff --git a/project/templates/project/components/dashboard/synthese.html b/project/templates/project/components/dashboard/synthese.html index 4d588f9c5..b41419731 100644 --- a/project/templates/project/components/dashboard/synthese.html +++ b/project/templates/project/components/dashboard/synthese.html @@ -29,12 +29,7 @@

Estimation de la trajectoire 2031

Source
-

- Données d'évolution des fichiers fonciers produits et diffusés par le Cerema depuis 2009 à - partir des fichiers MAJIC (Mise A Jour de l'Information Cadastrale) de la DGFIP. Le dernier - millésime de 2023 est la photographie du territoire au 1er janvier 2023, intégrant les évolutions - réalisées au cours de l'année 2022. -

+ {% include "project/components/widgets/source_majic.html" %}
Calcul

La Loi Climat & Résilience recommande entre 2021 et 2031 à l'échelle régionale, de diviser par 2 la consommation d'espaces NAF (Naturels, Agricoles et Forestiers) mesurée entre 2011 et 2021 ; le même calcul a été appliqué à l'échelle du territoire comme scénario standard.

@@ -76,12 +71,7 @@

Bilan de la consommation d'espaces

Source
-

- Données d'évolution des fichiers fonciers produits et diffusés par le Cerema depuis 2009 à - partir des fichiers MAJIC (Mise A Jour de l'Information Cadastrale) de la DGFIP. Le dernier - millésime de 2023 est la photographie du territoire au 1er janvier 2023, intégrant les évolutions - réalisées au cours de l'année 2022. -

+ {% include "project/components/widgets/source_majic.html" %}
Calcul

Les données du Cerema donnent la consommation d'espaces NAF (Naturels, Agricoles et Forestiers) par année, par destination et par commune.

diff --git a/project/templates/project/components/map/iframe_map.html b/project/templates/project/components/map/iframe_map.html index 4d0c072c4..020f0a0ee 100644 --- a/project/templates/project/components/map/iframe_map.html +++ b/project/templates/project/components/map/iframe_map.html @@ -1,6 +1,6 @@