eurodatacube / eodash

Software behind the RACE dashboard by ESA and the European Commission (https://race.esa.int), the Green Transition Information Factory - GTIF (https://gtif.esa.int), as well as the Earth Observing Dashboard by NASA, ESA, and JAXA (https://eodashboard.org)
https://race.esa.int
MIT License
93 stars 42 forks source link

Integrate new NASA API for customAreaIndicator chart generation #1496

Closed lubojr closed 1 year ago

lubojr commented 2 years ago

NASA API Developers chose not to enable querying over a time range on new API in order to take advantage of the API's ability to execute all the requests in parallel.

This enables frontend clients (eodash) to generate timeseries for much larger AOI's and for essentially unlimited date ranges. Our client should execute all the queries - for for each date in parallel and combine the results to create a chart.

Here is additional documentation covering how to generate timeseries using the new API: https://github.com/NASA-IMPACT/veda-documentation/blob/main/monthly-omi-no2-timeseries-stac-api.ipynb

Currently its not planned to enable a functionality that would allow querying for a date range.

Example response for 1 date:

{'statistics':
  {'1': 
   {'min': -1084004715462656.0,
   'max': 1.0274760067907584e+16,
   'mean': 1771445372358347.5,
   'count': 15149.0,
   'sum': 2.6835625945856606e+19,
   'std': 1214133036547102.0,
   'median': 1508695175331840.0,
   'majority': 4887620706369536.0,
   'minority': -1084004715462656.0,
   'unique': 15138.0,
   'histogram': [[216.0,
     4901.0,
     6675.0,
     1896.0,
     937.0,
     323.0,
     146.0,
     36.0,
     14.0,
     5.0],
    [-1084004715462656.0,
     51871762874368.0,
     1187748241211392.0,
     2323624719548416.0,
     3459501197885440.0,
     4595377676222464.0,
     5731254154559488.0,
     6867130632896512.0,
     8003007111233536.0,
     9138883589570560.0,
     1.0274760067907584e+16]],
   'valid_percent': 99.01,
   'masked_pixels': 151.0,
   'valid_pixels': 15149.0,
   'percentile_2': 138399994011975.67,
   'percentile_98': 5268545328696521.0}},
 'datetime': '2022-02-01T00:00:00Z'
}

Follows up on https://github.com/eurodatacube/eodash/issues/798

santilland commented 1 year ago

Activating custom area generation also for other indicators using nasa endpoint where it makes sense: