-
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.
Merge pull request #120 from openfisca/msa_ajout_aides_antony
Ajoute les aides de la ville de Antony
- Loading branch information
Showing
24 changed files
with
1,390 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
48 changes: 48 additions & 0 deletions
48
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,48 @@ | ||
# -*- coding: utf-8 -*- | ||
from openfisca_france.model.base import Famille, Menage, MONTH, Variable, select | ||
|
||
class antony_aide_depart_sejour_adapte(Variable): | ||
value_type = float | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Montant total de l'Aide au départ en séjour adapté de la ville de Antony" | ||
reference = "https://www.ville-antony.fr/aide-aux-departs-en-sejours-vacances" | ||
|
||
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 de base applicable à chaque individu pour l'Aide au départ en séjour adapté de la ville de Antony" | ||
|
||
def formula(famille, period, parameters): | ||
parameters_antony = parameters(period).communes.antony.plafonds_revenus.sejour_adapte | ||
|
||
# Les plafonds sont mensuels et les ressources sont considérées sur 3 mois | ||
# On remet donc les ressources à un niveau mensuel pour la comparaison | ||
ressources_considerees_famille = famille('antony_base_ressources', period) / 3 | ||
|
||
montant = select( | ||
[ | ||
ressources_considerees_famille < parameters_antony.tranches.tranche_1, | ||
ressources_considerees_famille < parameters_antony.tranches.tranche_2 | ||
], | ||
[ | ||
parameters_antony.montants.montant_tranche_1, | ||
parameters_antony.montants.montant_tranche_2 | ||
], | ||
default=0 | ||
) | ||
|
||
return montant |
23 changes: 23 additions & 0 deletions
23
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,23 @@ | ||
# -*- coding: utf-8 -*- | ||
from openfisca_france.model.base import Famille, MONTH, Variable | ||
from openfisca_france.model.prestations.education import TypesScolarite | ||
|
||
|
||
class antony_bourse_communale(Variable): | ||
value_type = bool | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Éligibilité de la famille à la Bourse Communale de la ville de Antony" | ||
reference = "https://www.ville-antony.fr/bourses-communales#restaurationscolaire" | ||
|
||
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 |
21 changes: 21 additions & 0 deletions
21
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,21 @@ | ||
# -*- coding: utf-8 -*- | ||
from openfisca_france.model.base import Famille, MONTH, Variable | ||
|
||
|
||
class antony_bourse_conservatoire(Variable): | ||
value_type = bool | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Éligibilité de la famille à la Bourse du Conservatoire de la ville de Antony" | ||
reference = "https://www.ville-antony.fr/bourses-communales#conservatoire" | ||
|
||
def formula(famille, period, parameters): | ||
age_maximum = parameters(period).communes.antony.bourse_conservatoire.age_maximum | ||
|
||
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 < age_maximum, role=Famille.ENFANT) | ||
|
||
return residence_antony * condition_ressources_remplies * au_moins_un_enfant_moins_de_18_ans |
25 changes: 25 additions & 0 deletions
25
openfisca_france_local/communes/antony/antony_bourse_famille_nombreuse.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,25 @@ | ||
# -*- coding: utf-8 -*- | ||
from openfisca_france.model.base import Famille, MONTH, Variable | ||
|
||
|
||
class antony_bourse_famille_nombreuse(Variable): | ||
value_type = bool | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Éligibilité de la famille à la Bourse Famille Nombreuse de la ville de Antony" | ||
reference = "https://www.ville-antony.fr/bourses-communales#famillesnombreuses" | ||
|
||
def formula(famille, period, parameters): | ||
parameters = parameters(period).communes.antony.bourse_famille_nombreuse | ||
nb_enfants_minimum = parameters.nb_enfants_minimum | ||
age_maximum = parameters.age_maximum | ||
|
||
residence_antony = famille.demandeur.menage('antony_eligibilite_residence', period) | ||
|
||
nb_enfants = famille.nb_persons(role=Famille.ENFANT) | ||
condition_nb_enfants = nb_enfants >= nb_enfants_minimum | ||
|
||
age_i = famille.members('age', period) | ||
au_moins_un_enfant_moins_de_1_an = famille.any(age_i < age_maximum, role=Famille.ENFANT) | ||
|
||
return residence_antony * condition_nb_enfants * au_moins_un_enfant_moins_de_1_an |
21 changes: 21 additions & 0 deletions
21
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,21 @@ | ||
# -*- coding: utf-8 -*- | ||
from openfisca_france.model.base import Famille, MONTH, Variable | ||
|
||
|
||
class antony_noel_pour_tous(Variable): | ||
value_type = bool | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Éligibilité de la famille au Noël pour Tous de la ville de Antony" | ||
reference = "https://www.ville-antony.fr/actualites/noel-ccas-2023" | ||
|
||
def formula(famille, period, parameters): | ||
age_maximum = parameters(period).communes.antony.noel_pour_tous.age_maximum | ||
|
||
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 < age_maximum | ||
|
||
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,84 @@ | ||
# -*- 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 = "Base ressources d'une famille aux dispositifs 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' | ||
] | ||
|
||
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) | ||
|
||
rfr_equivalent_m_3 = famille.demandeur.foyer_fiscal('rfr', period.n_2) / 4 | ||
|
||
ressources_considerees = select( | ||
[((ressources_m_3 > 0) * (rfr_equivalent_m_3 > 0)), (ressources_m_3 > 0), (rfr_equivalent_m_3 > 0)], | ||
[min_(ressources_m_3, rfr_equivalent_m_3), ressources_m_3, rfr_equivalent_m_3], | ||
default=0 | ||
) | ||
|
||
return ressources_considerees | ||
|
||
|
||
class antony_eligibilite_ressources(Variable): | ||
value_type = bool | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Éligibilité de ressources d'une famille aux dispositifs 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))] | ||
) | ||
|
||
# Les plafonds sont mensuels et les ressources sont considérées sur 3 mois | ||
# On remet donc les ressources à un niveau mensuel pour la comparaison | ||
return (ressources_considerees / 3) < 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# -*- coding: utf-8 -*- | ||
from openfisca_france.model.base import Menage, MONTH, Variable | ||
|
||
class antony_eligibilite_residence(Variable): | ||
value_type = bool | ||
entity = Menage | ||
definition_period = MONTH | ||
label = "Éligibilité résidentielle d'un ménage aux dipositifs d'Antony" | ||
|
||
def formula(menage, period, parameters): | ||
return (menage('depcom', period) == b'92002') |
6 changes: 6 additions & 0 deletions
6
openfisca_france_local/parameters/communes/antony/bourse_conservatoire/age_maximum.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,6 @@ | ||
description: Âge maximum d'au moins un enfant de la famille pour être éligible à l'aide Antony Bourse Conservatoire | ||
reference: https://www.ville-antony.fr/bourses-communales#conservatoire | ||
unit: year | ||
values: | ||
2021-06-01: | ||
value: 18 |
6 changes: 6 additions & 0 deletions
6
openfisca_france_local/parameters/communes/antony/bourse_famille_nombreuse/age_maximum.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,6 @@ | ||
description: Âge maximum d'au moins un enfant de la famille pour être éligible à l'aide Antony Bourse Famille Nombreuse | ||
unit: year | ||
reference: "https://www.ville-antony.fr/bourses-communales#famillesnombreuses" | ||
values: | ||
2021-06-01: | ||
value: 1 |
5 changes: 5 additions & 0 deletions
5
..._france_local/parameters/communes/antony/bourse_famille_nombreuse/nb_enfants_minimum.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,5 @@ | ||
description: Nombre minimum d'enfants pour être éligible à l'aide Antony Bourse familles nombreuses | ||
reference: https://www.ville-antony.fr/bourses-communales#famillesnombreuses | ||
values: | ||
2021-06-01: | ||
value: 3 |
6 changes: 6 additions & 0 deletions
6
openfisca_france_local/parameters/communes/antony/noel_pour_tous/age_maximum.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,6 @@ | ||
description: Âge maximum pour être éligible à l'aide Antony Noel pour tous | ||
reference: https://www.ville-antony.fr/actualites/noel-ccas-2023 | ||
unit: year | ||
values: | ||
2021-06-01: | ||
value: 68 |
77 changes: 77 additions & 0 deletions
77
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,77 @@ | ||
bareme_ressources_par_enfant: | ||
reference: https://www.ville-antony.fr/images/Actualite/2024/Aout/CCAS/Imprime-A4-demande-bourse-conservatoire-2024-2025.pdf | ||
description: Barème des plafonds 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 | ||
2024-01-01: | ||
value: 3071 | ||
threshold: | ||
2021-06-01: | ||
value: 1 | ||
2024-01-01: | ||
value: 1 | ||
- amount: | ||
2021-06-01: | ||
value: 3559 | ||
2024-01-01: | ||
value: 4000 | ||
threshold: | ||
2021-06-01: | ||
value: 2 | ||
2024-01-01: | ||
value: 2 | ||
- amount: | ||
2021-06-01: | ||
value: 4394 | ||
2024-01-01: | ||
value: 4940 | ||
threshold: | ||
2021-06-01: | ||
value: 3 | ||
2024-04-01: | ||
value: 3 | ||
- amount: | ||
2021-06-01: | ||
value: 5180 | ||
2024-01-01: | ||
value: 5822 | ||
threshold: | ||
2021-06-01: | ||
value: 4 | ||
2024-01-01: | ||
value: 4 | ||
- amount: | ||
2021-06-01: | ||
value: 5961 | ||
2024-01-01: | ||
value: 6701 | ||
threshold: | ||
2021-06-01: | ||
value: 5 | ||
2024-01-01: | ||
value: 5 | ||
- amount: | ||
2021-06-01: | ||
value: 6745 | ||
2024-01-01: | ||
value: 7581 | ||
threshold: | ||
2021-06-01: | ||
value: 6 | ||
2024-01-01: | ||
value: 6 | ||
- amount: | ||
2021-06-01: | ||
value: 7528 | ||
2024-01-01: | ||
value: 8461 | ||
threshold: | ||
2021-06-01: | ||
value: 7 | ||
2024-01-01: | ||
value: 7 |
6 changes: 6 additions & 0 deletions
6
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
description: Plafond de ressources pour les aides d'Antony pour un couple sans enfants | ||
reference: "https://www.ville-antony.fr/images/Actualite/2022/septembre/Handicap/imprime-2022-aide-aux-sejours-adaptes.pdf" | ||
unit: currency | ||
values: | ||
2021-06-01: | ||
value: 1922 |
6 changes: 6 additions & 0 deletions
6
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
description: Plafond de ressources pour les aides d'Antony pour une personne seule | ||
reference: "https://www.ville-antony.fr/images/Actualite/2022/septembre/Handicap/imprime-2022-aide-aux-sejours-adaptes.pdf" | ||
unit: currency | ||
values: | ||
2021-06-01: | ||
value: 1601 |
19 changes: 19 additions & 0 deletions
19
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,19 @@ | ||
tranches: | ||
description: Plafond de ressources pour les deux tranches de l'Aide au sejour adapte de la ville de Antony | ||
reference: "https://www.ville-antony.fr/images/Actualite/2022/septembre/Handicap/imprime-2022-aide-aux-sejours-adaptes.pdf" | ||
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 | ||
reference: "https://www.ville-antony.fr/images/Actualite/2022/septembre/Handicap/imprime-2022-aide-aux-sejours-adaptes.pdf" | ||
montant_tranche_1: | ||
values: | ||
2021-06-01: 600 | ||
montant_tranche_2: | ||
values: | ||
2021-06-01: 300 |
Oops, something went wrong.