Skip to content

default aggregation columns #468

Description

@tomjemmett

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions