Bladeren bron

💬 standardize naming things

jmacura 3 jaren geleden
bovenliggende
commit
2ce10b8a5b

+ 5 - 1
src/app/discs-chart/disc.component.ts

@@ -2,6 +2,7 @@ import {AfterViewInit, Component, Input, OnInit} from '@angular/core';
 
 import {select} from 'd3';
 
+import abbreviationMap from '../../assets/data/abbreviation-map.json';
 import {DiscsChartBaseService} from './discs-chart-base.service';
 import {SdmDihService} from '../sdm-dih.service';
 
@@ -150,7 +151,10 @@ export class DiscComponent implements OnInit, AfterViewInit {
       .text((d) => {
         switch (this.show) {
           case 'factor':
-            return this.factor.split('/').pop();
+            return (
+              abbreviationMap[this.factor.split('/').pop()] ??
+              this.factor.split('/').pop()
+            );
           case 'scenario':
             return this.scenario;
           case 'name':

+ 2 - 5
src/app/discs-chart/factor-year-graph/factor-year-graph.component.html

@@ -1,8 +1,5 @@
 <div class="card">
-  <h2>Detailed overview of individual regions</h2>
-  <p>An aggregated attractiveness index is composed of six factors: anthropic, cultural, economic, institutional,
-    natural
-    and social. Due to the incompleteness of data provided by different regions, we only present four of them below.</p>
+  <h2>Evolution of sub-indices in the pilot regions</h2>
   <div *ngIf="sdmDihService.yearsLoaded; else loading" class="card-body">
     <div class="year-range">
       <span><button (click)="prevYear()">&#9665;</button></span>
@@ -28,7 +25,7 @@
   </select-->
       <div class="d-flex">
         <div class="discs-caption">
-          <h4>Rural attractiveness index</h4>
+          <h4>Index of Rural Attractiveness</h4>
           <p>
             of region <strong>{{region}}</strong> in {{yearGraphService.selectedYear}}
           </p>

+ 1 - 1
src/app/dots-chart/region-graph/region-graph.component.html

@@ -1,4 +1,4 @@
-  <h3>Detailed overview of {{region}}</h3>
+  Evolution of sub-indices over time in <b>{{region}}</b>
   <div class="plot-place" *ngIf="dataLoaded; else loading">
     <plotly-plot [data]="data" [layout]="plotlyLayout" [config]="plotlyConfig" [className]="'plotly-plot'"
       [useResizeHandler]="true"></plotly-plot>

+ 4 - 1
src/app/dots-chart/region-graph/region-graph.component.ts

@@ -1,5 +1,6 @@
 import {Component, Input, OnChanges, SimpleChanges} from '@angular/core';
 
+import abbreviationMap from '../../../assets/data/abbreviation-map.json';
 import {SdmDihService} from '../../sdm-dih.service';
 
 @Component({
@@ -69,7 +70,9 @@ export class RegionGraphComponent implements OnChanges {
             continue;
           }
           years.push(regionData['TIME_STEP']);
-          const factorBeautifulName = factor.split('/').pop();
+          let factorBeautifulName =
+            abbreviationMap[factor.split('/').pop()] ?? factor.split('/').pop();
+          factorBeautifulName += ' index';
           factors.push(factorBeautifulName);
           colors.push(regionData[factor]?.index);
         }

+ 1 - 4
src/app/pages/exploring-dynamics/exploring-dynamics.component.html

@@ -17,11 +17,8 @@
   </p>
 
   <div class="card my-5">
-    <h2>Detailed overview of individual regions</h2>
+    <h2>Evolution of sub-indices in the pilot regions</h2>
     <div class="card-body">
-      <p>An aggregated attractiveness index is composed of six factors: anthropic, cultural, economic, institutional,
-        natural and social. Due to the incompleteness of data provided by different regions, we only present four of
-        them below.</p>
       <ng-container *ngFor="let region of sdmDihService.regions; last as isLast">
         <region-graph [region]="region"></region-graph>
         <hr *ngIf="!isLast">

+ 18 - 0
src/assets/data/abbreviation-map.json

@@ -0,0 +1,18 @@
+{
+  "aggregated": "RAI",
+  "anthropic": "human-made environment",
+  "natural": "natural environment",
+  "baseline": "business as usual",
+  "INFR": "infrastructure development",
+  "INFR mix": "investment into broadband & roads",
+  "INFR Focus Broadband": "investment into broadband only",
+  "INFR Focus Roads": "investment into roads only",
+  "AGRI": "agriculture policy",
+  "AGRI Focus AKIS": "investment only into the agric. innovation & knowledge system (AKIS)",
+  "AGRI Focus Eco-Schemes": "investment only into eco-schemes",
+  "AGRI mix": "investment into AKIS & Eco-Schemes",
+  "ENTRP": "support to Entrepreneurship",
+  "ENTRP High": "high rate of support to entrepreneurs",
+  "ENTRP Medium": "medium rate of support to entrepreneurs",
+  "ENTRP Low": "low rate of support to entrepreneurs"
+}