Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Google Flood Hub integration #1317

Open
wadhwamatic opened this issue Jul 18, 2024 · 3 comments · May be fixed by #1328
Open

[Feature Request]: Google Flood Hub integration #1317

wadhwamatic opened this issue Jul 18, 2024 · 3 comments · May be fixed by #1328
Assignees
Labels
enhancement New feature or request triage to be triaged for next action

Comments

@wadhwamatic
Copy link
Member

Provide a clear and concise description of what you want to happen.

Google has provided us with early access to their API for the Flood Hub: https://sites.research.google/floods/. Details on the API endpoints have been shared separately as access is restricted.

The API provides information on flood status by gauge and by area.

  • Areas are polygons which are accessible through an API endpoint, which I believe includes a location lookup.
  • Gauges are points with additional data about the river and country where they live.
  • Flood status includes details on severity and forecasted trend (rising, falling, not changing).

All of the above information is of high value to PRISM deployments. The end goals are:

  1. Create new layers in PRISM which allow for visualization and interaction with gauge and area flood status
  2. Handle API authentication through the PRISM backend
  3. Allow users to see and interaction with layers in the same fashion seen on the FloodHub site including
  4. Visualize gauge status using color scheme used by Google
  5. On click of a gauge, show a trend and forecast as seen in the screenshot below
  6. Visualize inundation areas
Screenshot 2024-07-18 at 12 23 39

What is not yet clear is if there is the capability to see flood data on a specific date. I have heard that this is forthcoming but not yet available. For now, I think we should just consider floods as valid for 'today' and keep it date-constrained accordingly. I.e., if we're looking at a rainfall layer for a year ago, we should not show today's flood data alongside it.

Is there anything else you can add about the proposal? You might want to link to related issues here, if you haven't already.

No response

@wadhwamatic wadhwamatic added enhancement New feature or request triage to be triaged for next action labels Jul 18, 2024
@gislawill
Copy link
Collaborator

Leaving some notes from @lowriech and my work on this today:

The functionality here breaks into 3 parts:

  1. Displaying Flood Gauges (FGs) as points
    • We'll use the FG's severity to color code the points
  2. Displaying Inundation Areas (IAs) as polygons
    • It's looking like between 20MB-30MB for all polygons in Bangladesh
    • We'll use InundationLevel to color code the IA
  3. Displaying Guage Forecasts (GFs) as line graph
    • When a FG is clicked, we'll display metadata about the gauge and a chart icon
      • Metadata will include: Site name, river (if present), and data source
    • When the chart is clicked, we'll fetch and display the gauge's GF

We'll be attempting to make these updates in 3 pull requests, each containing 1 part of the above functionality.

To support this, we're going to add two layers which are grouped in the menu (similar to Tropical Storms in the Mozambique deployment). The FG layer will be PointDataLayer and the IA layer will be a StaticVectorLayer (need to create this new type, will match StaticRasterLayer). To handle the chart data on the FG tooltip, we'll be adding a new type + loader of chart_data. This new type won't be related to a admin region, just the selected Point.

To fetch the FGs and IAs, we need to provide the deployment's ISO2 code which is not yet present in our county config. We plan to add this country code to the [county]/prism.json configuration.

Note: seeing intermittent errors from the searchLatestFloodStatusByArea endpoint. We should retry these requests 3 times if failing.

Note: inundation areas are only available in some areas with active flooding, we'll monitor data availability in Flood Hub and shift region used for development based on data availability.

@wadhwamatic
Copy link
Member Author

Thanks for the update on this @gislawill. I'm excited for this feature!

Note: inundation areas are only available in some areas with active flooding, we'll monitor data availability in Flood Hub and shift region used for development based on data availability.

I thought historical flood events / inundation areas were also available. Is that not the case?

@gislawill
Copy link
Collaborator

I thought historical flood events / inundation areas were also available. Is that not the case?

@wadhwamatic, based on the latest documentation, it appears we have only have access to the inundation areas in the latest flood status (updated every couple hours). These maps come from the searchLatestFloodStatusByArea and queryLatestFloodStatusByGaugeIds endpoints.

We do have access to historical flood levels by gauge using the queryGaugeForecasts endpoint but they do not provide inundation maps for these historical levels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage to be triaged for next action
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants