PolicyEngine / PolicyEngine/policyengine-us

Simplify the `ny_supplemental_tax` variable formula

Open
#4,972 0 comments 0 reactions 0 assignees View on GitHub
code-health
Dominant language
Python
Stars
163
Forks
213
Avg merge
3d 3h
Merged PRs (30d)
96

Description

We should break up the formula into multiple variables and use a select for the rate calculation:
```
rates = tax.main
single = rates.single
joint = rates.joint
hoh = rates.head_of_household
widow = rates.widow
separate = rates.separate
scales = [single, joint, hoh, widow, separate]

previous_agi_threshold = select(
in_each_status,
[
get_previous_threshold(ny_taxable_income, scale.thresholds)
for scale in scales
],
)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.