OpenFisca
https://openfisca.org/en/
https://openfisca.org/doc/
https://github.com/openfisca
https://github.com/openfisca/openfisca-core
https://github.com/openfisca/tutorial
What:これは何?
Rule as Codeを実現するソフトウェア
Who:誰が作っている?
オープンソース
ライセンスはAGPL
Why:なぜ必要?
How:どうやって動いている?
From: proj-inclusive MTG 2022-06-18#62ad3d3309c5f20000fd42cb
https://openfisca.org/doc/coding-the-legislation/10_basic_example.html
Pythonっぽいな?yuiseki.icon
code:python
class flat_tax_on_salary(Variable):
value_type = float
entity = Person
definition_period = MONTH
label = u"Individualized and monthly paid tax on salaries"
def formula(person, period):
salary = person('salary', period)
return salary * 0.25
テストがYAMLなのは面白いyuiseki.icon
code:yaml
- name: "Flax tax on salary - No income"
period: 2017-01
input:
salary: 0
output:
flat_tax_on_salary: 0
- name: "Flax tax on salary - With income"
period: 2017-01
input:
salary: 2000
output:
flat_tax_on_salary: 500
関連
/tkgshn/Open fisca
tkgshn-yuiseki 2021-07-30