geobeyond / Arpav-PPCV-backend

Backend di Piattaforma Proiezioni Climatiche per il Nord-Est.
Creative Commons Attribution 4.0 International
0 stars 1 forks source link

Add uncertainty data to coverage time series endpoint #83

Closed ricardogsilva closed 3 months ago

ricardogsilva commented 3 months ago

This PR adds generation of data series with both lower and upper uncertainty values for the coverages endpoint.

It adds a couple of self-referential relationships in the table that contains the coverage configurations and also the respective admin UI fields for them, as shown below:

image

This allows specifying the uncertainty datasets as additional coverages and then linking them with the correct main coverage.

The functions that calculate the respective time series are slightly refactored in order to provide clearer naming.

Here is a screenshot of a plot showing the sample uncertainty data provided by the client:

image

The steps for generating the above image are also included in this PR in a jupyter notebook.