quintel / etlocal

Regional data analysis tool for the Energy Transition Model
https://data.energytransitionmodel.com/
MIT License
2 stars 2 forks source link

Add support for aggregation within weighted_average #487

Closed thomas-qah closed 9 months ago

thomas-qah commented 9 months ago

What?

This PR adds support to aggregate values for given interface item for the weighted_average combination_method. This aggregation is performed before the weighted average is calculated. Specifically a sum aggregation is added in this PR.

Why?

To support further refinement of automated processing of dataset values.

How?

The DatasetCombiner::ValueProcessor now checks for certain keys in values of the weighted_average hash within combination_method. If it is a sum, it will sum the values for given interface items.

Closes #485

thomas-qah commented 9 months ago

Done! The wiki page has now been updated for the Rails-based dataset combiner and a short section has been added describing the new sum aggregate method.