PROBLEM: map_contours() in R too slow
The calcofi4r::map_contours() (example, documentation) is finally the "right" level of detail to map interpolated values so as to show an overall trend. This moreso than earlier iterations of the app's map visualization using individual points of oceano app or interpolated rasters of oceano-demo as discovered through "co-design" with Jenn & Erin. However, the bivariate GAM smooth runs in R and this is slow to render: 5-20 seconds.

SOLUTION: ST_Contour() in Database
We could implement a button with an estimated progress bar, spinny wheel and/or ETA.
Or we could try run this in the database, which should be much faster:
PROBLEM:
map_contours()in R too slowThe
calcofi4r::map_contours()(example, documentation) is finally the "right" level of detail to map interpolated values so as to show an overall trend. This moreso than earlier iterations of the app's map visualization using individual points of oceano app or interpolated rasters of oceano-demo as discovered through "co-design" with Jenn & Erin. However, the bivariate GAM smooth runs in R and this is slow to render: 5-20 seconds.SOLUTION:
ST_Contour()in DatabaseWe could implement a button with an estimated progress bar, spinny wheel and/or ETA.
Or we could try run this in the database, which should be much faster:
ST_Contour()ST_InterpolateRaster()pgfaceting: Faceted query acceleration for PostgreSQL using roaring bitmapsST_InterpolateRaster()ST_Contour()ST_Value()function (andST_SetZ()andST_SetM()) has been upgraded to support bilinear interpolation of values from rasters; eg for doing transects interpolating from raster surfacesST_IsValid(), +ST_MakeValid()