New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2021 Kinderzuschlag calculation #267
Conversation
Codecov Report
@@ Coverage Diff @@
## master #267 +/- ##
==========================================
+ Coverage 91.51% 91.54% +0.02%
==========================================
Files 63 63
Lines 2298 2306 +8
==========================================
+ Hits 2103 2111 +8
Misses 195 195
Continue to review full report at Codecov.
|
@@ -134,7 +134,7 @@ def anz_kinder_anspruch_per_hh( | |||
return kindergeld_anspruch.groupby(hh_id).transform("sum") | |||
|
|||
|
|||
def kinderzuschlag_eink_max( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am confused by name and docstring here. What exactly does the function return? Some income measure + the maximal child benefit surely is not the "maximal claim of child benefit" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are rightly confused.
This is to determine the maximum income amount for which kiz is paid (before 2019). And it depends on the kiz itself. So the function name was not so bad, but the docstring was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, that makes sense!
Thanks! A couple of comments:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sorry, @ChristianZimpelmann, but this is definitely not ready to go yet. Se my previous comments.
I agree. It has always been the maximum amount.
OK, that would spare a few lines of code |
I think it just makes it clearer given the way it is structured, but this is a very minor thing. |
I agree. It is a minor thing for this PR, but a good general idea if this occurs more often in the future. |
It will be a case-by-case basis, often we'll want it inside the function. Here, the thing is that prior to 2021, it is directly a parameter. We should note that in the yaml file, btw. Do we set things to missing if a parameter becomes irrelevant? I do not remember right now... |
There is no standard procedure. Usually, if a parameter becomes irrelevant, this means that we need to implement a new function, thereby implicitly rendering a parameter irrelevant. Adding a note in the yaml file makes certainly sense |
are present in params (previous if-statement might have silently failed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all your work yesterday, looks great now! I just made a check clearer and updated a couple of docstrings.
What problem do you want to solve?
Related to recent discussion on Zulip, this implements the kinderzuschlag calculation in place since 2021. This includes new parameters from Existenzminimumsberichte
kinderzuschlag_max
, which is calculated from ExMin values starting in 2021.Todo
CHANGES.rst
.kinderzuschlag_eink_max
tokinderzuschlag_max_amount