Skip to content
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

ENH: Refine implementation of Wohngeld maximum rent and ESt Behinderungspauschbetrag #796

Open
MImmesberger opened this issue Oct 1, 2024 · 1 comment
Labels
enhancement New feature or request implementation-detail How something is implemented in Python code, unrelated to the way taxes/transfers are represented

Comments

@MImmesberger
Copy link
Collaborator

Is your feature request related to a problem?

The functions _eink_st_behinderungsgrad_pauschbetrag_y and wohngeld_miete_m_hh rely on complicated np.searchsorted calls that can be made explicit by adjusting the yaml files.

For the Behinderungsgrad, for example, this is necessary because we only specify threshold values in the yaml file, while the input variable behinderungsgrad can take any value between 0 and 100:

  2021-01-01:
    reference: Art. 1 G. v. 09.12.2020 BGBL. I  S. 2770.
    note: First entry (0-0) is required internally.
    0: 0
    20: 384
    30: 620
    40: 860
    50: 1140
    60: 1440
    70: 1780
    80: 2120
    90: 2460
    100: 2840

Describe the solution you would like to see

Expand the yaml files to make it possible to call the parameters directly via the mietstufe and behinderungsgrad keys. For the Behinderungsgrad, for example, we can use the following structure:

  2021-01-02:
    reference: ...
    note: ...
    20:
      min_behinderungsgrad: 1
      max_behinderungsgrad: 19
      pauschbetrag: 310
    30:
      min_behinderungsgrad: 20
      max_behinderungsgrad: 29
      pauschbetrag: 620
    ...

Then we can do the following:

    if (
        behinderungsgrad >= pauschbeträge_dict[20]["min_behinderungsgrad"]
        and behinderungsgrad <= pauschbeträge_dict[20]["max_behinderungsgrad"]
    ):
        pauschbetrag = pauschbeträge_dict[20]["pauschbetrag"]
    elif ...
    else:
        pauschbetrag = 0.0

(This is very verbose but makes it clearer for the reader, I think.)

@MImmesberger MImmesberger added enhancement New feature or request implementation-detail How something is implemented in Python code, unrelated to the way taxes/transfers are represented labels Oct 1, 2024
@hmgaudecker
Copy link
Collaborator

I think that should become a non-issue once we can parse the params files and include the results in the DAG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request implementation-detail How something is implemented in Python code, unrelated to the way taxes/transfers are represented
Projects
None yet
Development

No branches or pull requests

2 participants