mrc-ide / naomi

Naomi model for subnational HIV estimation
https://mrc-ide.github.io/naomi
Other
9 stars 9 forks source link

Aggregate and tag missing data in data preparation script #415

Closed rtesra closed 9 months ago

rtesra commented 9 months ago

This PR updates the ART and ANC aggregation scripts to aggregate with missing data and tag aggregated totals missing data from specific districts.

Previous behaviour:

New behaviour:

vimc-robot commented 9 months ago

Thanks. Corresponding hintr PR at https://github.com/mrc-ide/hintr/pull/480

rtesra commented 9 months ago

This looks really nice to me, couple of small comments but format and testing look good. Though it does beg the question though, maybe we do need a 2nd column. So in cases where we have the highest level with missing values, this is coming through as (e.g. for Likoma)

       area_id  missing_ids
1 MWI_4_7_demo MWI_4_7_demo

Meaning this is just going to show up as a missing region with tooltip along the lines of "Area missing value for 1 region: Likoma" or similar. I wonder if we want to split up those messages. How about

  • If this value is a missing value (not a real 0) then display it in the same way as the aggregated missing value, with tooltip "This value is missing in the uploaded data"
  • If it is an aggregate with a missing value then tooltip. "Aggregate value missing data for n regions: Likoma, X, Y and (n - 3) more"

@r-ash Or we could just change the tooltip to read "Missing data" if area_id == missing_ids?