Skip to content

Read UK budget rows from gov_tax and gov_spending #4378

Done

Description

@juaristi22

PolicyEngine/policyengine-sim-api#1171 fixes the UK budget headline. It totalled household_tax, which leaves out employer National Insurance, so a 1 percentage point cut in the employer rate showed as a saving in the app. With the fix, a UK report's budget_summary tax and benefit rows are named gov_tax and gov_spending, the model's government accounts.

budget_impact in policyengine_api/services/v2/stored_reports/economy_results/transformations.py reads only the rows named household_tax and household_benefits, and raises when either is missing. Once sim-api#1171 deploys, every new UK report would be unreadable ("the budget summary has no household_tax row"). The reader needs to read the UK's new rows, fall back to the household rows for reports stored earlier, and deploy first.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions