Open jamaa opened 1 year ago
Some libraries that may prove useful for unit handling:
some more unit handling libraries for further inspiration:
Since #112 was fixed, volume calculation accurately considers interpretation and gaps. We could use similar logic for calculating more accurate averages.
Currently, the
Timeseries.Average
property returns the simple arithmetic mean of all values. For non-equidistant timeseries, this value can be misleading. Simlarly, analysis function such as MonthlyStatistics and AnnualStatistics output statistical values that do not respect the unit and interpretation of time series either, potentially causing wrong or at least misleading results.The unit and interpretation needs to be respected everywhere.
For this, Wave needs to be able to understand units and then calculate proper, volume-based averages.
For statistics based on a time period such as month or year, the time series is probably best first converted to monthly/annual values using the
ChangeTimestep
method. This method also needs to be able to understand units.For unknown units, Wave should probably just not output statistics at all and/or ouput an error message.