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
47 stars 34 forks source link

[Feature Request]: Allow for chart aggregation at calendar month intervals #1315

Open wadhwamatic opened 3 months ago

wadhwamatic commented 3 months ago

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

Charts in PRISM are currently show rolling 10-day products for all data layers regardless of their length. For example a 1-month chart using the date 11-June-2024 is an aggregate of data from 21-May-2024 to 20-June 2024 and a new one-month aggregate is available every 10-days.

Users would also like to be able to access monthly intervals which are more clearly understood as fixed per calendar month rather than rolling every 10-days. For example, they would want to see monthly aggregates for all of Jan, Feb, Mar, etc.

This is required for monthly rainfall aggregate and monthly rainfall anomaly. I believe we can simply use r1h for aggregate and r1q for anomaly of the 3rd dekad (i.e. the 21st day of each month) for each month and use that as the calendar month value.

This data is already available through the HDC stats API but we do need a modification to the frontend. My suggestion is to add a toggle below the chart which appears if either 1-month rainfall aggregate or anomaly is chosen which allows a user to optionally display data by calendar month.

In the example below, the chart on the left is aggregated by calendar month.

chart-monthly

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 commented 3 months ago

Not captured here as it's not the current priority, but we would also eventually want to apply this to NDVI, which does not have monthly aggregation already provided by the HDC stats API