|
return results.groupby(["pod", "sitetret", *args, "measure"])["value"].sum() |
currently, when we create aggregations we add the pod, sitetret, and measure columns to the groupings.
the sitetret column makes sense for provider based model runs, but for national, regional, icb level runs we might want to select something else.
we should add an argument to the model when we instantiate to choose the default columns to aggregate over, then make the function above return
return results.groupby([*self._default_agg_columns, *args, "measure"])["value"].sum()
this should be an argument to Model (and InpatientsModel, OutpatientsModel, AaEModel, passing through to Model) which is then set in the __init__ method
nhp_model/src/nhp/model/model.py
Line 406 in 8f44376
currently, when we create aggregations we add the pod, sitetret, and measure columns to the groupings.
the sitetret column makes sense for provider based model runs, but for national, regional, icb level runs we might want to select something else.
we should add an argument to the model when we instantiate to choose the default columns to aggregate over, then make the function above return
this should be an argument to Model (and
InpatientsModel,OutpatientsModel,AaEModel, passing through toModel) which is then set in the__init__method