Skip to content

Commit

Permalink
Merge pull request #1462 from rodekruis/info-popup-text-mwi-flashfloods
Browse files Browse the repository at this point in the history
first version of info popup text for mwi flashfloods
  • Loading branch information
jannisvisser authored Sep 22, 2023
2 parents 5acc59a + 38fc55b commit c4ce6c0
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 174 deletions.
9 changes: 4 additions & 5 deletions services/API-service/src/api/metadata/metadata.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@ export class MetadataService {
const indicators = await this.indicatorRepository.find();
return indicators.filter(
(metadata: IndicatorMetadataEntity): boolean =>
metadata.countryDisasterTypes?.[countryCodeISO3] &&
metadata.countryDisasterTypes?.[countryCodeISO3][disasterType] !==
undefined,
metadata.countryDisasterTypes?.[countryCodeISO3]?.[disasterType] !==
undefined,
);
}

Expand All @@ -132,8 +131,8 @@ export class MetadataService {

return layers.filter(
(metadata: LayerMetadataEntity): boolean =>
metadata.description?.[countryCodeISO3] &&
metadata.description?.[countryCodeISO3][disasterType] !== undefined,
metadata.description?.[countryCodeISO3]?.[disasterType] !== undefined ||
metadata.type === 'shape', // this includes the 4 adminRegions layers
);
}
}
38 changes: 31 additions & 7 deletions services/API-service/src/scripts/json/indicator-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"floods": "<p>Number of people exposed is calculated by the population living in the flood extent area within the districts currently triggered. The number of people and the flood extent are derived from the below sources.</p><p><strong>Source link:</strong></p><ul> <li>Source (Population Data): High-Resolution Settlement Layer (HRSL). Source imagery for HRSL &copy; 2016 DigitalGlobe. Accessed 01-01-2020. Facebook Connectivity Lab and Center for International Earth Science Information Network - CIESIN - Columbia University. 2016. &nbsp;<a target='_blank' href='https://www.ciesin.columbia.edu/data/hrsl/'>https://www.ciesin.columbia.edu/data/hrsl/</a></li> <li>Source Flood Extent: 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].</li></ul><p><br></p>"
},
"MWI": {
"flash-floods": "Not currently available",
"flash-floods": "<p>This layer shows the amount of people that is potentially exposed per geographic area. This is calculated by determining the amount of people that live in the potentially flooded area.</p><br><p>Source: <a target='_blank' href='https://data.humdata.org/dataset/highresolutionpopulationdensitymaps-mwi'>Meta on HDX </a></p>",
"floods": "<p>Number of people exposed is calculated by the population living in the flood extent area within the administrative areas currently triggered. The number of people and the flood extent are derived from the below sources.</p><p><strong>Source link:</strong></p><ul> <li>Source (Population Data): peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version 1.0.0 version 1.0.0. Accessed 15-08-2022. WorldPop, University of Southampton. 2021. &nbsp;<a target='_blank' href='https://apps.worldpop.org/peanutButter/'>https://apps.worldpop.org/peanutButter/</a></li> <li>Source Flood Extent: 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].</li></ul><p><br></p>"
},
"PHL": {
Expand Down Expand Up @@ -1255,7 +1255,11 @@
"lazyLoad": true,
"unit": "MWK",
"aggregateUnit": "MWK",
"description": { "MWI": { "flash-floods": "TBD" } }
"description": {
"MWI": {
"flash-floods": "<p>This indicator shows the estimated potential economic damage. It is based on global depth-damage functions from the jrc (see <a target='_blank' href='https://op.europa.eu/en/publication-detail/-/publication/a20ecfa5-200e-11e7-84e2-01aa75ed71a1/language-en'>publication</a>). It distinguishes the damage by water depth and land use, the land use classes urban and agricultural are used, based on the ESA WorldCover 2020 dataset (see <a target='_blank' href='https://worldcover2020.esa.int/'>website</a>). The value is converted from Euro to Malawi Kwacha with a fixed exchange rate of xx."
}
}
},
{
"countryDisasterTypes": { "MWI": { "flash-floods": ["aggregate"] } },
Expand All @@ -1273,7 +1277,11 @@
"lazyLoad": true,
"unit": "km",
"aggregateUnit": "km",
"description": { "MWI": { "flash-floods": "TBD" } }
"description": {
"MWI": {
"flash-floods": "<p>This indicator shows the total amount of kilometers of roads in the potentially flooded area. The number is filtered on the selected area (see above). The roads are not filtered on the type of road so it includes more roads than the map layer.</p><br><p>Source: Openstreetmap</p>"
}
}
},
{
"countryDisasterTypes": { "MWI": { "flash-floods": ["aggregate"] } },
Expand All @@ -1290,7 +1298,11 @@
"dynamic": true,
"lazyLoad": true,
"unit": "schools",
"description": { "MWI": { "flash-floods": "TBD" } }
"description": {
"MWI": {
"flash-floods": "<p>This indicator shows the total number of school buildings in the potentially flooded area. The number is filtered on the selected area (see above).</p><br><p>Source: Cloud2Street</p>"
}
}
},
{
"countryDisasterTypes": { "MWI": { "flash-floods": ["aggregate"] } },
Expand All @@ -1307,7 +1319,11 @@
"dynamic": true,
"lazyLoad": true,
"unit": "health sites",
"description": { "MWI": { "flash-floods": "TBD" } }
"description": {
"MWI": {
"flash-floods": "<p>This indicator shows the total number of health sites in the potentially flooded area. The number is filtered on the selected area (see above).</p><br><p>Source: Cloud2Street</p>"
}
}
},
{
"countryDisasterTypes": { "MWI": { "flash-floods": ["aggregate"] } },
Expand All @@ -1324,7 +1340,11 @@
"dynamic": true,
"lazyLoad": true,
"unit": "waterpoints",
"description": { "MWI": { "flash-floods": "TBD" } }
"description": {
"MWI": {
"flash-floods": "<p>This indicator shows the total number of water points in the potentially flooded area. The number is filtered on the selected area (see above).</p><br><p>Source: <a target='_blank' href='https://portal.mwater.co/#/'>mWater </a></p>"
}
}
},
{
"countryDisasterTypes": { "MWI": { "flash-floods": ["aggregate"] } },
Expand All @@ -1341,7 +1361,11 @@
"dynamic": true,
"lazyLoad": true,
"unit": "buildings",
"description": { "MWI": { "flash-floods": "TBD" } }
"description": {
"MWI": {
"flash-floods": "<p>This indicator shows the total number of buildings in the potentially flooded area. The number is filtered on the selected area (see above).</p><br><p>Source: Openstreetmap</p>"
}
}
},
{
"countryDisasterTypes": { "KEN": { "drought": ["map"] } },
Expand Down
190 changes: 28 additions & 162 deletions services/API-service/src/scripts/json/layer-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +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.<br /><br />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",
"flash-floods": "<p>This layer shows the area that is potentially flooding in this event. The fooded area is derived from the HEC-RAS flood model. The model resulted in scenario's that are related to the forecasted rainfall. The rainfall forecast from GFS is every 6 hours matched for each Traditional Authority to the scenario from the flood model.</p><p>The color indicates the depth of the flooded area, yellow means the area is only flooded with a shallow layer of water and red means a deep layer of water, with the different shades of orange somewhere in between.</p>",
"floods": "<p>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.<br><br>Source link: Flood hazard map of the World - 10-year return period. European Commission, Joint Research Centre (JRC). 2016. <a target='_blank' href='https://data.jrc.ec.europa.eu/dataset/jrc-floods-floodmapgl_rp10y-tif'>Flood hazard map of the World - 10-year return period - European Commission (europa.eu)</a>.</p>"
},
"PHL": {
Expand Down Expand Up @@ -352,7 +352,9 @@
"KEN": {
"floods": "<p>Number of health facilities by type and location, health facility types; hospital and doctors</p><p><strong>Source link</strong>: <a target='_blank' href='https://healthsites.io/'>https://healthsites.io/</a></p>"
},
"MWI": { "flash-floods": "TBD" },
"MWI": {
"flash-floods": "<p>This layer shows the Health Sites in the potentially affected Traditional Authorities. Each Health Site has either a blue or a red marker. Blue when it is outside the potentially inundated area so safe and red when it is inside the potentially inundated area so in danger.</p><br><p>Source: Cloud2Street</p>"
},
"PHL": {
"dengue": "Health facilities by type and location. Health facility types <strong>hospital</strong> and <strong>clinic</strong> are shown with different markers. Other types are omitted and rare in the data.<br /><br />Source: <a target='_blank' href='https://healthsites.io/'>https://healthsites.io/<a/>",
"floods": "Health facilities by type and location. Health facility types <strong>hospital</strong> and <strong>clinic</strong> are shown with different markers. Other types are omitted and rare in the data.<br /><br />Source: <a target='_blank' href='https://healthsites.io/'>https://healthsites.io/</a>",
Expand Down Expand Up @@ -426,177 +428,25 @@
"name": "adminRegions1",
"label": "Admin Level 1",
"type": "shape",
"active": "yes",
"description": {
"EGY": {
"heavy-rain": ""
},
"ETH": {
"drought": "",
"floods": "",
"malaria": ""
},
"KEN": {
"drought": "",
"floods": ""
},
"MWI": {
"flash-floods": "",
"floods": ""
},
"PHL": {
"dengue": "",
"floods": "",
"typhoon": ""
},
"SSD": {
"floods": ""
},
"UGA": {
"drought": "",
"floods": "",
"heavy-rain": ""
},
"ZMB": {
"drought": "",
"floods": ""
},
"ZWE": {
"drought": ""
}
}
"active": "yes"
},
{
"name": "adminRegions2",
"label": "Admin Level 2",
"type": "shape",
"active": "yes",
"description": {
"EGY": {
"heavy-rain": ""
},
"ETH": {
"drought": "",
"floods": "",
"malaria": ""
},
"KEN": {
"drought": "",
"floods": ""
},
"MWI": {
"flash-floods": "",
"floods": ""
},
"PHL": {
"dengue": "",
"floods": "",
"typhoon": ""
},
"SSD": {
"floods": ""
},
"UGA": {
"drought": "",
"floods": "",
"heavy-rain": ""
},
"ZMB": {
"drought": "",
"floods": ""
},
"ZWE": {
"drought": ""
}
}
"active": "yes"
},
{
"name": "adminRegions3",
"label": "Admin Level 3",
"type": "shape",
"active": "yes",
"description": {
"EGY": {
"heavy-rain": ""
},
"ETH": {
"drought": "",
"floods": "",
"malaria": ""
},
"KEN": {
"drought": "",
"floods": ""
},
"MWI": {
"flash-floods": "",
"floods": ""
},
"PHL": {
"dengue": "",
"floods": "",
"typhoon": ""
},
"SSD": {
"floods": ""
},
"UGA": {
"drought": "",
"floods": "",
"heavy-rain": ""
},
"ZMB": {
"drought": "",
"floods": ""
},
"ZWE": {
"drought": ""
}
}
"active": "yes"
},
{
"name": "adminRegions4",
"label": "Admin Level 4",
"type": "shape",
"active": "yes",
"description": {
"EGY": {
"heavy-rain": ""
},
"ETH": {
"drought": "",
"floods": "",
"malaria": ""
},
"KEN": {
"drought": "",
"floods": ""
},
"MWI": {
"flash-floods": "",
"floods": ""
},
"PHL": {
"dengue": "",
"floods": "",
"typhoon": ""
},
"SSD": {
"floods": ""
},
"UGA": {
"drought": "",
"floods": "",
"heavy-rain": ""
},
"ZMB": {
"drought": "",
"floods": ""
},
"ZWE": {
"drought": ""
}
}
"active": "yes"
},
{
"name": "evacuation_centers",
Expand All @@ -616,7 +466,11 @@
"type": "point",
"leadTimeDependent": false,
"active": "no",
"description": { "MWI": { "flash-floods": "TBD" } }
"description": {
"MWI": {
"flash-floods": "<p>This layer shows the Schools in the potentially affected Traditional Authorities. Each School has either a blue or a red marker. Blue when it is outside the potentially inundated area so safe and red when it is inside the potentially inundated area so in danger.</p><br><p>Source: Cloud2Street</p>"
}
}
},
{
"name": "waterpoints_internal",
Expand All @@ -635,7 +489,11 @@
"legendColor": {
"MWI": { "type": "exposure-line", "value": ["#E80C0C", "#33A02C"] }
},
"description": { "MWI": { "flash-floods": "TBD" } }
"description": {
"MWI": {
"flash-floods": "<p>This layer shows the roads in the potentially affected Traditional Authorities. Each road is displayed as either a green or a red line. Green when it is outside the potentially inundated area so not exposed and red when it is inside the potentially inundated area so potentially flooded. This layer only shows the main roads which is different from the indicator in the middle column.</p><br><p>Source: Openstreetmap</p>"
}
}
},
{
"name": "buildings",
Expand All @@ -646,7 +504,11 @@
"legendColor": {
"MWI": { "type": "exposure-square", "value": ["#C70000", "#33A02C"] }
},
"description": { "MWI": { "flash-floods": "TBD" } }
"description": {
"MWI": {
"flash-floods": "<p>This layer shows the buildings in the potentially affected Traditional Authorities. Each building has either a green or a red outline. Green when it is outside the potentially inundated area so safe and red when it is inside the potentially inundated area so in danger.</p><br><p>Source: Openstreetmap</p>"
}
}
},
{
"name": "rivers",
Expand All @@ -655,6 +517,10 @@
"leadTimeDependent": false,
"active": "no",
"legendColor": { "MWI": { "type": "line", "value": ["#0096FF"] } },
"description": { "MWI": { "flash-floods": "TBD" } }
"description": {
"MWI": {
"flash-floods": "<p>This layer shows the main rivers that are used in the flood model.</p><br><p>Source: Openstreetmap</p>"
}
}
}
]
Binary file modified services/API-service/src/scripts/json/layer-popup-info.xlsx
Binary file not shown.

0 comments on commit c4ce6c0

Please sign in to comment.