-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
139 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
openfisca_france_local/departements/meurthe_et_moselle/eligibilite.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from openfisca_france.model.base import Variable, Menage, MONTH | ||
from numpy.core.defchararray import startswith | ||
|
||
|
||
class meurthe_et_moselle_eligibilite_residence(Variable): | ||
value_type = bool | ||
entity = Menage | ||
definition_period = MONTH | ||
label = "Éligibilité résidentielle d'un ménage aux dipositifs de Meurthe-et-Moselle" | ||
|
||
def formula(menage, period): | ||
return startswith(menage('depcom', period), b'54') |
48 changes: 48 additions & 0 deletions
48
openfisca_france_local/departements/meurthe_et_moselle/pass_jeune_54.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
from openfisca_france.model.base import Variable, Individu, MONTH | ||
|
||
|
||
class eligibilite_age_pass_jeune_54(Variable): | ||
value_type = float | ||
entity = Individu | ||
definition_period = MONTH | ||
label = "Éligibilité d'âge pour le Pass Jeune 54 du département Meurthe-et-Moselle" | ||
|
||
def formula(individu, period, parameters): | ||
age = individu('age', period) | ||
age_minimum = parameters(period).departements.meurthe_et_moselle.pass_jeune_54.age.minimum_inclusif | ||
age_maximum = parameters(period).departements.meurthe_et_moselle.pass_jeune_54.age.maximum_inclusif | ||
print('min et max ************* ', age_minimum, age_maximum) | ||
return (age_minimum <= age) * (age <= age_maximum) | ||
|
||
class quotient_familial_pass_jeune_54(Variable): | ||
value_type = float | ||
entity = Individu | ||
definition_period = MONTH | ||
label = "Quotient familial pour le Pass Jeune 54 du département Meurthe-et-Moselle" | ||
|
||
def formula(individu, period): | ||
rfr = individu.foyer_fiscal('rfr', period.n_2) | ||
nbptr = individu.foyer_fiscal('nbptr', period.n_2) | ||
return rfr / nbptr / 12 | ||
|
||
class pass_jeune_54(Variable): | ||
value_type = float | ||
entity = Individu | ||
definition_period = MONTH | ||
label = "Montant pour le Pass Jeune 54 du département Meurthe-et-Moselle" | ||
reference = [ | ||
"Règlement relatif au Pass Jeune 54 du département Meurthe-et-Moselle", | ||
"https://meurthe-et-moselle.fr/actions/education-populaire-jeunesse-sports/sport/pass-jeunes-54" | ||
] | ||
|
||
def formula(individu, period, parameters): | ||
|
||
params = parameters(period).departements.meurthe_et_moselle.pass_jeune_54 | ||
|
||
eligibilite_residentielle = individu.menage('meurthe_et_moselle_eligibilite_residence', period) | ||
eligibilite_age = individu('eligibilite_age_pass_jeune_54', period) | ||
quotient_familial = individu('quotient_familial_pass_jeune_54', period) | ||
|
||
montant = params.montant_en_fonction_du_quotient_familial.calc(quotient_familial) | ||
|
||
return montant * eligibilite_residentielle * eligibilite_age |
47 changes: 47 additions & 0 deletions
47
openfisca_france_local/parameters/departements/meurthe_et_moselle/pass_jeune_54.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
age: | ||
minimum_inclusif: | ||
reference: | ||
- https://meurthe-et-moselle.fr/actions/education-populaire-jeunesse-sports/sport/pass-jeunes-54 | ||
description: Eligibilité d'âge minimum pour l'aide Pass Jeunes 54 dans le département de la Meurthe-et-Moselle. | ||
values: | ||
2024-01-01: | ||
value: 6 | ||
maximum_inclusif: | ||
reference: | ||
- https://meurthe-et-moselle.fr/actions/education-populaire-jeunesse-sports/sport/pass-jeunes-54 | ||
description: Eligibilité d'âge maximum pour l'aide Pass Jeunes 54 dans le département de la Meurthe-et-Moselle. | ||
values: | ||
2024-01-01: | ||
value: 16 | ||
|
||
montant_en_fonction_du_quotient_familial: | ||
reference: | ||
- https://meurthe-et-moselle.fr/actions/education-populaire-jeunesse-sports/sport/pass-jeunes-54 | ||
description: Montant obtenu pour l'aide Pass Jeunes 54 en région Auvergne-Rhône-Alpes. | ||
metadata: | ||
type: single_amount | ||
brackets: | ||
- threshold: | ||
2024-01-01: | ||
value: 0 | ||
amount: | ||
2024-01-01: | ||
value: 100 | ||
- threshold: | ||
2024-01-01: | ||
value: 451 | ||
amount: | ||
2024-01-01: | ||
value: 70 | ||
- threshold: | ||
2024-01-01: | ||
value: 551 | ||
amount: | ||
2024-01-01: | ||
value: 50 | ||
- threshold: | ||
2024-01-01: | ||
value: 651 | ||
amount: | ||
2024-01-01: | ||
value: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
|
||
setup( | ||
name='OpenFisca-France-Local', | ||
version='6.12.4', | ||
version='6.13.0', | ||
author='OpenFisca Team', | ||
author_email='[email protected]', | ||
classifiers=[ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
- period: 2024-01 | ||
name: "Éligibilité d'âge et de résidence" | ||
input: | ||
age: [5, 6, 8, 16, 17] | ||
depcom: [54000, 54000, 68400, 54000, 54000] | ||
rfr: | ||
2022: [80, 80, 80, 80, 80] | ||
nbptr: | ||
2022: [1, 1, 1, 1, 1] | ||
output: | ||
pass_jeune_54: [0, 100, 0, 100, 0] | ||
|
||
- period: 2024-01 | ||
name: Montant en fonction du quotient familial | ||
input: | ||
age: [14, 14, 14, 14] | ||
depcom: [54000, 54000, 54000, 54000] | ||
rfr: | ||
2022: [7850, 13300, 5600, 5200] | ||
nbptr: | ||
2022: [1, 2, 1, 1] | ||
output: | ||
pass_jeune_54: [0, 50, 70, 100] |