-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Create a UK-specific situation builder function similar to create_situation() for US.
Implementation
Create givecalc/uk/situation.py with:
create_uk_situation()function that builds a PolicyEngine-UK compatible situation dictionary- Support for key UK inputs:
employment_income(wages/salary)self_employment_incomegift_aid(main charitable donation mechanism)charitable_investment_gifts(donations of stocks/property)is_married(affects tax calculations)region(England, Scotland, Wales, NI - affects income tax rates)num_children(affects child benefit)
- Create donation axes (sweep gift_aid from 0 to income)
- Use UK entity structure: Person → BenUnit → Household
UK Entity Mapping
{
"people": {"person": {...}},
"benunits": {"benunit": {"members": ["person"]}},
"households": {"household": {"members": ["person"]}}
}Acceptance Criteria
- TDD: Tests written first
-
create_uk_situation()creates valid PolicyEngine-UK situations - Axes correctly sweep gift_aid donations
- Handles single person and married couple scenarios
- Handles all 4 UK nations
Part of #59
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request