owid / owid-datautils-py

Data util library by the Data Team at @owid
https://docs.owid.io/projects/datautils
MIT License
6 stars 1 forks source link

Issues and improvements for geo.add_region_aggregates #53

Open pabloarosado opened 1 year ago

pabloarosado commented 1 year ago

Let's gather here all issues that the function currently has, and possibly consider the features that it should have in the near future.

pabloarosado commented 1 year ago
  1. Given a wide dataframe with country, year, and several data columns, when an aggregate is added (e.g. "Europe") just for one of the columns (and no aggregation is specified for the rest of the columns) and there was already data for that region, the data for the rest of columns is deleted for that particular region (in this line). This is an unusual scenario, because you would normally want to replace all data for a certain region, not just certain columns. However, the expected behaviour would be to just replace the region data for the specified column.
lucasrodes commented 1 year ago
  1. This seems to be the only dependency between datautils and owid-catalog. Would be great if we made steps towards reducing (or even eliminating) this dependency. More details in this thread: https://owid.slack.com/archives/C0193RW5E2J/p1670340579873829