WFP-VAM / prism-app

PRISM is an interactive map-based dashboard that simplifies the integration of geospatial data on hazards, along with information on socioeconomic vulnerability
MIT License
50 stars 34 forks source link

Admin boundaries and levels are not consistently implemented #451

Open wadhwamatic opened 2 years ago

wadhwamatic commented 2 years ago

@ericboucher @DanielJDufour @JorgeMartinezG

Up until we added the ability to stylize different admin levels uniquely, and to have admin level data associated at different levels, there was just one admin boundary file per deployment. Now we can have 1 or more, but in the case where we have just 1, there is a conflict with how the 'run analysis' feature works when we bound results by admin area. There could be other instances where just a single admin boundary file will also cause issues.

A couple of notes:

  1. We will likely update all country-level deployments to have more than one boundary file (including Tajikistan). I think the global instance will continue to use a single boundary file
  2. I believe adding more specific information on admin boundaries, including parent/child relationships is needed and would like to hear your thoughts

The screenshots below show the current issue with a single boundary file when we run an analysis using the new features in https://github.com/WFP-VAM/prism-frontend/pull/431. To replicate:

  1. REACT_APP_COUNTRY=tajikistan
  2. Choose 'run analysis'
  3. Select these options: hazard layer: 'Shakemaps'; admin level: 'admin 1'; date start/end: 07/10/2021
  4. Run analysis

The analysis module allows for selection of admin 1 and admin 2, but we do not have an admin 1 boundary file.

Screen Shot 2022-04-14 at 12 00 43

The map continues to show admin 2 boundaries, but the analysis was presumably done on admin 1. These leads to unexpected results, including showing that every admin area had some percentage of area exposed to the earthquake

Screen Shot 2022-04-14 at 12 09 02
ericboucher commented 2 years ago

Imho, a short term fix is to keep the boundary like this but at least update the tooltip name to only display the admin1 name, since the result we are getting is for that admin.

The other tricky thing to consider: what should happen when we activate an admin level dataset that does not use the same level?

wadhwamatic commented 2 years ago

@ericboucher - If we have an admin level dataset that is at a different level than the default, we'll have more than one boundary file so this scenario won't exist