-
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.
Modélisation de la tarification solidaire du périscolaire (Ville de S…
…trasbourg) (#219) * Modèlisation des tarifs périscolaire de strasbourg Ajout de la grille tarifaire de l'acceuil matin/soir pour les écoles maternelle de strasbourg. * chore: màj setup & changelog & refacto nom de variable openfisca * chore: complète la couverture pour les tests de la tarification solidaire du périscolaire pour ll'accueil du soir en maternelle sur l'année 2024 * Update openfisca_france_local/metropoles/strasbourg/tarification_solidaire_periscolaire.py Co-authored-by: Jérémy PASTOURET <[email protected]> * refactor: terme "accueil" periscolaire - Strasbourg --------- Co-authored-by: antoine-de <[email protected]> Co-authored-by: Jérémy PASTOURET <[email protected]>
- Loading branch information
1 parent
c4c9abb
commit 374bb7d
Showing
5 changed files
with
208 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
37 changes: 37 additions & 0 deletions
37
openfisca_france_local/metropoles/strasbourg/tarification_solidaire_periscolaire.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,37 @@ | ||
from openfisca_france.model.base import Variable, Famille, MONTH, max_ | ||
|
||
|
||
class strasbourg_metropole_quotient_familial(Variable): | ||
value_type = float | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Quotient familial de l'eurometropole de strasbourg" | ||
|
||
def formula(famille, period): | ||
rfr = famille.demandeur.foyer_fiscal("rfr", period.n_2) | ||
nbptr = famille.demandeur.foyer_fiscal("nbptr", period.n_2) | ||
return rfr / 12 / nbptr | ||
|
||
|
||
class strasbourg_metropole_tarification_solidaire_periscolaire( | ||
Variable | ||
): | ||
value_type = float | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Tarification de l'accueil periscolaire de l'Eurométropole de Strasbourg" | ||
reference = [ | ||
# tarifs pour 2021-2022 : | ||
"https://www.strasbourg.eu/documents/976405/1280877/0/0cc414e4-c6b7-1709-7e1e-46b088d28805", | ||
# tarifs 2202-2023 | ||
"https://www.strasbourg.eu/documents/976405/1280877/0/c1917f09-97b2-2604-7d58-8b8cb5c0a849", | ||
# tarifs 2024-2025 : | ||
"https://www.strasbourg.eu/documents/976405/1280877/Tarifs-services-periscolaires-2024-2025.pdf/62fa6543-19ae-b69d-3313-13e881a6b866?version=1.0&t=1723127337051" | ||
] | ||
|
||
def formula(famille, period, parameters): | ||
quotient_familial = famille("strasbourg_metropole_quotient_familial", period) | ||
tarif = parameters( | ||
period | ||
).metropoles.strasbourg.periscolaire.accueil_soir_maternelle | ||
return tarif.calc(quotient_familial) |
151 changes: 151 additions & 0 deletions
151
...a_france_local/parameters/metropoles/strasbourg/periscolaire/accueil_soir_maternelle.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,151 @@ | ||
description: | ||
Tarif mensuel du service d'accueil dans les écoles maternelles de la ville de Strasbourg | ||
metadata: | ||
type: single_amount | ||
references: | ||
- tarifs-2021-2022: "https://www.strasbourg.eu/documents/976405/1280877/0/0cc414e4-c6b7-1709-7e1e-46b088d28805" | ||
- tarifs-2022-2023-2024: "https://www.strasbourg.eu/documents/976405/1280877/0/c1917f09-97b2-2604-7d58-8b8cb5c0a849" | ||
brackets: | ||
- threshold: | ||
2021-01-01: | ||
value: -1 | ||
amount: | ||
2021-01-01: | ||
value: 11.95 | ||
2024-09-01: | ||
value: 11.85 | ||
|
||
- threshold: | ||
2024-09-01: | ||
value: 100 | ||
amount: | ||
2024-09-01: | ||
value: 16.16 | ||
|
||
- threshold: | ||
2024-09-01: | ||
value: 300 | ||
amount: | ||
2024-09-01: | ||
value: 20.46 | ||
|
||
- threshold: | ||
2021-01-01: | ||
value: 410 | ||
amount: | ||
2021-01-01: | ||
value: 16.70 | ||
|
||
- threshold: | ||
2024-09-01: | ||
value: 500 | ||
amount: | ||
2024-09-01: | ||
value: 24.77 | ||
|
||
- threshold: | ||
2021-01-01: | ||
value: 510 | ||
amount: | ||
2021-01-01: | ||
value: 21.50 | ||
|
||
- threshold: | ||
2021-01-01: | ||
value: 620 | ||
amount: | ||
2021-01-01: | ||
value: 26.25 | ||
|
||
- threshold: | ||
2024-09-01: | ||
value: 700 | ||
amount: | ||
2024-09-01: | ||
value: 29.07 | ||
|
||
- threshold: | ||
2021-01-01: | ||
value: 720 | ||
amount: | ||
2021-01-01: | ||
value: 31.10 | ||
|
||
- threshold: | ||
2021-01-01: | ||
value: 820 | ||
amount: | ||
2021-01-01: | ||
value: 35.85 | ||
|
||
- threshold: | ||
2024-09-01: | ||
value: 900 | ||
amount: | ||
2024-09-01: | ||
value: 33.38 | ||
|
||
- threshold: | ||
2021-01-01: | ||
value: 920 | ||
amount: | ||
2021-01-01: | ||
value: 40.60 | ||
2024-09-01: | ||
value: 33.38 | ||
|
||
- threshold: | ||
2024-09-01: | ||
value: 1100 | ||
amount: | ||
2024-09-01: | ||
value: 37.68 | ||
|
||
- threshold: | ||
2021-01-01: | ||
value: 1030 | ||
amount: | ||
2021-01-01: | ||
value: 45.30 | ||
|
||
- threshold: | ||
2024-09-01: | ||
value: 1300 | ||
amount: | ||
2024-09-01: | ||
value: 41.99 | ||
|
||
- threshold: | ||
2024-09-01: | ||
value: 1500 | ||
amount: | ||
2024-09-01: | ||
value: 46.29 | ||
|
||
- threshold: | ||
2021-01-01: | ||
value: 1540 | ||
amount: | ||
2021-01-01: | ||
value: 50.15 | ||
|
||
- threshold: | ||
2024-09-01: | ||
value: 1700 | ||
amount: | ||
2024-09-01: | ||
value: 50.60 | ||
|
||
- threshold: | ||
2024-09-01: | ||
value: 1900 | ||
amount: | ||
2024-09-01: | ||
value: 54.90 | ||
|
||
- threshold: | ||
2021-01-01: | ||
value: 2050 | ||
amount: | ||
2021-01-01: | ||
value: 54.90 |
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.15.1', | ||
version='6.16.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,11 @@ | ||
- period: 2021-10 | ||
input: | ||
strasbourg_metropole_quotient_familial: [0, 101, 410, 510, 620, 720, 820, 920, 1030, 1540, 2050, 3000, 5000] | ||
output: | ||
strasbourg_metropole_tarification_solidaire_periscolaire: [11.95, 11.95, 16.70, 21.50, 26.25, 31.10, 35.85, 40.60, 45.30, 50.15, 54.90, 54.90, 54.90] | ||
|
||
- period: 2024-10 | ||
input: | ||
strasbourg_metropole_quotient_familial: [0, 101, 300, 500, 700, 900, 1100, 1300, 1500, 1700, 1900, 2050, 3000, 5000] | ||
output: | ||
strasbourg_metropole_tarification_solidaire_periscolaire: [11.85, 16.16, 20.46, 24.77, 29.07, 33.38, 37.68, 41.99, 46.29, 50.60, 54.90, 54.90, 54.90, 54.90] |