-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Newcomers may want to use OpenFisca for eligibility/condition checks.
This is supported, but unclear.
It'd be great to have at least one example of a numerical formula, and another of a boolean one.
Proposed example for the latter:
class basic_income_age_condition(Variable):
value_type = bool
entity = Person
definition_period = MONTH
label = "Age eligibility condition for basic income"
reference = "https://law.gov.example/basic_income/eligibility/age"
def formula(persons, period, parameters):
input_age = persons("age", period)
threshold = parameters(period).general.age_of_majority
return input_age >= threshold
Metadata
Metadata
Assignees
Labels
No labels