-
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.
Ajoute les aides de la ville de Antony
- Loading branch information
Showing
18 changed files
with
293 additions
and
38 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
openfisca_france_local/communes/antony/antony_aide_depart_sejour_adapte.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,46 @@ | ||
# -*- coding: utf-8 -*- | ||
from openfisca_france.model.base import * # noqa analysis:ignore | ||
|
||
|
||
class antony_aide_depart_sejour_adapte(Variable): | ||
value_type = float | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Montant total de l'Aide au depart en sejour adapté de la ville de Antony" | ||
|
||
def formula(famille, period, parameters): | ||
residence_antony = famille.demandeur.menage('antony_eligibilite_residence', period) | ||
|
||
condition_ressources_remplies = famille('antony_eligibilite_ressources', period) | ||
|
||
handicap = famille.members('handicap', period) | ||
montant_individuel = famille('antony_aide_depart_sejour_adapte_montant_individuel', period) | ||
montant_total = famille.sum(montant_individuel * handicap) | ||
|
||
return residence_antony * condition_ressources_remplies * montant_total | ||
|
||
|
||
class antony_aide_depart_sejour_adapte_montant_individuel(Variable): | ||
value_type = float | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Montant individuel de l'Aide au depart en sejour adapté de la ville de Antony" | ||
|
||
def formula(famille, period, parameters): | ||
parameters_antony = parameters(period).communes.antony.plafonds_revenus.sejour_adapte | ||
|
||
ressources_famille = famille('antony_base_ressources', period) | ||
|
||
montant = select( | ||
[ | ||
ressources_famille < parameters_antony.tranches.tranche_1, | ||
ressources_famille < parameters_antony.tranches.tranche_2 | ||
], | ||
[ | ||
parameters_antony.montants.montant_tranche_1, | ||
parameters_antony.montants.montant_tranche_2 | ||
], | ||
default=0 | ||
) | ||
|
||
return montant |
22 changes: 22 additions & 0 deletions
22
openfisca_france_local/communes/antony/antony_bourse_communale.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,22 @@ | ||
# -*- coding: utf-8 -*- | ||
from openfisca_france.model.base import * # noqa analysis:ignore | ||
from openfisca_france.model.prestations.education import TypesScolarite | ||
|
||
|
||
class antony_bourse_communale(Variable): | ||
value_type = bool | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Eligibilité de la famille à la Bourse Communale de la ville de Antony" | ||
|
||
def formula(famille, period, parameters): | ||
residence_antony = famille.demandeur.menage('antony_eligibilite_residence', period) | ||
|
||
condition_ressources_remplies = famille('antony_eligibilite_ressources', period) | ||
|
||
scolarite = famille.members('scolarite', period) | ||
scolarise = ((scolarite == TypesScolarite.college) + (scolarite == TypesScolarite.lycee)) | ||
|
||
au_moins_un_enfant_scolarise = famille.any(scolarise, role = Famille.ENFANT) | ||
|
||
return residence_antony * condition_ressources_remplies * au_moins_un_enfant_scolarise |
19 changes: 19 additions & 0 deletions
19
openfisca_france_local/communes/antony/antony_bourse_conservatoire.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,19 @@ | ||
# -*- coding: utf-8 -*- | ||
from openfisca_france.model.base import * # noqa analysis:ignore | ||
|
||
|
||
class antony_bourse_conservatoire(Variable): | ||
value_type = bool | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Eligibilité de la famille a la Bourse du Conservatoire de la ville de Antony" | ||
|
||
def formula(famille, period, parameters): | ||
residence_antony = famille.demandeur.menage('antony_eligibilite_residence', period) | ||
|
||
condition_ressources_remplies = famille('antony_eligibilite_ressources', period) | ||
|
||
age_i = famille.members('age', period) | ||
au_moins_un_enfant_moins_de_18_ans = famille.any(age_i < 18, role=Famille.ENFANT) | ||
|
||
return residence_antony * condition_ressources_remplies * au_moins_un_enfant_moins_de_18_ans |
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,20 @@ | ||
# -*- coding: utf-8 -*- | ||
from openfisca_france.model.base import * # noqa analysis:ignore | ||
|
||
|
||
class antony_bourse_famille_nombreuse(Variable): | ||
value_type = bool | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Eligibilité de la famille a la Bourse Famille Nombreuse de la ville de Antony" | ||
|
||
def formula(famille, period, parameters): | ||
residence_antony = famille.demandeur.menage('antony_eligibilite_residence', period) | ||
|
||
nb_enfants = famille.nb_persons(role=Famille.ENFANT) | ||
condition_nb_enfants = nb_enfants >= 3 | ||
|
||
age_i = famille.members('age', period) | ||
au_moins_un_enfant_moins_de_1_an = famille.any(age_i < 1, role=Famille.ENFANT) | ||
|
||
return residence_antony * condition_nb_enfants * au_moins_un_enfant_moins_de_1_an |
20 changes: 20 additions & 0 deletions
20
openfisca_france_local/communes/antony/antony_noel_pour_tous.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,20 @@ | ||
# -*- coding: utf-8 -*- | ||
from openfisca_france.model.base import * # noqa analysis:ignore | ||
|
||
|
||
class antony_noel_pour_tous(Variable): | ||
value_type = bool | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Eligibilité de la famille au Noel pour Tous de la ville de Antony" | ||
|
||
def formula(famille, period, parameters): | ||
residence_antony = famille.demandeur.menage('antony_eligibilite_residence', period) | ||
|
||
condition_ressources_remplies = famille('antony_eligibilite_ressources', period) | ||
|
||
age_demandeur = famille.demandeur('age', period) | ||
|
||
demandeur_moins_de_68_ans = age_demandeur < 68 | ||
|
||
return residence_antony * condition_ressources_remplies * demandeur_moins_de_68_ans |
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,98 @@ | ||
# -*- coding: utf-8 -*- | ||
from openfisca_france.model.base import * # noqa analysis:ignore | ||
|
||
|
||
class antony_base_ressources(Variable): | ||
value_type = float | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Éligibilité de ressoures d'une aux dipositifs d'Antony" | ||
|
||
def formula(famille, period, parameters): | ||
# N-1 | ||
last_year = period.last_year | ||
|
||
# M-1 to M-3 | ||
last_three_months = period.last_3_months | ||
|
||
ressources_individus_a_inclure = [ | ||
'salaire_imposable', | ||
'retraite_imposable', | ||
'chomage_imposable', | ||
'pensions_invalidite', | ||
'indemnites_journalieres', | ||
'aah', | ||
'pensions_alimentaires_percues' | ||
] | ||
|
||
ressources_famille_a_inclure = [ | ||
'af', | ||
'cf', | ||
'paje', | ||
'asf', | ||
'aeeh', | ||
'rsa', | ||
'ppa' | ||
] | ||
|
||
# This is a comment | ||
ressources_famille_annuelles_a_inclure = [ | ||
'ars' | ||
] | ||
|
||
resources_mensuelles_individus_m_3 = sum([ | ||
famille.members(resource, last_three_months, options=[ADD]) | ||
for resource in ressources_individus_a_inclure | ||
]) | ||
ressources_mensuelles_famille_m_3 = sum([ | ||
famille(resource, last_three_months, options=[ADD]) | ||
for resource in ressources_famille_a_inclure | ||
]) | ||
ressources_m_3 = ressources_mensuelles_famille_m_3 + famille.sum(resources_mensuelles_individus_m_3) | ||
|
||
resources_mensuelles_individus_n_1 = sum([ | ||
famille.members(resource, last_year, options=[ADD]) | ||
for resource in ressources_individus_a_inclure | ||
]) | ||
ressources_mensuelles_famille_n_1 = sum([ | ||
famille(resource, last_year, options=[ADD]) | ||
for resource in ressources_famille_a_inclure | ||
]) | ||
ressources_annuelles_famille_n_1 = sum([ | ||
famille(resource, last_year) | ||
for resource in ressources_famille_annuelles_a_inclure | ||
]) | ||
ressources_n_1 = (famille.sum((resources_mensuelles_individus_n_1 / 4)) | ||
+ (ressources_mensuelles_famille_n_1 / 4) | ||
+ (ressources_annuelles_famille_n_1 / 4) | ||
) | ||
|
||
ressources_considerees = min_(ressources_m_3, ressources_n_1) | ||
|
||
return ressources_considerees | ||
|
||
|
||
class antony_eligibilite_ressources(Variable): | ||
value_type = bool | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Éligibilité de ressoures d'une aux dipositifs d'Antony" | ||
|
||
def formula(famille, period, parameters): | ||
parameters_antony = parameters(period).communes.antony.plafonds_revenus | ||
baremes_enfants = parameters_antony.bareme_enfants.bareme_ressources_par_enfant | ||
|
||
ressources_considerees = famille('antony_base_ressources', period) | ||
|
||
nb_enfants = famille.nb_persons(role=Famille.ENFANT) | ||
|
||
en_couple = famille('en_couple', period) | ||
|
||
plafond_considere = select( | ||
[not_(en_couple) * (nb_enfants == 0), en_couple * (nb_enfants == 0), nb_enfants > 0], | ||
# Le barème ne va que jusqu'à 7 enfants, on considère donc 7 enfants au plus dans le calcule du barème | ||
# avec min_(nb_enfants, 7) | ||
[parameters_antony.personne_seule, parameters_antony.couple, baremes_enfants.calc(min_(nb_enfants, 7))] | ||
) | ||
|
||
return ressources_considerees < plafond_considere |
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
5 changes: 0 additions & 5 deletions
5
openfisca_france_local/parameters/communes/antony/plafonds_revenus/1_pac.yaml
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
openfisca_france_local/parameters/communes/antony/plafonds_revenus/2_pac.yaml
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
openfisca_france_local/parameters/communes/antony/plafonds_revenus/3_pac.yaml
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
openfisca_france_local/parameters/communes/antony/plafonds_revenus/4_pac.yaml
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
openfisca_france_local/parameters/communes/antony/plafonds_revenus/5_pac.yaml
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
openfisca_france_local/parameters/communes/antony/plafonds_revenus/6_pac.yaml
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
openfisca_france_local/parameters/communes/antony/plafonds_revenus/7_pac.yaml
This file was deleted.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
openfisca_france_local/parameters/communes/antony/plafonds_revenus/bareme_enfants.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,48 @@ | ||
bareme_ressources_par_enfant: | ||
description: Barème des plafond de ressources pour le droit aux aides de la ville de Antony | ||
metadata: | ||
type: single_amount | ||
amount_unit: currency | ||
brackets: | ||
- amount: | ||
2021-06-01: | ||
value: 2732 | ||
threshold: | ||
2021-06-01: | ||
value: 1 | ||
- amount: | ||
2021-06-01: | ||
value: 3559 | ||
threshold: | ||
2021-06-01: | ||
value: 2 | ||
- amount: | ||
2021-06-01: | ||
value: 4394 | ||
threshold: | ||
2021-06-01: | ||
value: 3 | ||
- amount: | ||
2021-06-01: | ||
value: 5180 | ||
threshold: | ||
2021-06-01: | ||
value: 4 | ||
- amount: | ||
2021-06-01: | ||
value: 5961 | ||
threshold: | ||
2021-06-01: | ||
value: 5 | ||
- amount: | ||
2021-06-01: | ||
value: 6745 | ||
threshold: | ||
2021-06-01: | ||
value: 6 | ||
- amount: | ||
2021-06-01: | ||
value: 7528 | ||
threshold: | ||
2021-06-01: | ||
value: 7 |
2 changes: 1 addition & 1 deletion
2
openfisca_france_local/parameters/communes/antony/plafonds_revenus/couple.yaml
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
description: Plafond de ressources pour les aides d'Antony pour un couple sans enfants | ||
unit: currency | ||
values: | ||
2021-11-01: | ||
2021-06-01: | ||
value: 1922 |
2 changes: 1 addition & 1 deletion
2
openfisca_france_local/parameters/communes/antony/plafonds_revenus/personne_seule.yaml
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
description: Plafond de ressources pour les aides d'Antony pour une personne seule | ||
unit: currency | ||
values: | ||
2021-11-01: | ||
2021-06-01: | ||
value: 1601 |
17 changes: 17 additions & 0 deletions
17
openfisca_france_local/parameters/communes/antony/plafonds_revenus/sejour_adapte.yaml
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,17 @@ | ||
tranches: | ||
description: Plafond de ressources pour les deux tranches de l'Aide au sejour adapte de la ville de Antony | ||
tranche_1: | ||
values: | ||
2021-06-01: 4394 | ||
tranche_2: | ||
values: | ||
2021-06-01: 7528 | ||
|
||
montants: | ||
description: Montants accordés pour les deux tranches de l'Aide au sejour adapte de la ville de Antony | ||
montant_tranche_1: | ||
values: | ||
2021-06-01: 600 | ||
montant_tranche_2: | ||
values: | ||
2021-06-01: 300 |