FlexMeasures / flexmeasures

The intelligent & developer-friendly EMS to support real-time energy flexibility apps, rapidly and scalable.
https://flexmeasures.io
Apache License 2.0
133 stars 34 forks source link

feature: Add `--resolution` option to flexmeasures show chart #1070

Closed victorgarcia98 closed 1 month ago

victorgarcia98 commented 1 month ago

vl-convert library, which is used to render the Vega-Lite chart specs uses a embedded node engine which has a very low memory limit. So far, this is not possible not change. The memory limit is hit for large periods of data but we can downsample the data to a coarser resolution to reduce the memory usage.

How to test?

Asset Chart

flexmeasures show chart --start 2023-01-01T00:00:00+01:00 --end 2023-01-10T00:00:00+01:00 --asset 2387  --resolution P1D

Sensor Chart

flexmeasures show chart --start 2023-01-01T00:00:00+01:00 --end 2023-01-10T00:00:00+01:00 --sensor 16860  --resolution P1D