diff --git a/interfaces/IBF-dashboard/src/app/components/aggregates/aggregates.component.ts b/interfaces/IBF-dashboard/src/app/components/aggregates/aggregates.component.ts index d509afa77..a8f22e897 100644 --- a/interfaces/IBF-dashboard/src/app/components/aggregates/aggregates.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/aggregates/aggregates.component.ts @@ -177,9 +177,10 @@ export class AggregatesComponent implements OnInit, OnDestroy { }; private onIndicatorChange = (newIndicators: Indicator[]) => { - // clean data to avoid these inefficient filters and loops const filterAggregateIndicators = (indicator: Indicator) => - indicator.aggregateIndicator.includes(this.country.countryCodeISO3); + indicator.countryDisasterTypes[this.country.countryCodeISO3][ + this.disasterType.disasterType + ].includes('aggregate'); this.indicators = newIndicators.filter(filterAggregateIndicators); }; diff --git a/interfaces/IBF-dashboard/src/app/components/matrix/matrix.component.ts b/interfaces/IBF-dashboard/src/app/components/matrix/matrix.component.ts index 1826a0384..eac409a2c 100644 --- a/interfaces/IBF-dashboard/src/app/components/matrix/matrix.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/matrix/matrix.component.ts @@ -46,7 +46,7 @@ export class MatrixComponent implements OnDestroy { } private onLayerChange = (newLayer: IbfLayer) => { - if (newLayer && newLayer.name === 'alert_threshold') { + if (newLayer && newLayer.name === IbfLayerName.alertThreshold) { return; } diff --git a/interfaces/IBF-dashboard/src/app/services/map.service.ts b/interfaces/IBF-dashboard/src/app/services/map.service.ts index 2a4976c72..450565790 100644 --- a/interfaces/IBF-dashboard/src/app/services/map.service.ts +++ b/interfaces/IBF-dashboard/src/app/services/map.service.ts @@ -84,18 +84,6 @@ export class MapService { private disasterType: DisasterType; private placeCode: PlaceCode; - private aggregatesToExclude = { - MWI: { - [DisasterTypeKey.flashFloods]: [ - 'nr_affected_roads', - 'nr_affected_schools', - 'nr_affected_clinics', - 'nr_affected_waterpoints', - 'nr_affected_buildings', - ], - }, - }; - constructor( private countryService: CountryService, private adminLevelService: AdminLevelService, @@ -419,18 +407,10 @@ export class MapService { return; } - Object.keys(this.aggregatesToExclude).includes( - this.country.countryCodeISO3, - ); - if ( - !this.aggregatesToExclude[this.country.countryCodeISO3] || - !this.aggregatesToExclude[this.country.countryCodeISO3][ - this.disasterType.disasterType - ] || - !this.aggregatesToExclude[this.country.countryCodeISO3][ + indicator.countryDisasterTypes[this.country.countryCodeISO3][ this.disasterType.disasterType - ].includes(indicator.name) + ].includes('map') ) { const layerActive = this.adminLevelService.activeLayerNames.length ? this.adminLevelService.activeLayerNames.includes(indicator.name) diff --git a/interfaces/IBF-dashboard/src/app/types/indicator-group.ts b/interfaces/IBF-dashboard/src/app/types/indicator-group.ts index 7e3f017e8..c184aca79 100644 --- a/interfaces/IBF-dashboard/src/app/types/indicator-group.ts +++ b/interfaces/IBF-dashboard/src/app/types/indicator-group.ts @@ -2,13 +2,13 @@ import { LayerActivation } from '../models/layer-activation.enum'; import { ColorBreaks, IbfLayerLabel, IbfLayerName } from './ibf-layer'; export class Indicator { + countryDisasterTypes: JSON; name: IbfLayerName; label: IbfLayerLabel; icon: string; active: LayerActivation; numberFormatMap: NumberFormat; numberFormatAggregate: NumberFormat; - aggregateIndicator: string; weightedAvg: boolean; weightVar: IbfLayerName; colorBreaks?: ColorBreaks; diff --git a/services/API-service/migration/1693224120772-RemoveLayerCountryDisasterType.ts b/services/API-service/migration/1693224120772-RemoveLayerCountryDisasterType.ts new file mode 100644 index 000000000..74ca3da89 --- /dev/null +++ b/services/API-service/migration/1693224120772-RemoveLayerCountryDisasterType.ts @@ -0,0 +1,43 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; + +export class RemoveLayerCountryDisasterType1693224120772 + implements MigrationInterface +{ + name = 'RemoveLayerCountryDisasterType1693224120772'; + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "IBF-app"."indicator-metadata" DROP COLUMN "countryCodes"`, + ); + await queryRunner.query( + `ALTER TABLE "IBF-app"."layer-metadata" DROP COLUMN "countryCodes"`, + ); + await queryRunner.query( + `ALTER TABLE "IBF-app"."indicator-metadata" DROP COLUMN "aggregateIndicator"`, + ); + await queryRunner.query( + `ALTER TABLE "IBF-app"."indicator-metadata" ADD "countryDisasterTypes" json NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "IBF-app"."layer-metadata" ADD "countryDisasterTypes" json NOT NULL DEFAULT '{}'`, + ); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "IBF-app"."indicator-metadata" DROP COLUMN "countryDisasterTypes"`, + ); + await queryRunner.query( + `ALTER TABLE "IBF-app"."layer-metadata" DROP COLUMN "countryDisasterTypes"`, + ); + await queryRunner.query( + `ALTER TABLE "IBF-app"."indicator-metadata" ADD "aggregateIndicator" character varying`, + ); + await queryRunner.query( + `ALTER TABLE "IBF-app"."layer-metadata" ADD "countryCodes" character varying`, + ); + await queryRunner.query( + `ALTER TABLE "IBF-app"."indicator-metadata" ADD "countryCodes" character varying`, + ); + } +} diff --git a/services/API-service/package.json b/services/API-service/package.json index 8df045447..85d2d8833 100644 --- a/services/API-service/package.json +++ b/services/API-service/package.json @@ -18,7 +18,7 @@ "test:dev": "npm test -- --watchAll", "test:coverage": "npm test -- --coverage --coverageDirectory=coverage", "typeorm": "ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js", - "migration:generate": "npm run typeorm migration:generate -- -d ./appdatasource.ts -n", + "migration:generate": "npm run typeorm migration:generate -- -d ./appdatasource.ts", "migration:run": "npm run typeorm migration:run -- -d ./appdatasource.ts", "migration:revert": "npm run typeorm migration:revert -- -d ./appdatasource.ts" }, diff --git a/services/API-service/src/api/disaster/disaster.entity.ts b/services/API-service/src/api/disaster/disaster.entity.ts index 00b258de8..cda1131a4 100644 --- a/services/API-service/src/api/disaster/disaster.entity.ts +++ b/services/API-service/src/api/disaster/disaster.entity.ts @@ -7,8 +7,6 @@ import { PrimaryGeneratedColumn, } from 'typeorm'; import { DisasterType } from './disaster-type.enum'; -import { IndicatorMetadataEntity } from '../metadata/indicator-metadata.entity'; -import { LayerMetadataEntity } from '../metadata/layer-metadata.entity'; import { ApiProperty } from '@nestjs/swagger'; import { LeadTime, @@ -62,20 +60,6 @@ export class DisasterEntity { @Column({ nullable: true }) public maxLeadTime: LeadTime; - @ManyToMany( - (): typeof IndicatorMetadataEntity => IndicatorMetadataEntity, - (indicators): DisasterEntity[] => indicators.disasterTypes, - ) - @JoinTable() - public indicators: IndicatorMetadataEntity[]; - - @ManyToMany( - (): typeof LayerMetadataEntity => LayerMetadataEntity, - (layers): DisasterEntity[] => layers.disasterTypes, - ) - @JoinTable() - public layers: LayerMetadataEntity[]; - @ManyToMany( (): typeof UserEntity => UserEntity, (user): DisasterEntity[] => user.disasterTypes, diff --git a/services/API-service/src/api/metadata/dto/add-indicators.dto.ts b/services/API-service/src/api/metadata/dto/add-indicators.dto.ts index e21a178cf..f975c0b9e 100644 --- a/services/API-service/src/api/metadata/dto/add-indicators.dto.ts +++ b/services/API-service/src/api/metadata/dto/add-indicators.dto.ts @@ -1,22 +1,21 @@ import { IsBoolean, - IsEnum, IsIn, IsNotEmpty, IsNumber, IsString, } from 'class-validator'; import { ApiProperty } from '@nestjs/swagger'; -import { DisasterType } from '../../disaster/disaster-type.enum'; export class IndicatorDto { - @ApiProperty({ example: process.env.COUNTRIES }) - @IsString() - public countryCodes: string; - - @ApiProperty({ example: [{ disasterType: DisasterType.Floods }] }) - @IsEnum(DisasterType) - public disasterTypes: DisasterType[]; + @ApiProperty({ + example: { + EGY: { + 'heavy-rain': ['map', 'aggregate'], + }, + }, + }) + public countryDisasterTypes: JSON; @ApiProperty() @IsString() @@ -57,9 +56,6 @@ export class IndicatorDto { @IsString() public numberFormatMap: string; - @ApiProperty({ example: process.env.COUNTRIES }) - public aggregateIndicator: string | null; - @ApiProperty({ example: 'decimal0' }) @IsIn(['decimal0', 'decimal2', 'perc']) public numberFormatAggregate: string; diff --git a/services/API-service/src/api/metadata/indicator-metadata.entity.ts b/services/API-service/src/api/metadata/indicator-metadata.entity.ts index b53a821dc..facdd436e 100644 --- a/services/API-service/src/api/metadata/indicator-metadata.entity.ts +++ b/services/API-service/src/api/metadata/indicator-metadata.entity.ts @@ -1,7 +1,5 @@ import { ApiProperty } from '@nestjs/swagger'; -import { Entity, PrimaryGeneratedColumn, Column, ManyToMany } from 'typeorm'; -import { DisasterType } from '../disaster/disaster-type.enum'; -import { DisasterEntity } from '../disaster/disaster.entity'; +import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm'; @Entity('indicator-metadata') export class IndicatorMetadataEntity { @@ -9,16 +7,10 @@ export class IndicatorMetadataEntity { @PrimaryGeneratedColumn('uuid') public id: string; - @ApiProperty({ example: process.env.COUNTRIES }) - @Column() - public countryCodes: string; - - @ApiProperty({ example: [{ disasterType: DisasterType.Floods }] }) - @ManyToMany( - (): typeof DisasterEntity => DisasterEntity, - (disasterTypes): IndicatorMetadataEntity[] => disasterTypes.indicators, - ) - public disasterTypes: DisasterEntity[]; + @Column('json', { + default: {}, + }) + public countryDisasterTypes: JSON; @ApiProperty() @Column() @@ -60,10 +52,6 @@ export class IndicatorMetadataEntity { @Column() public numberFormatMap: string; - @ApiProperty({ example: process.env.COUNTRIES }) - @Column() - public aggregateIndicator: string | null; - @ApiProperty({ example: 'decimal0' }) @Column() public numberFormatAggregate: string; diff --git a/services/API-service/src/api/metadata/layer-metadata.entity.ts b/services/API-service/src/api/metadata/layer-metadata.entity.ts index 2ec3c5d12..1f2251e01 100644 --- a/services/API-service/src/api/metadata/layer-metadata.entity.ts +++ b/services/API-service/src/api/metadata/layer-metadata.entity.ts @@ -1,8 +1,6 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsIn } from 'class-validator'; -import { Entity, PrimaryGeneratedColumn, Column, ManyToMany } from 'typeorm'; -import { DisasterType } from '../disaster/disaster-type.enum'; -import { DisasterEntity } from '../disaster/disaster.entity'; +import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm'; @Entity('layer-metadata') export class LayerMetadataEntity { @@ -10,16 +8,10 @@ export class LayerMetadataEntity { @PrimaryGeneratedColumn('uuid') public id: string; - @ApiProperty({ example: process.env.COUNTRIES }) - @Column() - public countryCodes: string; - - @ApiProperty({ example: [{ disasterType: DisasterType.Floods }] }) - @ManyToMany( - (): typeof DisasterEntity => DisasterEntity, - (disasterTypes): LayerMetadataEntity[] => disasterTypes.layers, - ) - public disasterTypes: DisasterEntity[]; + @Column('json', { + default: {}, + }) + public countryDisasterTypes: JSON; @ApiProperty() @Column() diff --git a/services/API-service/src/api/metadata/metadata.service.ts b/services/API-service/src/api/metadata/metadata.service.ts index fb0f5f45c..551e6f458 100644 --- a/services/API-service/src/api/metadata/metadata.service.ts +++ b/services/API-service/src/api/metadata/metadata.service.ts @@ -2,7 +2,6 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; import { DisasterType } from '../disaster/disaster-type.enum'; -import { DisasterEntity } from '../disaster/disaster.entity'; import { AddIndicatorsDto, IndicatorDto } from './dto/add-indicators.dto'; import { AddLayersDto, LayerDto } from './dto/add-layers.dto'; import { IndicatorMetadataEntity } from './indicator-metadata.entity'; @@ -14,8 +13,6 @@ export class MetadataService { private readonly indicatorRepository: Repository; @InjectRepository(LayerMetadataEntity) private readonly layerRepository: Repository; - @InjectRepository(DisasterEntity) - private readonly disasterRepository: Repository; public async addOrUpdateIndicators( indicators: AddIndicatorsDto, @@ -48,14 +45,9 @@ export class MetadataService { indicatorEntity: IndicatorMetadataEntity, indicator: IndicatorDto, ): Promise { - indicatorEntity.countryCodes = indicator.countryCodes; - indicatorEntity.disasterTypes = await this.disasterRepository.find({ - where: indicator.disasterTypes.map( - (countryDisasterType: DisasterType): object => { - return { disasterType: countryDisasterType }; - }, - ), - }); + indicatorEntity.description = JSON.parse( + JSON.stringify(indicator.countryDisasterTypes || {}), + ); indicatorEntity.label = indicator.label; indicatorEntity.icon = indicator.icon; indicatorEntity.weightedAvg = indicator.weightedAvg; @@ -65,7 +57,6 @@ export class MetadataService { JSON.stringify(indicator.colorBreaks), ); indicatorEntity.numberFormatMap = indicator.numberFormatMap; - indicatorEntity.aggregateIndicator = indicator.aggregateIndicator; indicatorEntity.numberFormatAggregate = indicator.numberFormatAggregate; indicatorEntity.order = indicator.order; indicatorEntity.dynamic = indicator.dynamic; @@ -106,14 +97,6 @@ export class MetadataService { layerEntity: LayerMetadataEntity, layer: LayerDto, ): Promise { - layerEntity.countryCodes = layer.countryCodes; - layerEntity.disasterTypes = await this.disasterRepository.find({ - where: layer.disasterTypes.map( - (countryDisasterType: DisasterType): object => { - return { disasterType: countryDisasterType }; - }, - ), - }); layerEntity.label = layer.label; layerEntity.type = layer.type; layerEntity.legendColor = layer.legendColor @@ -132,15 +115,11 @@ export class MetadataService { countryCodeISO3: string, disasterType: DisasterType, ): Promise { - const indicators = await this.indicatorRepository.find({ - relations: ['disasterTypes'], - }); + const indicators = await this.indicatorRepository.find(); return indicators.filter( (metadata: IndicatorMetadataEntity): boolean => - metadata.countryCodes.split(',').includes(countryCodeISO3) && - metadata.disasterTypes - .map((d) => d.disasterType) - .includes(disasterType), + metadata.countryDisasterTypes?.[countryCodeISO3] && + metadata.countryDisasterTypes?.[countryCodeISO3][disasterType], ); } @@ -148,16 +127,12 @@ export class MetadataService { countryCodeISO3: string, disasterType: DisasterType, ): Promise { - const layers = await this.layerRepository.find({ - relations: ['disasterTypes'], - }); + const layers = await this.layerRepository.find(); return layers.filter( (metadata: LayerMetadataEntity): boolean => - metadata.countryCodes.split(',').includes(countryCodeISO3) && - metadata.disasterTypes - .map((d) => d.disasterType) - .includes(disasterType), + metadata.description?.[countryCodeISO3] && + metadata.description?.[countryCodeISO3][disasterType], ); } } diff --git a/services/API-service/src/scripts/json/_add-info-popup-xlsx-columns.js b/services/API-service/src/scripts/json/_add-info-popup-xlsx-columns.js index bd1479368..1b8d189f3 100644 --- a/services/API-service/src/scripts/json/_add-info-popup-xlsx-columns.js +++ b/services/API-service/src/scripts/json/_add-info-popup-xlsx-columns.js @@ -34,43 +34,41 @@ const indicatorsToAdd = []; const populateIndicators = () => { indicatorMetadata.forEach((indicator) => { - indicator.countryCodes.split(',').forEach((cc) => { - if (cc !== '') { + Object.keys(indicator.countryDisasterTypes).forEach((cc) => { + const country = countries.find( + (country) => country.countryCodeISO3 === cc, + ); + const disasterTypes = indicator.countryDisasterTypes[cc]; + Object.keys(disasterTypes).forEach((disasterType) => { + if (country.disasterTypes.includes(disasterType)) { + indicatorsFromJSON.push({ + section: sectionNames.generalIndicator, + layer: indicator.name, + countryCodeISO3: cc, + disasterType: disasterType, + }); + } + }); + }); + }); + + layerMetadata.forEach((layer) => { + if (layer.type === 'wms' || layer.type === 'point') { + Object.keys(layer.description).forEach((cc) => { const country = countries.find( (country) => country.countryCodeISO3 === cc, ); - indicator.disasterTypes.forEach((disasterType) => { + const disasterTypes = layer.description[cc]; + Object.keys(disasterTypes).forEach((disasterType) => { if (country.disasterTypes.includes(disasterType)) { indicatorsFromJSON.push({ - section: sectionNames.generalIndicator, - layer: indicator.name, + section: sectionNames.layerIndicator, + layer: layer.name, countryCodeISO3: cc, disasterType: disasterType, }); } }); - } - }); - }); - - layerMetadata.forEach((layer) => { - if (layer.type === 'wms' || layer.type === 'point') { - layer.countryCodes.split(',').forEach((cc) => { - if (cc !== '') { - const country = countries.find( - (country) => country.countryCodeISO3 === cc, - ); - layer.disasterTypes.forEach((disasterType) => { - if (country.disasterTypes.includes(disasterType)) { - indicatorsFromJSON.push({ - section: sectionNames.layerIndicator, - layer: layer.name, - countryCodeISO3: cc, - disasterType: disasterType, - }); - } - }); - } }); } }); diff --git a/services/API-service/src/scripts/json/indicator-metadata.json b/services/API-service/src/scripts/json/indicator-metadata.json index 1a20e8357..aeb196905 100644 --- a/services/API-service/src/scripts/json/indicator-metadata.json +++ b/services/API-service/src/scripts/json/indicator-metadata.json @@ -1,15 +1,16 @@ [ { - "countryCodes": "PHL,ETH,ZWE,EGY,UGA,ZMB,KEN,MWI,SSD", - "disasterTypes": [ - "dengue", - "malaria", - "drought", - "typhoon", - "floods", - "heavy-rain", - "flash-floods" - ], + "countryDisasterTypes": { + "EGY": { "heavy-rain": ["map"] }, + "ETH": { "drought": ["map"], "floods": ["map"], "malaria": ["map"] }, + "KEN": { "drought": ["map"], "floods": ["map"] }, + "MWI": { "flash-floods": ["map"], "floods": ["map"] }, + "PHL": { "dengue": ["map"], "floods": ["map"], "typhoon": ["map"] }, + "SSD": { "floods": ["map"] }, + "UGA": { "drought": ["map"], "floods": ["map"], "heavy-rain": ["map"] }, + "ZMB": { "drought": ["map"], "floods": ["map"] }, + "ZWE": { "drought": ["map"] } + }, "name": "alert_threshold", "label": "Alert Threshold Reached", "icon": "Person2-white.svg", @@ -17,7 +18,6 @@ "active": "yes", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "decimal0", "weightvar": null, "order": -100, @@ -63,8 +63,33 @@ } }, { - "countryCodes": "UGA,ZMB,KEN,ETH,EGY,ZWE,PHL,MWI,SSD", - "disasterTypes": ["floods", "heavy-rain", "drought", "flash-floods"], + "countryDisasterTypes": { + "EGY": { "heavy-rain": ["map", "aggregate"] }, + "ETH": { + "drought": ["map", "aggregate"], + "floods": ["map", "aggregate"] + }, + "KEN": { + "drought": ["map", "aggregate"], + "floods": ["map", "aggregate"] + }, + "MWI": { + "flash-floods": ["map", "aggregate"], + "floods": ["map", "aggregate"] + }, + "PHL": { "floods": ["map", "aggregate"] }, + "SSD": { "floods": ["map", "aggregate"] }, + "UGA": { + "drought": ["map", "aggregate"], + "floods": ["map", "aggregate"], + "heavy-rain": ["map", "aggregate"] + }, + "ZMB": { + "drought": ["map", "aggregate"], + "floods": ["map", "aggregate"] + }, + "ZWE": { "drought": ["map", "aggregate"] } + }, "name": "population_affected", "label": "Exposed population", "icon": "Affected-population-white.svg", @@ -72,7 +97,6 @@ "active": "if-trigger", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "UGA,ZMB,KEN,ETH,EGY,ZWE,PHL,MWI,SSD", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 1, @@ -115,8 +139,7 @@ } }, { - "countryCodes": "PHL", - "disasterTypes": ["typhoon"], + "countryDisasterTypes": { "PHL": { "typhoon": ["map", "aggregate"] } }, "name": "affected_population", "label": "Affected population", "icon": "Affected-population-white.svg", @@ -124,7 +147,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "PHL", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 1, @@ -137,8 +159,15 @@ } }, { - "countryCodes": "UGA,ZMB,KEN,ETH,EGY,PHL,MWI,SSD", - "disasterTypes": ["floods"], + "countryDisasterTypes": { + "ETH": { "floods": ["map"] }, + "KEN": { "floods": ["map"] }, + "MWI": { "floods": ["map"] }, + "PHL": { "floods": ["map"] }, + "SSD": { "floods": ["map"] }, + "UGA": { "floods": ["map"] }, + "ZMB": { "floods": ["map"] } + }, "name": "population_affected_percentage", "label": "% of Total Population", "icon": "Affected-population-white.svg", @@ -146,7 +175,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "perc", - "aggregateIndicator": "", "numberFormatAggregate": "perc", "weightvar": null, "order": 1, @@ -180,8 +208,31 @@ } }, { - "countryCodes": "UGA,ZMB,KEN,ETH,EGY,ZWE,PHL,MWI,SSD", - "disasterTypes": ["floods", "heavy-rain", "malaria", "drought"], + "countryDisasterTypes": { + "EGY": { "heavy-rain": ["map", "aggregate"] }, + "ETH": { + "drought": ["map", "aggregate"], + "floods": ["map", "aggregate"], + "malaria": ["map", "aggregate"] + }, + "KEN": { + "drought": ["map", "aggregate"], + "floods": ["map", "aggregate"] + }, + "MWI": { "floods": ["map", "aggregate"] }, + "PHL": { "floods": ["map", "aggregate"] }, + "SSD": { "floods": ["map", "aggregate"] }, + "UGA": { + "drought": ["map", "aggregate"], + "floods": ["map", "aggregate"], + "heavy-rain": ["map", "aggregate"] + }, + "ZMB": { + "drought": ["map", "aggregate"], + "floods": ["map", "aggregate"] + }, + "ZWE": { "drought": ["map", "aggregate"] } + }, "name": "populationTotal", "label": "Total Population", "icon": "Person2-white.svg", @@ -189,7 +240,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "UGA,ZMB,KEN,ETH,EGY,ZWE,PHL,MWI,SSD", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, @@ -232,8 +282,10 @@ } }, { - "countryCodes": "PHL,ETH", - "disasterTypes": ["dengue", "malaria"], + "countryDisasterTypes": { + "ETH": { "malaria": ["map", "aggregate"] }, + "PHL": { "dengue": ["map", "aggregate"] } + }, "name": "potential_cases", "label": "Potential Cases", "icon": "Affected-population-white.svg", @@ -241,7 +293,6 @@ "active": "yes", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "PHL,ETH", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 1, @@ -257,8 +308,11 @@ } }, { - "countryCodes": "UGA,KEN,MWI", - "disasterTypes": ["floods"], + "countryDisasterTypes": { + "KEN": { "floods": ["map"] }, + "MWI": { "floods": ["map"] }, + "UGA": { "floods": ["map"] } + }, "name": "flood_vulnerability_index", "label": "Flood Vulnerability Index", "icon": "Affected-population-white.svg", @@ -272,7 +326,6 @@ "5": { "label": "Very High", "valueLow": 8, "valueHigh": 10 } }, "numberFormatMap": "decimal2", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 3, @@ -290,8 +343,7 @@ } }, { - "countryCodes": "UGA", - "disasterTypes": ["floods"], + "countryDisasterTypes": { "UGA": { "floods": ["map"] } }, "name": "poverty_incidence", "label": "Poverty incidence", "icon": "Poverty-white.svg", @@ -299,7 +351,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "perc", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 4, @@ -311,8 +362,7 @@ } }, { - "countryCodes": "UGA", - "disasterTypes": ["floods"], + "countryDisasterTypes": { "UGA": { "floods": ["map", "aggregate"] } }, "name": "female_head_hh", "label": "Female-headed household", "icon": "Female.svg", @@ -320,7 +370,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "perc", - "aggregateIndicator": "UGA", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 4, @@ -332,8 +381,9 @@ } }, { - "countryCodes": "ETH", - "disasterTypes": ["floods", "malaria"], + "countryDisasterTypes": { + "ETH": { "drought": ["map"], "floods": ["map"], "malaria": ["map"] } + }, "name": "population_u5", "label": "Population U5", "icon": "Children-white.svg", @@ -341,7 +391,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 4, @@ -355,8 +404,7 @@ } }, { - "countryCodes": "MWI", - "disasterTypes": ["floods"], + "countryDisasterTypes": { "MWI": { "floods": ["map", "aggregate"] } }, "name": "exposed_pop_u18", "label": "Exposed population U18", "icon": "Children-white.svg", @@ -364,7 +412,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "MWI", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, @@ -376,8 +423,7 @@ } }, { - "countryCodes": "MWI", - "disasterTypes": ["floods"], + "countryDisasterTypes": { "MWI": { "floods": ["map", "aggregate"] } }, "name": "exposed_pop_65", "label": "Exposed population 65+", "icon": "Elderly-white.svg", @@ -385,7 +431,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "MWI", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, @@ -397,8 +442,7 @@ } }, { - "countryCodes": "UGA", - "disasterTypes": ["floods"], + "countryDisasterTypes": { "UGA": { "floods": ["map", "aggregate"] } }, "name": "population_u8", "label": "Population U8", "icon": "Children-white.svg", @@ -406,7 +450,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "perc", - "aggregateIndicator": "UGA", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 4, @@ -418,8 +461,7 @@ } }, { - "countryCodes": "PHL", - "disasterTypes": ["dengue"], + "countryDisasterTypes": { "PHL": { "dengue": ["map"] } }, "name": "population_u9", "label": "Population U9", "icon": "Children-white.svg", @@ -427,7 +469,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "perc", - "aggregateIndicator": "", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 4, @@ -439,8 +480,7 @@ } }, { - "countryCodes": "UGA", - "disasterTypes": ["floods"], + "countryDisasterTypes": { "UGA": { "floods": ["map", "aggregate"] } }, "name": "population_over65", "label": "Population 65+", "icon": "Elderly-white.svg", @@ -448,7 +488,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "perc", - "aggregateIndicator": "UGA", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 4, @@ -463,8 +502,7 @@ } }, { - "countryCodes": "PHL", - "disasterTypes": ["dengue"], + "countryDisasterTypes": { "PHL": { "dengue": ["map", "aggregate"] } }, "name": "population_over65", "label": "Population 65+", "icon": "Elderly-white.svg", @@ -472,7 +510,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "perc", - "aggregateIndicator": "UGA", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 4, @@ -487,8 +524,7 @@ } }, { - "countryCodes": "UGA", - "disasterTypes": ["floods"], + "countryDisasterTypes": { "UGA": { "floods": ["map"] } }, "name": "wall_type", "label": "Permanent wall type", "icon": "House-white.svg", @@ -496,7 +532,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "perc", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 4, @@ -508,8 +543,7 @@ } }, { - "countryCodes": "UGA", - "disasterTypes": ["floods"], + "countryDisasterTypes": { "UGA": { "floods": ["map"] } }, "name": "roof_type", "label": "Permanent roof type", "icon": "House-white.svg", @@ -517,7 +551,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "perc", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 4, @@ -525,8 +558,7 @@ "description": { "UGA": { "floods": "Not currently available" } } }, { - "countryCodes": "UGA", - "disasterTypes": ["floods"], + "countryDisasterTypes": { "UGA": { "floods": ["map"] } }, "name": "covid_risk", "label": "COVID Risk", "icon": "", @@ -534,7 +566,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal2", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 3, @@ -547,8 +578,7 @@ } }, { - "countryCodes": "ETH", - "disasterTypes": ["malaria"], + "countryDisasterTypes": { "ETH": { "malaria": ["map"] } }, "name": "malaria_risk", "label": "Malaria risk", "icon": "", @@ -556,7 +586,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 4, @@ -569,8 +598,7 @@ } }, { - "countryCodes": "ETH", - "disasterTypes": ["malaria"], + "countryDisasterTypes": { "ETH": { "malaria": ["map"] } }, "name": "malaria_suitable_temperature", "label": "Malaria suitable temperature", "icon": "", @@ -578,7 +606,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal2", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 4, @@ -591,8 +618,9 @@ } }, { - "countryCodes": "ETH", - "disasterTypes": ["floods", "malaria"], + "countryDisasterTypes": { + "ETH": { "floods": ["map"], "malaria": ["map"] } + }, "name": "total_idps", "label": "Total IDPs", "icon": "", @@ -600,7 +628,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 4, @@ -615,8 +642,7 @@ } }, { - "countryCodes": "ETH", - "disasterTypes": ["malaria"], + "countryDisasterTypes": { "ETH": { "malaria": ["map"] } }, "name": "motorized_travel_time_to_health", "label": "Motorized travel time to health facility", "icon": "", @@ -624,7 +650,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 4, @@ -637,8 +662,7 @@ } }, { - "countryCodes": "ETH", - "disasterTypes": ["malaria"], + "countryDisasterTypes": { "ETH": { "malaria": ["map"] } }, "name": "walking_travel_time_to_health", "label": "Walking travel time to health facility", "icon": "", @@ -646,7 +670,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 4, @@ -655,8 +678,9 @@ "description": { "ETH": { "malaria": "Ongoing (updated regularly)" } } }, { - "countryCodes": "ETH", - "disasterTypes": ["floods", "malaria"], + "countryDisasterTypes": { + "ETH": { "floods": ["map"], "malaria": ["map"] } + }, "name": "travel_time_cities", "label": "Travel time to city", "icon": "", @@ -664,7 +688,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 4, @@ -678,8 +701,7 @@ } }, { - "countryCodes": "ETH", - "disasterTypes": ["floods"], + "countryDisasterTypes": { "ETH": { "floods": ["map"] } }, "name": "IPC_forecast_short", "label": "IPC forecast (short)", "icon": "", @@ -693,7 +715,6 @@ "5": { "label": "Famine", "valueLow": 5, "valueHigh": 5 } }, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 3, @@ -706,8 +727,10 @@ } }, { - "countryCodes": "ETH,UGA", - "disasterTypes": ["malaria", "drought"], + "countryDisasterTypes": { + "ETH": { "drought": ["map"], "malaria": ["map"] }, + "UGA": { "drought": ["map"] } + }, "name": "IPC_forecast_long", "label": "IPC forecast (long)", "icon": "", @@ -721,7 +744,6 @@ "5": { "label": "Famine", "valueLow": 5, "valueHigh": 5 } }, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 3, @@ -738,8 +760,7 @@ } }, { - "countryCodes": "ETH", - "disasterTypes": ["floods"], + "countryDisasterTypes": { "ETH": { "floods": ["map"] } }, "name": "Hotspot_General", "label": "Woreda need priority class", "icon": "", @@ -752,7 +773,6 @@ "4": { "label": "Priority 3", "valueLow": 3, "valueHigh": 3 } }, "numberFormatMap": "decimal2", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 3, @@ -767,8 +787,7 @@ } }, { - "countryCodes": "ETH", - "disasterTypes": ["floods"], + "countryDisasterTypes": { "ETH": { "floods": ["map"] } }, "name": "Hotspot_Water", "label": "WASH need priority class", "icon": "", @@ -781,7 +800,6 @@ "4": { "label": "Priority 3", "valueLow": 3, "valueHigh": 3 } }, "numberFormatMap": "decimal2", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 3, @@ -796,8 +814,7 @@ } }, { - "countryCodes": "ETH", - "disasterTypes": ["malaria"], + "countryDisasterTypes": { "ETH": { "malaria": ["map"] } }, "name": "Hotspot_Health", "label": "Health need priority class", "icon": "", @@ -810,7 +827,6 @@ "4": { "label": "Priority 3", "valueLow": 3, "valueHigh": 3 } }, "numberFormatMap": "decimal2", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 3, @@ -823,8 +839,7 @@ } }, { - "countryCodes": "ETH", - "disasterTypes": ["drought"], + "countryDisasterTypes": { "ETH": { "drought": ["map"] } }, "name": "Hotspot_Nutrition", "label": "Nutrition need priority class", "icon": "", @@ -837,7 +852,6 @@ "4": { "label": "Priority 3", "valueLow": 3, "valueHigh": 3 } }, "numberFormatMap": "decimal2", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 3, @@ -850,8 +864,7 @@ } }, { - "countryCodes": "PHL", - "disasterTypes": ["dengue"], + "countryDisasterTypes": { "PHL": { "dengue": ["map"] } }, "name": "dengue_cases_average", "label": "Dengue Cases Average", "icon": "Affected-population-white.svg", @@ -859,7 +872,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 4, @@ -872,8 +884,9 @@ } }, { - "countryCodes": "PHL", - "disasterTypes": ["typhoon", "floods"], + "countryDisasterTypes": { + "PHL": { "floods": ["map"], "typhoon": ["map"] } + }, "name": "vulnerable_group", "label": "Vulnerable Groups", "icon": "", @@ -881,7 +894,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "perc", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 4, @@ -895,8 +907,9 @@ } }, { - "countryCodes": "PHL", - "disasterTypes": ["typhoon", "floods"], + "countryDisasterTypes": { + "PHL": { "floods": ["map"], "typhoon": ["map"] } + }, "name": "vulnerable_housing", "label": "Vulnerable Housing", "icon": "", @@ -904,7 +917,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "perc", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 4, @@ -918,8 +930,7 @@ } }, { - "countryCodes": "PHL", - "disasterTypes": ["typhoon"], + "countryDisasterTypes": { "PHL": { "typhoon": ["map"] } }, "name": "total_houses", "label": "Total houses", "icon": "", @@ -927,7 +938,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightVar": null, "order": -99, @@ -940,8 +950,7 @@ } }, { - "countryCodes": "PHL", - "disasterTypes": ["dengue"], + "countryDisasterTypes": { "PHL": { "dengue": ["map"] } }, "name": "dengue_incidence_average", "label": "Dengue incidence (cases per year per 10M)", "icon": "", @@ -949,7 +958,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 4, @@ -962,8 +970,7 @@ } }, { - "countryCodes": "ZWE", - "disasterTypes": ["drought"], + "countryDisasterTypes": { "ZWE": { "drought": ["map"] } }, "name": "small_ruminants", "label": "Total small ruminants", "icon": "", @@ -971,7 +978,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 3, @@ -983,8 +989,7 @@ } }, { - "countryCodes": "ZWE", - "disasterTypes": ["drought"], + "countryDisasterTypes": { "ZWE": { "drought": ["map"] } }, "name": "cattle", "label": "Total cattle", "icon": "", @@ -992,7 +997,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 3, @@ -1004,8 +1008,10 @@ } }, { - "countryCodes": "ZWE,KEN", - "disasterTypes": ["drought"], + "countryDisasterTypes": { + "KEN": { "drought": ["map"] }, + "ZWE": { "drought": ["map"] } + }, "name": "drought_vulnerability_index", "label": "Drought vulnerability index", "icon": "", @@ -1013,7 +1019,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal2", - "aggregateIndicator": "", "numberFormatAggregate": "decimal2", "weightvar": null, "order": 3, @@ -1028,8 +1033,7 @@ } }, { - "countryCodes": "UGA", - "disasterTypes": ["drought"], + "countryDisasterTypes": { "UGA": { "drought": ["map"] } }, "name": "vulnerability_index", "label": "Vulnerability index", "icon": "", @@ -1037,7 +1041,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal2", - "aggregateIndicator": "", "numberFormatAggregate": "decimal2", "weightvar": null, "order": 3, @@ -1049,8 +1052,7 @@ } }, { - "countryCodes": "ETH", - "disasterTypes": ["malaria"], + "countryDisasterTypes": { "ETH": { "malaria": ["map", "aggregate"] } }, "name": "potential_cases_U5", "label": "Potential Cases U5", "icon": "Children-white.svg", @@ -1058,7 +1060,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "ETH", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, @@ -1071,8 +1072,7 @@ } }, { - "countryCodes": "PHL", - "disasterTypes": ["dengue"], + "countryDisasterTypes": { "PHL": { "dengue": ["map", "aggregate"] } }, "name": "potential_cases_U9", "label": "Potential Cases U9", "icon": "Children-white.svg", @@ -1080,7 +1080,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "PHL", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, @@ -1093,8 +1092,10 @@ } }, { - "countryCodes": "PHL,ETH", - "disasterTypes": ["dengue", "malaria"], + "countryDisasterTypes": { + "ETH": { "malaria": ["map"] }, + "PHL": { "dengue": ["map", "aggregate"] } + }, "name": "potential_cases_65", "label": "Potential Cases 65+", "icon": "Elderly-white.svg", @@ -1102,7 +1103,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "PHL", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, @@ -1118,8 +1118,7 @@ } }, { - "countryCodes": "ZWE", - "disasterTypes": ["drought"], + "countryDisasterTypes": { "ZWE": { "drought": ["map", "aggregate"] } }, "name": "cattle_exposed", "label": "Cattle exposed", "icon": "Livestock.svg", @@ -1127,7 +1126,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "ZWE", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, @@ -1140,8 +1138,7 @@ } }, { - "countryCodes": "ZWE", - "disasterTypes": ["drought"], + "countryDisasterTypes": { "ZWE": { "drought": ["map", "aggregate"] } }, "name": "small_ruminants_exposed", "label": "Small ruminants exposed", "icon": "Small Ruminants_Chicken.svg", @@ -1149,7 +1146,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "ZWE", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, @@ -1162,8 +1158,7 @@ } }, { - "countryCodes": "PHL", - "disasterTypes": ["typhoon"], + "countryDisasterTypes": { "PHL": { "typhoon": ["map", "aggregate"] } }, "name": "houses_affected", "label": "% of houses affected", "icon": "House-white.svg", @@ -1171,7 +1166,6 @@ "active": "if-trigger", "colorBreaks": null, "numberFormatMap": "perc", - "aggregateIndicator": "PHL", "numberFormatAggregate": "perc", "weightVar": "total_houses", "order": 2, @@ -1184,8 +1178,7 @@ } }, { - "countryCodes": "PHL", - "disasterTypes": ["typhoon"], + "countryDisasterTypes": { "PHL": { "typhoon": ["map"] } }, "name": "prob_within_50km", "label": "Prob. of within 50km of track", "icon": "Person2-white.svg", @@ -1193,7 +1186,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "perc", - "aggregateIndicator": "", "numberFormatAggregate": "perc", "weightvar": null, "order": 2, @@ -1206,8 +1198,7 @@ } }, { - "countryCodes": "PHL", - "disasterTypes": ["typhoon"], + "countryDisasterTypes": { "PHL": { "typhoon": ["map"] } }, "name": "windspeed", "label": "Maximum wind speed", "icon": "Person2-white.svg", @@ -1215,7 +1206,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, @@ -1229,8 +1219,7 @@ } }, { - "countryCodes": "PHL", - "disasterTypes": ["typhoon"], + "countryDisasterTypes": { "PHL": { "typhoon": ["map"] } }, "name": "rainfall", "label": "Accumulative rainfall", "icon": "Person2-white.svg", @@ -1238,7 +1227,6 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, @@ -1252,8 +1240,7 @@ } }, { - "countryCodes": "MWI", - "disasterTypes": ["flash-floods"], + "countryDisasterTypes": { "MWI": { "flash-floods": ["map", "aggregate"] } }, "name": "damage_estimation", "label": "Estimation of damage", "icon": "Estimated_damage.svg", @@ -1261,18 +1248,17 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "MWI", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, "dynamic": true, "lazyLoad": true, "unit": "MWK", - "aggregateUnit": "MWK" + "aggregateUnit": "MWK", + "description": { "MWI": { "flash-floods": "TBD" } } }, { - "countryCodes": "MWI", - "disasterTypes": ["flash-floods"], + "countryDisasterTypes": { "MWI": { "flash-floods": ["aggregate"] } }, "name": "nr_affected_roads", "label": "Affected roads", "icon": "Roads_affected.svg", @@ -1280,18 +1266,17 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "MWI", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, "dynamic": true, "lazyLoad": true, "unit": "km", - "aggregateUnit": "km" + "aggregateUnit": "km", + "description": { "MWI": { "flash-floods": "TBD" } } }, { - "countryCodes": "MWI", - "disasterTypes": ["flash-floods"], + "countryDisasterTypes": { "MWI": { "flash-floods": ["aggregate"] } }, "name": "nr_affected_schools", "label": "Affected schools", "icon": "Schools_affected.svg", @@ -1299,17 +1284,16 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "MWI", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, "dynamic": true, "lazyLoad": true, - "unit": "schools" + "unit": "schools", + "description": { "MWI": { "flash-floods": "TBD" } } }, { - "countryCodes": "MWI", - "disasterTypes": ["flash-floods"], + "countryDisasterTypes": { "MWI": { "flash-floods": ["aggregate"] } }, "name": "nr_affected_clinics", "label": "Affected health sites", "icon": "Clinics_affected.svg", @@ -1317,17 +1301,16 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "MWI", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, "dynamic": true, "lazyLoad": true, - "unit": "health sites" + "unit": "health sites", + "description": { "MWI": { "flash-floods": "TBD" } } }, { - "countryCodes": "MWI", - "disasterTypes": ["flash-floods"], + "countryDisasterTypes": { "MWI": { "flash-floods": ["aggregate"] } }, "name": "nr_affected_waterpoints", "label": "Affected waterpoints", "icon": "Waterpoints_affected.svg", @@ -1335,17 +1318,16 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "MWI", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, "dynamic": true, "lazyLoad": true, - "unit": "waterpoints" + "unit": "waterpoints", + "description": { "MWI": { "flash-floods": "TBD" } } }, { - "countryCodes": "MWI", - "disasterTypes": ["flash-floods"], + "countryDisasterTypes": { "MWI": { "flash-floods": ["aggregate"] } }, "name": "nr_affected_buildings", "label": "Affected buildings", "icon": "Buildings_affected.svg", @@ -1353,17 +1335,16 @@ "active": "no", "colorBreaks": null, "numberFormatMap": "decimal0", - "aggregateIndicator": "MWI", "numberFormatAggregate": "decimal0", "weightvar": null, "order": 2, "dynamic": true, "lazyLoad": true, - "unit": "buildings" + "unit": "buildings", + "description": { "MWI": { "flash-floods": "TBD" } } }, { - "countryCodes": "KEN", - "disasterTypes": ["drought"], + "countryDisasterTypes": { "KEN": { "drought": ["map"] } }, "name": "drought_phase_classification", "label": "Drought phase classification", "icon": "", @@ -1377,7 +1358,6 @@ "5": { "label": "Recovery", "valueLow": 5, "valueHigh": 5 } }, "numberFormatMap": "decimal2", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 2, @@ -1390,8 +1370,7 @@ } }, { - "countryCodes": "KEN", - "disasterTypes": ["drought"], + "countryDisasterTypes": { "KEN": { "drought": ["map"] } }, "name": "vegetation_condition", "label": "Vegetation condition", "icon": "", @@ -1421,7 +1400,6 @@ } }, "numberFormatMap": "decimal2", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 2, @@ -1434,8 +1412,7 @@ } }, { - "countryCodes": "KEN", - "disasterTypes": ["drought"], + "countryDisasterTypes": { "KEN": { "drought": ["map"] } }, "name": "livestock_body_condition", "label": "Livestock body condition", "icon": "", @@ -1447,7 +1424,6 @@ "3": { "label": "Good", "valueLow": 3, "valueHigh": 3 } }, "numberFormatMap": "decimal2", - "aggregateIndicator": "", "numberFormatAggregate": "", "weightvar": null, "order": 2, diff --git a/services/API-service/src/scripts/json/layer-metadata.json b/services/API-service/src/scripts/json/layer-metadata.json index b543a0aca..9500a28b1 100644 --- a/services/API-service/src/scripts/json/layer-metadata.json +++ b/services/API-service/src/scripts/json/layer-metadata.json @@ -1,17 +1,11 @@ [ { - "countryCodes": "UGA,ZMB,KEN,ETH,PHL,MWI,SSD", - "disasterTypes": ["floods", "flash-floods"], "name": "flood_extent", "label": "Flood extent", "type": "wms", "legendColor": { - "ETH": { - "floods": { "type": "square", "value": ["#d7301f"] } - }, - "KEN": { - "floods": { "type": "square", "value": ["#d7301f"] } - }, + "ETH": { "floods": { "type": "square", "value": ["#d7301f"] } }, + "KEN": { "floods": { "type": "square", "value": ["#d7301f"] } }, "MWI": { "floods": { "type": "square", "value": ["#d7301f"] }, "flash-floods": { @@ -34,15 +28,9 @@ "value": ["#ffff00", "#ffa500", "#d7301f"] } }, - "SSD": { - "floods": { "type": "square", "value": ["#d7301f"] } - }, - "UGA": { - "floods": { "type": "square", "value": ["#d7301f"] } - }, - "ZMB": { - "floods": { "type": "square", "value": ["#d7301f"] } - } + "SSD": { "floods": { "type": "square", "value": ["#d7301f"] } }, + "UGA": { "floods": { "type": "square", "value": ["#d7301f"] } }, + "ZMB": { "floods": { "type": "square", "value": ["#d7301f"] } } }, "leadTimeDependent": true, "active": "if-trigger", @@ -54,6 +42,7 @@ "floods": "The flood extent layer indicates the inundated area of recurring floods within a return period depending on the EAP (for example 20-years) based on a global hydrological model.

Source link: The flood extent maps compare six global flood hazard models and one local model. These models are CaMa-UT [Yamazaki D 2011], GLOFRIS [Winsemius H 2013], ECMWF [Pappenberge 2012], JRC [Dottori 2016], SSBN [Sampson 2015], CIMA-UNEP [UNISDR 2015] and local model ATKINS[2012]." }, "MWI": { + "flash-floods": "TBD", "floods": "

The flood extent layer indicates the inundated area of recurring floods within a return period depending on the EAP (for example 10-years) based on a global hydrological model.

Source link: Flood hazard map of the World - 10-year return period. European Commission, Joint Research Centre (JRC). 2016. Flood hazard map of the World - 10-year return period - European Commission (europa.eu).

" }, "PHL": { @@ -71,16 +60,11 @@ } }, { - "countryCodes": "EGY,UGA", - "disasterTypes": ["heavy-rain"], "name": "rainfall_extent", "label": "Rainfall extent", "type": "wms", "legendColor": { - "EGY": { - "type": "square", - "value": ["#d7301f"] - }, + "EGY": { "type": "square", "value": ["#d7301f"] }, "UGA": { "type": "gradient", "value": [ @@ -106,8 +90,6 @@ } }, { - "countryCodes": "ETH,UGA", - "disasterTypes": ["drought"], "name": "rainfall_forecast", "label": "Rainfall forecast", "type": "wms", @@ -135,8 +117,6 @@ } }, { - "countryCodes": "UGA,ZMB,KEN,ETH,EGY,ZWE,PHL,MWI,SSD", - "disasterTypes": ["floods", "heavy-rain", "drought"], "name": "population", "label": "Population", "type": "wms", @@ -179,8 +159,6 @@ } }, { - "countryCodes": "UGA,ZMB,KEN,ETH,ZWE", - "disasterTypes": ["floods", "drought"], "name": "cropland", "label": "Cropland", "type": "wms", @@ -189,29 +167,26 @@ "active": "no", "description": { "ETH": { - "drought": "The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types
  1. rainfed cropland
  2. mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Source Link: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010", - "floods": "The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types
  1. rainfed cropland
  2. mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Source Link: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" + "drought": "This layer represents the cropland. It is visualised in yellow on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types
  1. rainfed cropland
  2. mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Cropland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010", + "floods": "This layer represents the cropland. It is visualised in yellow on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types
  1. rainfed cropland
  2. mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Cropland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" }, "KEN": { - "drought": "

The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types

  1. Rainfed cropland
  2. Mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. Mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Source link: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. 

Latest updated: 2010


", - "floods": "

The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types

  1. Rainfed cropland
  2. Mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. Mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Source link: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. 

Latest updated: 2010


" + "floods": "This layer represents the cropland. It is visualised in yellow on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types
  1. rainfed cropland
  2. mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Cropland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" }, "UGA": { "drought": "This layer represents the cropland. It is visualised in yellow on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types
  1. rainfed cropland
  2. mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Cropland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010", - "floods": "The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types
  1. rainfed cropland
  2. mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Source Link: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" + "floods": "This layer represents the cropland. It is visualised in yellow on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types
  1. rainfed cropland
  2. mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Cropland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" }, "ZMB": { - "drought": "The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types
  1. rainfed cropland
  2. mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Source Link: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010", - "floods": "The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types
  1. rainfed cropland
  2. mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Source Link: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" + "drought": "This layer represents the cropland. It is visualised in yellow on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types
  1. rainfed cropland
  2. mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Cropland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010", + "floods": "This layer represents the cropland. It is visualised in yellow on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types
  1. rainfed cropland
  2. mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Cropland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" }, "ZWE": { - "drought": "The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types
  1. rainfed cropland
  2. mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Source Link Zimbabwe: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" + "drought": "This layer represents the cropland. It is visualised in yellow on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined cropland: consists of 3 land use types
  1. rainfed cropland
  2. mosaic cropland - 50-70% cropland & 20-50% vegetation (grassland/shrubland/forest)
  3. mosaic vegetation - 50-70% vegetation (grassland/shrubland/forest) & 20-50% cropland

Cropland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" } } }, { - "countryCodes": "UGA,ZMB,KEN,ETH,ZWE", - "disasterTypes": ["floods", "drought"], "name": "grassland", "label": "Grassland", "type": "wms", @@ -220,29 +195,26 @@ "active": "no", "description": { "ETH": { - "drought": "The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.
  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Source Link: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010", - "floods": "The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.
  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Source Link: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" + "drought": "This layer represents the grassland. It is visualised in green on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.
  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Grassland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010", + "floods": "This layer represents the grassland. It is visualised in green on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.
  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Grassland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" }, "KEN": { - "drought": "

The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.

  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Source link: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php

Latest updated: 2010

", - "floods": "The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.
  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Source Link: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" + "floods": "This layer represents the grassland. It is visualised in green on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.
  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Grassland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" }, "UGA": { "drought": "This layer represents the grassland. It is visualised in green on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.
  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Grassland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010", - "floods": "The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.
  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Source Link: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" + "floods": "This layer represents the grassland. It is visualised in green on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.
  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Grassland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" }, "ZMB": { - "drought": "The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.
  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Source Link: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010", - "floods": "The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.
  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Source Link: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" + "drought": "This layer represents the grassland. It is visualised in green on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.
  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Grassland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010", + "floods": "This layer represents the grassland. It is visualised in green on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.
  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Grassland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" }, "ZWE": { - "drought": "The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.
  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Source Link: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" + "drought": "This layer represents the grassland. It is visualised in green on the map. The land use classes are based on GLOBCOVER Land Cover Classifications.

Combined grassland; consists of two land-use types.
  1. Mosaic forest or shrubland - 50-70% (forest/shrubland & 20-50% grassland
  2. Mosaic grassland - 50-70% grassland & 20-50% forest or shrubland

Grassland source: © ESA 2010 and UCLouvain. Accompanied by a link to our ESA DUE GlobCover website: http://due.esrin.esa.int/page_globcover.php. Year: 2010" } } }, { - "countryCodes": "PHL", - "disasterTypes": ["floods"], "name": "riceland", "label": "Riceland", "type": "wms", @@ -256,8 +228,6 @@ } }, { - "countryCodes": "UGA,ZMB,KEN,ETH,PHL,MWI,SSD", - "disasterTypes": ["floods"], "name": "glofas_stations", "label": "Glofas stations", "type": "point", @@ -288,8 +258,6 @@ } }, { - "countryCodes": "PHL", - "disasterTypes": ["typhoon"], "name": "typhoon_track", "label": "Typhoon track", "type": "point", @@ -302,8 +270,6 @@ } }, { - "countryCodes": "UGA,ZMB,KEN,ETH,ZWE,PHL,MWI,SSD", - "disasterTypes": ["floods", "heavy-rain", "dengue", "malaria", "drought"], "name": "red_cross_branches", "label": "Red Cross branches", "type": "point", @@ -348,8 +314,6 @@ } }, { - "countryCodes": "ZWE", - "disasterTypes": ["drought"], "name": "dams", "label": "Dam Sites", "type": "point", @@ -362,8 +326,6 @@ } }, { - "countryCodes": "EGY", - "disasterTypes": ["heavy-rain"], "name": "red_crescent_branches", "label": "Red Crescent branches", "type": "point", @@ -376,8 +338,6 @@ } }, { - "countryCodes": "PHL,ETH,KEN,MWI", - "disasterTypes": ["floods", "dengue", "malaria", "typhoon", "flash-floods"], "name": "health_sites", "label": "Health Sites", "type": "point", @@ -392,6 +352,7 @@ "KEN": { "floods": "

Number of health facilities by type and location, health facility types; hospital and doctors

Source link: https://healthsites.io/

" }, + "MWI": { "flash-floods": "TBD" }, "PHL": { "dengue": "Health facilities by type and location. Health facility types hospital and clinic are shown with different markers. Other types are omitted and rare in the data.

Source: https://healthsites.io/", "floods": "Health facilities by type and location. Health facility types hospital and clinic are shown with different markers. Other types are omitted and rare in the data.

Source:
https://healthsites.io/", @@ -400,8 +361,6 @@ } }, { - "countryCodes": "UGA", - "disasterTypes": ["heavy-rain"], "name": "community_notifications", "label": "Community notifications", "type": "point", @@ -414,8 +373,6 @@ } }, { - "countryCodes": "ZMB,KEN,ETH,ZWE", - "disasterTypes": ["floods", "drought", "heavy-rain"], "name": "waterpoints", "label": "Waterpoints", "type": "point", @@ -431,7 +388,6 @@ "floods": "Number and location of functioning waterpoints accessible for people (Borehole, Protected Spring, Protected Shallow Well, Rainwater Harvesting, Sand or Sub-surface Dam, Spring, Surface Water, Undefined Shallow Well, Undefined Well, Unprotected Shallow Well).

Source Link: https://www.waterpointdata.org/water-point-data" }, "MWI": { - "flash-floods": "Number and location of functioning waterpoints accessible for people (Borehole, Protected Spring, Protected Shallow Well, Rainwater Harvesting, Sand or Sub-surface Dam, Spring, Surface Water, Undefined Shallow Well, Undefined Well, Unprotected Shallow Well).

Source Link: https://www.waterpointdata.org/water-point-data", "floods": "Number and location of functioning waterpoints accessible for people (Borehole, Protected Spring, Protected Shallow Well, Rainwater Harvesting, Sand or Sub-surface Dam, Spring, Surface Water, Undefined Shallow Well, Undefined Well, Unprotected Shallow Well).

Source Link: https://www.waterpointdata.org/water-point-data" }, "UGA": { @@ -449,8 +405,6 @@ } }, { - "countryCodes": "EGY", - "disasterTypes": ["heavy-rain"], "name": "flood_susceptibility", "label": "Flood susceptibility", "type": "wms", @@ -469,47 +423,30 @@ } }, { - "countryCodes": "ZMB,UGA,ZWE,EGY,KEN,PHL,ETH,MWI", - "disasterTypes": ["floods", "heavy-rain", "drought"], "name": "adminRegions1", "label": "Admin Level 1", "type": "shape", "active": "yes" }, { - "countryCodes": "UGA,ZMB,PHL,KEN,ETH,MWI,SSD", - "disasterTypes": ["floods", "dengue", "drought", "heavy-rain"], "name": "adminRegions2", "label": "Admin Level 2", "type": "shape", "active": "yes" }, { - "countryCodes": "ZMB,ETH,UGA,PHL,KEN,MWI,SSD", - "disasterTypes": [ - "floods", - "malaria", - "typhoon", - "drought", - "flash-floods", - "heavy-rain" - ], "name": "adminRegions3", "label": "Admin Level 3", "type": "shape", "active": "yes" }, { - "countryCodes": "UGA", - "disasterTypes": ["floods", "drought", "heavy-rain"], "name": "adminRegions4", "label": "Admin Level 4", "type": "shape", "active": "yes" }, { - "countryCodes": "SSD", - "disasterTypes": ["floods"], "name": "evacuation_centers", "label": "Evacuation Centers", "type": "point", @@ -522,66 +459,50 @@ } }, { - "countryCodes": "MWI", - "disasterTypes": ["flash-floods"], "name": "schools", "label": "Schools", "type": "point", "leadTimeDependent": false, - "active": "no" + "active": "no", + "description": { "MWI": { "flash-floods": "TBD" } } }, { - "countryCodes": "MWI", - "disasterTypes": ["flash-floods"], "name": "waterpoints_internal", "label": "Waterpoints", "type": "point", "leadTimeDependent": false, - "active": "no" + "active": "no", + "description": { "MWI": { "flash-floods": "TBD" } } }, { - "countryCodes": "MWI", - "disasterTypes": ["flash-floods"], "name": "roads", "label": "Roads", "type": "wms", "leadTimeDependent": false, "active": "no", "legendColor": { - "MWI": { - "type": "exposure-line", - "value": ["#E80C0C", "#33A02C"] - } - } + "MWI": { "type": "exposure-line", "value": ["#E80C0C", "#33A02C"] } + }, + "description": { "MWI": { "flash-floods": "TBD" } } }, { - "countryCodes": "MWI", - "disasterTypes": ["flash-floods"], "name": "buildings", "label": "Buildings", "type": "wms", "leadTimeDependent": false, "active": "no", "legendColor": { - "MWI": { - "type": "exposure-square", - "value": ["#C70000", "#33A02C"] - } - } + "MWI": { "type": "exposure-square", "value": ["#C70000", "#33A02C"] } + }, + "description": { "MWI": { "flash-floods": "TBD" } } }, { - "countryCodes": "MWI", - "disasterTypes": ["flash-floods"], "name": "rivers", "label": "Rivers", "type": "wms", "leadTimeDependent": false, "active": "no", - "legendColor": { - "MWI": { - "type": "line", - "value": ["#0096FF"] - } - } + "legendColor": { "MWI": { "type": "line", "value": ["#0096FF"] } }, + "description": { "MWI": { "flash-floods": "TBD" } } } ] diff --git a/services/API-service/src/scripts/json/layer-popup-info.xlsx b/services/API-service/src/scripts/json/layer-popup-info.xlsx index 815d0652a..1c54d3418 100644 Binary files a/services/API-service/src/scripts/json/layer-popup-info.xlsx and b/services/API-service/src/scripts/json/layer-popup-info.xlsx differ diff --git a/services/API-service/src/scripts/seed-init.ts b/services/API-service/src/scripts/seed-init.ts index b1cf274ee..c0e18a23e 100644 --- a/services/API-service/src/scripts/seed-init.ts +++ b/services/API-service/src/scripts/seed-init.ts @@ -218,40 +218,14 @@ export class SeedInit implements InterfaceScript { const indicatorRepository = this.dataSource.getRepository( IndicatorMetadataEntity, ); - const indicators = JSON.parse(JSON.stringify(indicatorMetadata)); - const indicatorEntities = await Promise.all( - indicators.map(async (indicator): Promise => { - indicator.disasterTypes = await disasterRepository.find({ - where: indicator.disasterTypes.map( - (indicatorDisasterType: string): object => { - return { disasterType: indicatorDisasterType }; - }, - ), - }); - return indicator; - }), + await indicatorRepository.save( + JSON.parse(JSON.stringify(indicatorMetadata)), ); - await indicatorRepository.save(indicatorEntities); - // ***** CREATE LAYER METADATA ***** console.log('Seed Layers...'); const layerRepository = this.dataSource.getRepository(LayerMetadataEntity); - - const layers = JSON.parse(JSON.stringify(layerMetadata)); - const layerEntities = await Promise.all( - layers.map(async (layer): Promise => { - layer.disasterTypes = await disasterRepository.find({ - where: layer.disasterTypes.map( - (layerDisasterType: string): object => { - return { disasterType: layerDisasterType }; - }, - ), - }); - return layer; - }), - ); - await layerRepository.save(layerEntities); + await layerRepository.save(JSON.parse(JSON.stringify(layerMetadata))); // ***** SEED POINT DATA ***** console.log('Seed point data...'); diff --git a/services/API-service/tsconfig.json b/services/API-service/tsconfig.json index 921bd692d..91fd4879a 100644 --- a/services/API-service/tsconfig.json +++ b/services/API-service/tsconfig.json @@ -18,7 +18,11 @@ "baseUrl": "./", "skipLibCheck": true }, - "watchOptions": { "watchFile": "fixedPollingInterval" }, + "watchOptions": { + "watchFile": "fixedPollingInterval", + "excludeDirectories": ["node_modules", "dist"], + "excludeFiles": ["**/*.json"] + }, "include": ["src/**/*"], "exclude": ["node_modules", "**/*.spec.ts"], "types": ["jest"],