policyengine-us
policyengine-us copied to clipboard
Replace comprehensive `select` statement by `filing_status` with `default` of `SINGLE`
SOI shows that in 2020 (latest year available), single was the most common filing status:
| Filing status | Count (million) |
|---|---|
| Single | 84 |
| Joint+widow | 55 |
| Head of household | 21 |
| Separate | 4 |
As select statements are more performant when using default (#1176), especially with the most common case, let's use SINGLE as the default filing status.
This time test shows that the most performant approach is to order the select from least to (2nd) most common, then make the most common value the default. Accordingly, I'd suggest we change the selects into:
[SURVIVING_SPOUSE, SEPARATE, HEAD_OF_HOUSEHOLD, JOINT], default=SINGLE