Skip to content

Commit

Permalink
Add minimum child age
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff committed Oct 17, 2023
1 parent 2a21067 commit 3b5d98c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
added:
- Child minimum age for basic income.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: Minimum age for children to receive the child basic income.
metadata:
unit: year
label: Child basic income minimum threshold
values:
2010-01-01: 0
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ def formula(person, period, parameters):
bi = parameters(period).gov.contrib.ubi_center.basic_income
weekly_flat_amount = bi.amount.flat
is_senior_for_bi = person("is_SP_age", period)
is_child_for_bi = person("age", period) < bi.amount.adult_age
age = person("age", period)
is_child_for_bi = (age < bi.amount.adult_age) * (
age >= bi.amount.child_min_age
)
weekly_amount_by_age = select(
[is_child_for_bi, is_senior_for_bi],
[bi.amount.by_age.child, bi.amount.by_age.senior],
Expand Down

0 comments on commit 3b5d98c

Please sign in to comment.