-
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 #184 from openfisca/ajoute-aide-hauts-de-france-10…
…0-repas-gratuits-etudiants-boursiers Ajoute l'aide 100 repas gratuits pour les étudiants boursiers échelons 3 à 7
- Loading branch information
Showing
5 changed files
with
105 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
19 changes: 19 additions & 0 deletions
19
openfisca_france_local/parameters/regions/hauts_de_france/crous/aide_100_repas_gratuits.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,19 @@ | ||
age: | ||
description: Limite d'âge de l'aide du crous et de la région Hauts-de-France de 100 repas gratuits aux étudiants boursiers | ||
maximum: | ||
2023-09-01: | ||
value: 35 | ||
|
||
echelon_boursier: | ||
description: Echelons autorisés pour l'aide du crous et de la région Hauts-de-France de 100 repas gratuits aux étudiants boursiers | ||
minimum: | ||
2023-09-01: | ||
value: 3 | ||
maximum: | ||
2023-09-01: | ||
value: 7 | ||
|
||
metadata: | ||
reference: | ||
2023-09-01: | ||
href: https://www.ij-hdf.fr/actualite/747/100-repas-gratuits-de-nouveau-attribues-aux-etudiants-boursiers-echelon-3-a-7#:~:text=Le%20Conseil%20R%C3%A9gional%20Hauts-de,en%20restos |
34 changes: 34 additions & 0 deletions
34
openfisca_france_local/regions/hauts_de_france/crous/aide_100_repas_gratuits.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,34 @@ | ||
from numpy.core.defchararray import startswith | ||
from openfisca_france.model.prestations.education import TypesScolarite, TypesClasse | ||
from openfisca_france.model.caracteristiques_socio_demographiques.logement import TypesCodeInseeRegion | ||
from openfisca_france.model.base import Individu, MONTH, not_, Variable | ||
from openfisca_france.model.caracteristiques_socio_demographiques.demographie import GroupeSpecialitesFormation | ||
class crous_aide_100_repas_gratuits(Variable): | ||
value_type = float | ||
entity = Individu | ||
label = "Éligibilité financière à l'aide du crous et de la région Hauts-de-France de 100 repas gratuits aux étudiants boursiers échelon 3 à 7" | ||
reference = "https://www.ij-hdf.fr/actualite/747/100-repas-gratuits-de-nouveau-attribues-aux-etudiants-boursiers-echelon-3-a-7#:~:text=Le%20Conseil%20R%C3%A9gional%20Hauts-de,en%20restos" | ||
definition_period = MONTH | ||
|
||
def formula(individu, period, parameters): | ||
params = parameters(period).regions.hauts_de_france.crous.aide_100_repas_gratuits | ||
|
||
age = individu('age', period) | ||
handicap = individu('handicap', period) | ||
region = individu.menage('region', period) | ||
scolarite = individu('scolarite', period) | ||
annee_etude = individu('annee_etude', period) | ||
echelon_boursier = individu('bourse_criteres_sociaux_echelon', period) | ||
groupe_specialites_formation = individu('groupe_specialites_formation', period) | ||
|
||
eligibilite_geographique = (region == TypesCodeInseeRegion.hauts_de_france) | ||
|
||
eligibilite_age = (age <= params.age.maximum) + handicap | ||
|
||
eligibilite_scolarite_formation = (scolarite == TypesScolarite.enseignement_superieur) + (groupe_specialites_formation == GroupeSpecialitesFormation.groupe_330) | ||
|
||
eligibilite_annee_etude = (annee_etude != TypesClasse.cpge_1) * (annee_etude != TypesClasse.bts_1) * (annee_etude != TypesClasse.bts_2) * (annee_etude != TypesClasse.cpge_2) | ||
|
||
eligiblite_echelon_boursier = (echelon_boursier >= params.echelon_boursier.minimum ) * (echelon_boursier <= params.echelon_boursier.maximum) | ||
|
||
return eligibilite_geographique * eligibilite_age * eligibilite_scolarite_formation * eligibilite_annee_etude * eligiblite_echelon_boursier |
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.4.1', | ||
version='6.5.0', | ||
author='OpenFisca Team', | ||
author_email='[email protected]', | ||
classifiers=[ | ||
|
43 changes: 43 additions & 0 deletions
43
tests/regions/hauts-de-france/crous/aide_100_repas_gratuits.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,43 @@ | ||
|
||
- name: Égibilité de l'aide du crous et de la région Hauts-de-France de 100 repas gratuits aux étudiants boursiers échelon 3 à 7 | ||
period: 2023-09 | ||
input: | ||
region: [hauts_de_france, hauts_de_france, hauts_de_france, hauts_de_france, hauts_de_france, hauts_de_france] | ||
age: [22, 22, 22, 22, 22, 22] | ||
scolarite: ["enseignement_superieur", "enseignement_superieur", "enseignement_superieur", "enseignement_superieur", "enseignement_superieur", "enseignement_superieur"] | ||
bourse_criteres_sociaux_echelon: [0, 1, 2, 3, 5, 7] | ||
output: | ||
crous_aide_100_repas_gratuits: [false, false, false, true, true, true] | ||
|
||
- name: Égibilité de l'aide du crous et de la région Hauts-de-France de 100 repas gratuits aux étudiants boursiers échelon 3 à 7 en fonction de l'âge et de la situation géographique | ||
period: 2023-09 | ||
input: | ||
region: [hauts_de_france, hauts_de_france, hauts_de_france, grand_est] | ||
age: [15, 30, 36, 30] | ||
scolarite: ["enseignement_superieur", "enseignement_superieur", "enseignement_superieur", "enseignement_superieur"] | ||
bourse_criteres_sociaux_echelon: [3, 3, 3, 3] | ||
output: | ||
crous_aide_100_repas_gratuits: [true, true, false, false] | ||
|
||
- name: Égibilité de l'aide du crous et de la région Hauts-de-France de 100 repas gratuits aux étudiants boursiers échelon 3 à 7 en fonction de la situation d'handicap | ||
period: 2023-09 | ||
input: | ||
region: [hauts_de_france, hauts_de_france] | ||
age: [38, 38] | ||
scolarite: ["enseignement_superieur", "enseignement_superieur"] | ||
handicap: [true, false] | ||
bourse_criteres_sociaux_echelon: [3, 3] | ||
output: | ||
crous_aide_100_repas_gratuits: [true, false] | ||
|
||
- name: Égibilité de l'aide du crous et de la région Hauts-de-France de 100 repas gratuits aux étudiants boursiers échelon 3 à 7 en fonction de la scolarité et de l'année d'étude | ||
period: 2023-09 | ||
input: | ||
region: [hauts_de_france, hauts_de_france, hauts_de_france, hauts_de_france, hauts_de_france, hauts_de_france, hauts_de_france] | ||
age: [22, 22, 22, 22, 22, 22, 22] | ||
groupe_specialites_formation: ["groupe_100", "groupe_200", "groupe_300", "groupe_310", "groupe_311", "groupe_320", "groupe_330"] | ||
scolarite: ["enseignement_superieur", "lycee", "enseignement_superieur", "enseignement_superieur", "enseignement_superieur", "enseignement_superieur", "inconnue"] | ||
annee_etude: [licence_1, seconde, bts_1, bts_2, cpge_1, cpge_2, autre] | ||
bourse_criteres_sociaux_echelon: [3, 3, 3, 3, 3, 3, 3] | ||
output: | ||
crous_aide_100_repas_gratuits: [true, false, false, false, false, false, true] |