Skip to content

Commit

Permalink
Modélisation de la tarification solidaire du périscolaire (Ville de S…
Browse files Browse the repository at this point in the history
…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
3 people authored Nov 5, 2024
1 parent c4c9abb commit 374bb7d
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [6.16.0] - 2024-11-05

_Pour les changements détaillés et les discussions associées, référencez la pull request [#219](https://github.com/openfisca/openfisca-france-local/pull/219)_

### Added

- Ajoute la tarification périscolaire de Strasbourg `strasbourg_metropole_tarification_solidaire_periscolaire`

## [6.15.1] - 2024-10-24

_Pour les changements détaillés et les discussions associées, référencez la pull request [#218](https://github.com/openfisca/openfisca-france-local/pull/218)_
Expand Down
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)
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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=[
Expand Down
11 changes: 11 additions & 0 deletions tests/metropoles/strasbourg/periscolaire.yaml
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]

0 comments on commit 374bb7d

Please sign in to comment.