Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modélisation de la tarification solidaire du périscolaire (Ville de Strasbourg) #219

Merged
merged 5 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]
Loading