Skip to content

dashboard architecture #81

@jbrezmorf

Description

@jbrezmorf

Current approach

  • frontend plots using plotly JS lib
  • it uses data provided by backend
  • frontend handles events
  • it seems that map scatter plot is prepared as a figure layer on the backend side
  • adhoc requests, mostly sending full datasets
  • custom routes on the backend

Possible solutions

Frontend driven

Pros:

  • existing solution
  • more responsive
  • "edge computing", smaller processing on the backend
    Cons:
  • have to handle own frontend-backend protocols
  • JB has to learn a TS a bit :-)

Backend driven

Pros:

  • simpler, can buils on existing (plotly, dash)
  • larger data, but same caching still posible
    Cons:
  • less responsive
  • need large refactoring of the code

Conclusions:

  • want to follow the frontend-driven approach
  • need systematicaly designed backend API
  • data decimation on backend (in future offline using airflow)

Xpublish solution

  • xpublish = basic xarray REST API; based on FastAPI
  • xpublish-tiles / xpublish-wms = expose xarray data as map/raster data, dynamic tiling etc.
  • xpublish-EDR = exposing zarray data as geospatial datasets, allowing geospatial selections by polygons, etc.
    e.g. could simplify scatter plot of lat-lon points.

Own xpublish extension

  • try to use EDR cube endpoint to select reqested coord ranges, but probably does not support slicing
  • otherwise: single endpoint, but accept node path arg + variables list + coord slicing -> subarray -> flatten to pandas/polars/arrow parquet/JSON dict of lists -> send

Extension of current map + time series view

  • synchronized zoom in time series

Left panel improvements

  • dataset overview in the very left panel with node tree as expandable nodes (visually better suggesting the tree structure)
    • put there coords first, then variables as childs of the nodes (datasets)
    • coord info:
      coord<name> (#<len>)
      [<min>  < ... < <max>] for sortable / {<first>, ... , <last>} for unsortable
      type: <type> | unit: <unit representation string> | <doc like icon -> description with markdown support>
      
    - var info: 
     ```
     var <name>  [<coord1>(#<coord1len>), ...]
     [<min>  < ... < <max>] for sortable / {<first>, ... , <last>} for discrete
     type: <type> | unit: <unit representation string> | <doc like icon -> description with markdown support>
     ```
    

Right panel (view) improvements (map-time view)

In future: dropdown menu on top for selecting type of view

Map view on top, multiscale view at bottom, selectors in the middle
selectors

  • top: dropdown menus for map view
    variable /coordinate for X axis
    variable /coordinate for Y axis
    variable /coordinate for color (just one for now, at most 4 in future -> subpixels)
    variable /coordinate for point size

    if X,Y are coords -> map plot
    if X or Y is var -> scatter plot over union of X, Y variables coords

  • middle universal selectors for coords not in map or multiscale view
    small discrete coord : checkboxes
    large discrete coord : manual list with autocompletion
    sortable : value + range slider
    reduce dataset to given values of these coords

  • bottom: dropdown menus for multiscale view
    coordinate for 'time(X)' axis
    variable /coordinate for Y axis
    variable /coordinate for color (dicrete or continuous palete according to the kind of variable)
    variable /coordinate for point size
    variable /coordinate for line type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions