PolicyEngine / PolicyEngine/policyengine-us

Round SNAP after multiplying by expected contribution and monthlyizing

Open Beginner friendly
#750 2 comments 0 reactions 0 assignees View on GitHub
enhancement snap
Dominant language
Python
Stars
163
Forks
213
Avg merge
3d 3h
Merged PRs (30d)
96

Description

Currently we apply SNAP rounding rules to the annual income:

https://github.com/PolicyEngine/openfisca-us/blob/b5be17ab620a47eb9b60af127fb394526a421f14/openfisca_us/variables/gov/usda/snap/snap_expected_contribution.py#L17-L20

[The law](https://www.law.cornell.edu/uscode/text/7/2017#a), however, rounds the monthly amount after the expected contribution share:
>The value of the [allotment](https://www.law.cornell.edu/definitions/uscode.php?width=840&height=800&iframe=true&def_id=7-USC-1921006204-455106330&term_occur=999&term_src=title:7:chapter:51:section:2017) which[ State ](https://www.law.cornell.edu/definitions/uscode.php?width=840&height=800&iframe=true&def_id=7-USC-80204913-455106346&term_occur=999&term_src=title:7:chapter:51:section:2017)agencies shall be authorized to issue to any[ households ](https://www.law.cornell.edu/definitions/uscode.php?width=840&height=800&iframe=true&def_id=7-USC-1256698945-729468644&term_occur=999&term_src=title:7:chapter:51:section:2017)certified as eligible to participate in the [supplemental nutrition assistance program](https://www.law.cornell.edu/definitions/uscode.php?width=840&height=800&iframe=true&def_id=7-USC-1776625920-1223394958&term_occur=999&term_src=title:7:chapter:51:section:2017) shall be equal to the cost to such[ households ](https://www.law.cornell.edu/definitions/uscode.php?width=840&height=800&iframe=true&def_id=7-USC-1256698945-729468644&term_occur=999&term_src=title:7:chapter:51:section:2017)of the[ thrifty food plan ](https://www.law.cornell.edu/definitions/uscode.php?width=840&height=800&iframe=true&def_id=7-USC-352542901-455106349&term_occur=999&term_src=)reduced by an amount equal to 30 per centum of the[ household’](https://www.law.cornell.edu/definitions/uscode.php?width=840&height=800&iframe=true&def_id=7-USC-1256698945-729468644&term_occur=999&term_src=)s income, as determined in accordance with section 2014(d) and (e) of this title, rounded to the nearest lower whole dollar: Provided, That for[ households ](https://www.law.cornell.edu/definitions/uscode.php?width=840&height=800&iframe=true&def_id=7-USC-1256698945-729468644&term_occur=999&term_src=title:7:chapter:51:section:2017)of one and two persons the minimum[ allotment ](https://www.law.cornell.edu/definitions/uscode.php?width=840&height=800&iframe=true&def_id=7-USC-1921006204-455106330&term_occur=999&term_src=)shall be 8 percent of the cost of the[ thrifty food plan ](https://www.law.cornell.edu/definitions/uscode.php?width=840&height=800&iframe=true&def_id=7-USC-352542901-455106349&term_occur=999&term_src=)for a[ household ](https://www.law.cornell.edu/definitions/uscode.php?width=840&height=800&iframe=true&def_id=7-USC-1256698945-729468644&term_occur=999&term_src=)containing 1 member, as determined by the[ Secretary ](https://www.law.cornell.edu/definitions/uscode.php?width=840&height=800&iframe=true&def_id=7-USC-1264422296-455106344&term_occur=999&term_src=)under [section 2012 of this title](https://www.law.cornell.edu/uscode/text/7/2012), rounded to the nearest whole dollar increment.

Contributor guide

Open the contributing guide

Research direction

Start in openfisca_us/variables/gov/usda/snap/snap_expected_contribution.py at lines 17-20, then compare the current calculation with the cited SNAP statute. Done means the expected contribution is multiplied and monthlyized before applying the required lower-whole-dollar rounding.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.