IAMconsortium / pyam

Analysis & visualization of energy & climate scenarios
https://pyam-iamc.readthedocs.io/
Apache License 2.0
226 stars 118 forks source link

add flows aggregation in aggregate_region #577

Open sandrinecharousset opened 3 years ago

sandrinecharousset commented 3 years ago

This issue is about extending the aggregate_region method to cases where there exist 'flows' data, ie data for which the 'region' value is a line between 2 'region', such as 'reg1 > reg2' When aggregating eg {reg1,reg1,reg3} into BigReg, if there exist I the datasets lines for which the 'region' identifier is 'reg1 > X' (or 'reg2 > X', or 'reg3 > X') then the method should create a new line 'BigReg > X' where the values of each regi > X are added (default, or aggregated with the method given as argument), and same for 'X > regi'.