ihmeuw-demographics / hierarchyUtils

Demographics Related Utility Functions
https://ihmeuw-demographics.github.io/hierarchyUtils/
BSD 3-Clause "New" or "Revised" License
8 stars 3 forks source link

Feature request: add `agg` option to keep granular intervals #28

Closed krpaulson closed 4 years ago

krpaulson commented 4 years ago

For example, if you aggregate ages <1, 1, 2, 3, 4 to <5, should the function return the input age groups or just <5? Would be useful to have the option to do either.

chacalle commented 4 years ago

We had a discussion about this at one point where the aggregation function should only return the aggregates since that is more what you'd expect from the function.

Its only one extra line for the user to append on to the original dataset right?

chacalle commented 4 years ago

One use case I see is when we have national and subnational data already. But then aggregate the subnational data to the national level data as well just to check that everything adds up.

The user would have to somehow distinguish between the original data and the aggregated subnational data by adding something like an aggregate column. I was thinking originally the user would just have to figure this out themselves but maybe it is useful to add an option to append back onto the original dataset.

krpaulson commented 4 years ago

Ok, that sounds fine to make users append.