OpenFisca-France 169.0.0__py3-none-any.whl → 169.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of OpenFisca-France might be problematic. Click here for more details.
- {OpenFisca_France-169.0.0.dist-info → OpenFisca_France-169.1.1.dist-info}/METADATA +14 -8
- {OpenFisca_France-169.0.0.dist-info → OpenFisca_France-169.1.1.dist-info}/RECORD +7 -19
- {OpenFisca_France-169.0.0.dist-info → OpenFisca_France-169.1.1.dist-info}/top_level.txt +0 -1
- openfisca_france/assets/taxe_habitation/source/do_REI_2017-2018_to_csv.do +175 -0
- openfisca_france/model/prestations/minima_sociaux/ppa.py +14 -14
- OpenFisca_France-169.0.0.data/data/share/openfisca/openfisca-france/CHANGELOG.md +0 -10010
- OpenFisca_France-169.0.0.data/data/share/openfisca/openfisca-france/README.md +0 -302
- tests/__init__.py +0 -0
- tests/cache.py +0 -3
- tests/test_basics.py +0 -44
- tests/test_coefficient.py +0 -38
- tests/test_entities.py +0 -163
- tests/test_metadata.py +0 -7
- tests/test_nb_enfants.py +0 -24
- tests/test_parameters.py +0 -11
- tests/test_preprocessing.py +0 -172
- tests/test_scenarios.py +0 -39
- tests/test_tax_rates.py +0 -53
- {OpenFisca_France-169.0.0.dist-info → OpenFisca_France-169.1.1.dist-info}/LICENSE.AGPL.txt +0 -0
- {OpenFisca_France-169.0.0.dist-info → OpenFisca_France-169.1.1.dist-info}/WHEEL +0 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: OpenFisca-France
|
|
3
|
-
Version: 169.
|
|
4
|
-
Summary:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
Version: 169.1.1
|
|
4
|
+
Summary: OpenFisca Rules as Code model for France.
|
|
5
|
+
Author-email: OpenFisca Team <contact@openfisca.fr>
|
|
6
|
+
Project-URL: Homepage, https://github.com/openfisca/openfisca-france
|
|
7
|
+
Project-URL: Repository, https://github.com/openfisca/openfisca-france
|
|
8
|
+
Project-URL: Documentation, https://openfisca.org/doc
|
|
9
|
+
Project-URL: Issues, https://github.com/openfisca/openfisca-france/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/openfisca/openfisca-france/blob/main/CHANGELOG.md
|
|
11
|
+
Keywords: microsimulation,tax,benefit,rac,rules-as-code,france
|
|
10
12
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
13
|
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
12
14
|
Classifier: Operating System :: POSIX
|
|
@@ -15,21 +17,25 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
15
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
19
|
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
20
|
+
Requires-Python: >=3.9
|
|
18
21
|
Description-Content-Type: text/markdown
|
|
19
22
|
License-File: LICENSE.AGPL.txt
|
|
20
23
|
Requires-Dist: numpy <2,>=1.24.3
|
|
21
|
-
Requires-Dist:
|
|
24
|
+
Requires-Dist: openfisca-core[web-api] <44,>=43
|
|
22
25
|
Provides-Extra: casd-dev
|
|
23
26
|
Requires-Dist: autopep8 <3.0,>=2.0.2 ; extra == 'casd-dev'
|
|
27
|
+
Requires-Dist: pytest ; extra == 'casd-dev'
|
|
24
28
|
Requires-Dist: requests <3.0,>=2.28.2 ; extra == 'casd-dev'
|
|
25
29
|
Requires-Dist: scipy <2.0,>=1.10.1 ; extra == 'casd-dev'
|
|
26
30
|
Provides-Extra: de_net_a_brut
|
|
27
31
|
Requires-Dist: scipy <2.0,>=1.10.1 ; extra == 'de_net_a_brut'
|
|
28
32
|
Provides-Extra: dev
|
|
29
33
|
Requires-Dist: autopep8 <3.0,>=2.0.2 ; extra == 'dev'
|
|
34
|
+
Requires-Dist: Flake8-pyproject <2.0.0,>=1.2.3 ; extra == 'dev'
|
|
30
35
|
Requires-Dist: flake8 <7.0.0,>=6.0.0 ; extra == 'dev'
|
|
31
36
|
Requires-Dist: flake8-print <6.0.0,>=5.0.0 ; extra == 'dev'
|
|
32
37
|
Requires-Dist: flake8-quotes >=3.3.2 ; extra == 'dev'
|
|
38
|
+
Requires-Dist: pytest ; extra == 'dev'
|
|
33
39
|
Requires-Dist: scipy <2.0,>=1.10.1 ; extra == 'dev'
|
|
34
40
|
Requires-Dist: requests <3.0,>=2.28.2 ; extra == 'dev'
|
|
35
41
|
Requires-Dist: yamllint <2.0,>=1.30.0 ; extra == 'dev'
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
OpenFisca_France-169.0.0.data/data/share/openfisca/openfisca-france/CHANGELOG.md,sha256=ICA8T99ga-_wJ88vg6HzniOvH_DyCVUznqvMouUFE68,456903
|
|
2
|
-
OpenFisca_France-169.0.0.data/data/share/openfisca/openfisca-france/README.md,sha256=nIa6V4zevZpj2DX1rcpgs6AATTerCCy4622S1D3-CDI,18642
|
|
3
1
|
openfisca_france/__init__.py,sha256=MHLZ0V8uQHi4lkZ5bPAoLjsWTJe-wJgLfPxFvbCCxHc,126
|
|
4
2
|
openfisca_france/entities.py,sha256=nGl52ncj9wZzFwASKZk4_OHzhqOUuXGBxNmIiwxZU-c,2576
|
|
5
3
|
openfisca_france/france_taxbenefitsystem.py,sha256=UHVqvkqqYk-9RanSPWlVy3uieG77GCSrWCOqVpeN30I,1687
|
|
@@ -16,6 +14,7 @@ openfisca_france/assets/taxe_habitation/parametres_th_2019.csv,sha256=Ha8ysg2bbE
|
|
|
16
14
|
openfisca_france/assets/taxe_habitation/parametres_th_2020.csv,sha256=yAiuCwx7iARH-KgcPMIYQm_LxPiF63tZB7F8xwMbR8Y,1933804
|
|
17
15
|
openfisca_france/assets/taxe_habitation/parametres_th_2021.csv,sha256=g4bogeIyCRhcsFcj7Pmyr6VDB7LAX0KUkFrrq7Yek_o,1835924
|
|
18
16
|
openfisca_france/assets/taxe_habitation/parametres_th_2022.csv,sha256=t9LUWTzLANhMNOKANwiUmAJ6LeBSdW9IWvyT07D3-xw,1934360
|
|
17
|
+
openfisca_france/assets/taxe_habitation/source/do_REI_2017-2018_to_csv.do,sha256=A9dbu4uPuZDPxy40DKZmiHjre-s2f65qBM0mSvZOyCg,8304
|
|
19
18
|
openfisca_france/assets/versement_transport/taux.json,sha256=waklTUpATx-gWWusFekcOvE7akWKoHH3Fq3d11Rzx8U,3445711
|
|
20
19
|
openfisca_france/conf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
20
|
openfisca_france/conf/cache_blacklist.py,sha256=QfCGXsPfDCw8r0wC0p0Lsk587MsryxaG034qHSeVuPo,2769
|
|
@@ -117,7 +116,7 @@ openfisca_france/model/prestations/minima_sociaux/aefa.py,sha256=mXOBJgXTl_iA6aa
|
|
|
117
116
|
openfisca_france/model/prestations/minima_sociaux/anciens_ms.py,sha256=PAXVlfd8PNXR_cUyf31BUsVJ8-KTTP3Tx6CD7rRLBEw,10878
|
|
118
117
|
openfisca_france/model/prestations/minima_sociaux/asi_aspa.py,sha256=abhKjQrYylUbi5Q78JL5yx0WoVtjejVWfi13FoHxnvI,20771
|
|
119
118
|
openfisca_france/model/prestations/minima_sociaux/ass.py,sha256=lFizKYXWihH7L5jEQpHvaK-61DmxlcX0r4QoWuuG5YU,11221
|
|
120
|
-
openfisca_france/model/prestations/minima_sociaux/ppa.py,sha256=
|
|
119
|
+
openfisca_france/model/prestations/minima_sociaux/ppa.py,sha256=NFK5RuXb4OO34MCAPCdPm_z1tNYkV9JZ8IAA-UMFgH0,25511
|
|
121
120
|
openfisca_france/model/prestations/minima_sociaux/rsa.py,sha256=Zm4PtXMrJKzoT_lLctdL049Grv4hQd0PR07Q7ubZeRk,48162
|
|
122
121
|
openfisca_france/model/prestations/minima_sociaux/cs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
123
122
|
openfisca_france/model/prestations/minima_sociaux/cs/acs.py,sha256=nwihxwsjKAmgPBW3jB2GcCSOxWJuQKgNhTj_gLZ-xAw,2435
|
|
@@ -4018,19 +4017,8 @@ openfisca_france/scripts/performance/measure_spiral_performances.py,sha256=cQIxE
|
|
|
4018
4017
|
openfisca_france/scripts/performance/measure_tests_performance.py,sha256=HYgSJy-OMZay2AZt6ztntgdUbW_RL2xMr-iHcK-zoVY,1869
|
|
4019
4018
|
openfisca_france/situation_examples/__init__.py,sha256=BTRmrqk9lsjfhtPXsYcsWqXFEYyFpgLcxNs6oJsy8zk,262
|
|
4020
4019
|
openfisca_france/situation_examples/couple.json,sha256=Ot1x4wl3IS-2-10X3V7ZUokkOMXi96s-xK7A0gNvRF4,862
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
tests/test_metadata.py,sha256=PH_KMb7IeJWw5pFNaq4vQknVRj6fhaW1GxppYQGwC5k,257
|
|
4027
|
-
tests/test_nb_enfants.py,sha256=sfiTyx66xW85SkXJEOWFAN-ptBZToNry2xdNiBSEGuw,890
|
|
4028
|
-
tests/test_parameters.py,sha256=9ByrtcJpaV32qCE-u4FY4fzCugFUW8utc5_KUAmYKG8,354
|
|
4029
|
-
tests/test_preprocessing.py,sha256=BBMFR4GlFFqu86XfVcrHRbps_SpoWb1QS1lmu3c5bCE,6973
|
|
4030
|
-
tests/test_scenarios.py,sha256=A7SmVt_iyDTbNTE45WgGQlQZkJ0uJ1ZGUhTV3ziwLUw,1009
|
|
4031
|
-
tests/test_tax_rates.py,sha256=B_CnSIqCijGYkKW7XVZlF8uot0otNJ-Sq-DKINPATfA,1551
|
|
4032
|
-
OpenFisca_France-169.0.0.dist-info/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
|
|
4033
|
-
OpenFisca_France-169.0.0.dist-info/METADATA,sha256=mdy4_9h7ri7xoBD_6WzoQYrPrhlQDynFI7YW434Kgsw,20437
|
|
4034
|
-
OpenFisca_France-169.0.0.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
|
4035
|
-
OpenFisca_France-169.0.0.dist-info/top_level.txt,sha256=hmd7WhmLN_CyB52sP702pN9WlJqO9YMVuzeBRNp3hfs,23
|
|
4036
|
-
OpenFisca_France-169.0.0.dist-info/RECORD,,
|
|
4020
|
+
OpenFisca_France-169.1.1.dist-info/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
|
|
4021
|
+
OpenFisca_France-169.1.1.dist-info/METADATA,sha256=k-Fwo4xw8iDUZmAY-EsirDREQ7RXRT1NKw3ezKdWIHs,20862
|
|
4022
|
+
OpenFisca_France-169.1.1.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
|
4023
|
+
OpenFisca_France-169.1.1.dist-info/top_level.txt,sha256=1LbD6QJWehKGIcjtaJ45tbQOSDiFEXOlIdgWRI_jaHU,17
|
|
4024
|
+
OpenFisca_France-169.1.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/***************************************************************************************/
|
|
2
|
+
/*** Mise en forme des fichiers REI 2017 à 2022 pour OpenFisca
|
|
3
|
+
Nécessite Stata version 14 *********************************/
|
|
4
|
+
/***************************************************************************************/
|
|
5
|
+
|
|
6
|
+
clear
|
|
7
|
+
set more off
|
|
8
|
+
cap log close
|
|
9
|
+
|
|
10
|
+
**** Chemin des REI en local. Les fichiers REI en .xlsx sont accessibles en ligne sur https://www.data.gouv.fr/fr/datasets/impots-locaux-fichier-de-recensement-des-elements-dimposition-a-la-fiscalite-directe-locale-rei-3/
|
|
11
|
+
global input_2017 = ""
|
|
12
|
+
global input_2018 = ""
|
|
13
|
+
global input_2019 = ""
|
|
14
|
+
global input_2020 = ""
|
|
15
|
+
global input_2021 = ""
|
|
16
|
+
global input_2022 = ""
|
|
17
|
+
|
|
18
|
+
**** Chemin d'export du fichier csv
|
|
19
|
+
global export_2017 = ""
|
|
20
|
+
global export_2018 = ""
|
|
21
|
+
global export_2019 = ""
|
|
22
|
+
global export_2020 = ""
|
|
23
|
+
global export_2021 = ""
|
|
24
|
+
global export_2022 = ""
|
|
25
|
+
|
|
26
|
+
*2017-2018
|
|
27
|
+
forval i=2017/2018 {
|
|
28
|
+
set excelxlsxlargefile on
|
|
29
|
+
import excel using "${input_`i'}.xlsx", firstrow clear
|
|
30
|
+
keep DEP COM SIREPCI Q03 LIBCOM H12 H32 J21 J23 J31* J33* J41* J43* J51* J53* J61* J63*
|
|
31
|
+
compress
|
|
32
|
+
|
|
33
|
+
foreach var of varlist H* J* {
|
|
34
|
+
replace `var' = 0 if `var'==.
|
|
35
|
+
}
|
|
36
|
+
gen code_insee_commune = trim(DEP) + trim(COM)
|
|
37
|
+
|
|
38
|
+
gen taux_com = H12/100
|
|
39
|
+
gen taux_epci = H32/100
|
|
40
|
+
|
|
41
|
+
gen valeur_locative_moyenne_com = J21
|
|
42
|
+
gen valeur_locative_moyenne_epci = J23
|
|
43
|
+
|
|
44
|
+
* Pour certaines intercom, il n'y a pas de quotité ajustée mais seulement une quotité simple. Surement due aux interco créées après 2010 (qui est l'année du transfert de la TH départementale justifiant cet ajustement). Donc, si la valeur ajustée est nulle, on prend la quotité simple
|
|
45
|
+
gen abt_general_base_com = cond(J51A~=0,J51A,J51)
|
|
46
|
+
gen abt_general_base_epci = cond(J53A~=0,J53A,J53)
|
|
47
|
+
gen abt_pac_1_2_com = cond(J31A~=0,J31A,J31)
|
|
48
|
+
gen abt_pac_1_2_epci = cond(J33A~=0,J33A,J33)
|
|
49
|
+
gen abt_pac_3pl_com = cond(J41A~=0,J41A,J41)
|
|
50
|
+
gen abt_pac_3pl_epci = cond(J43A~=0,J43A,J43)
|
|
51
|
+
gen abt_condition_modeste_com = cond(J61A~=0,J61A,J61)
|
|
52
|
+
gen abt_condition_modeste_epci = cond(J63A~=0,J63A,J63)
|
|
53
|
+
|
|
54
|
+
keep code_insee_commune taux_* valeur_locative_moyenne_* abt_*
|
|
55
|
+
foreach var of varlist taux_* valeur_locative_moyenne_* abt_* {
|
|
56
|
+
replace `var' = 0 if `var'==.
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
sort code_insee_commune
|
|
60
|
+
outsheet code_insee_commune taux_* valeur_locative_moyenne_* abt_* using "${export_`i'}.csv", comma replace
|
|
61
|
+
}
|
|
62
|
+
*2019-2020
|
|
63
|
+
forval i=2019/2020 {
|
|
64
|
+
set excelxlsxlargefile on
|
|
65
|
+
import excel using "${input_`i'}.xlsx", firstrow clear
|
|
66
|
+
keep DEPARTEMENT COMMUNE NUMEROSIRENDELEPCI THCOMMUNETAUXNET THINTERCOMMUNALITETAUXAPP THVLMOYENNEUTILISEEPOUR IJ THQUOTITEDESABATTEMENTSAVA THQUOTITEDESABATTEMENTSAJ IL THQUOTITEDESABATTEMENTSAJU IO IP IQ IR IS IT IU IV IW IX IY IZ
|
|
67
|
+
|
|
68
|
+
compress
|
|
69
|
+
|
|
70
|
+
foreach var of varlist THCOMMUNETAUXNET THINTERCOMMUNALITETAUXAPP THQUOTITEDESABATTEMENTSAVA THQUOTITEDESABATTEMENTSAJ IL THQUOTITEDESABATTEMENTSAJU IO IP IQ IR IS IT IU IV IW IX IY IZ {
|
|
71
|
+
replace `var' = 0 if `var'==.
|
|
72
|
+
}
|
|
73
|
+
gen code_insee_commune = trim(DEPARTEMENT) + trim(COMMUNE)
|
|
74
|
+
|
|
75
|
+
gen taux_com = THCOMMUNETAUXNET/100
|
|
76
|
+
gen taux_epci = THINTERCOMMUNALITETAUXAPP/100
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
gen valeur_locative_moyenne_com = THVLMOYENNEUTILISEEPOUR
|
|
80
|
+
gen valeur_locative_moyenne_epci = IJ
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
* Pour certaines intercom, il n'y a pas de quotité ajustée mais seulement une quotité simple. Surement due aux interco créées après 2010 (qui est l'année du transfert de la TH départementale justifiant cet ajustement). Donc, si la valeur ajustée est nulle, on prend la quotité simple
|
|
84
|
+
gen abt_general_base_com = cond(IU~=0,IU,IS)
|
|
85
|
+
gen abt_general_base_epci = cond(IV~=0,IV,IT)
|
|
86
|
+
gen abt_pac_1_2_com = cond(THQUOTITEDESABATTEMENTSAJ~=0,THQUOTITEDESABATTEMENTSAJ,THQUOTITEDESABATTEMENTSAVA)
|
|
87
|
+
gen abt_pac_1_2_epci = cond(THQUOTITEDESABATTEMENTSAJU~=0,THQUOTITEDESABATTEMENTSAJU,IL)
|
|
88
|
+
gen abt_pac_3pl_com = cond(IQ~=0,IQ,IO)
|
|
89
|
+
gen abt_pac_3pl_epci = cond(IR~=0,IR,IP)
|
|
90
|
+
gen abt_condition_modeste_com = cond(IY~=0,IY,IW)
|
|
91
|
+
gen abt_condition_modeste_epci = cond(IZ~=0,IZ,IX)
|
|
92
|
+
|
|
93
|
+
keep code_insee_commune taux_* valeur_locative_moyenne_* abt_*
|
|
94
|
+
foreach var of varlist taux_* valeur_locative_moyenne_* abt_* {
|
|
95
|
+
replace `var' = 0 if `var'==.
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
sort code_insee_commune
|
|
99
|
+
outsheet code_insee_commune taux_* valeur_locative_moyenne_* abt_* using "${export_`i'}.csv", comma replace
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
*2021
|
|
103
|
+
set excelxlsxlargefile on
|
|
104
|
+
import excel using "${input_2021}.xlsx", firstrow clear
|
|
105
|
+
keep DEPARTEMENT COMMUNE NUMEROSIRENDELEPCI THCOMMUNETAUXNET THINTERCOMMUNALITETAUXAPP THVLMOYENNEUTILISEEPOUR HV THQUOTITEDESABATTEMENTSAVA THQUOTITEDESABATTEMENTSAJ IL THQUOTITEDESABATTEMENTSAJU IB IC ID IE IF IG IH II IJ IK IL IM
|
|
106
|
+
|
|
107
|
+
compress
|
|
108
|
+
|
|
109
|
+
foreach var of varlist THCOMMUNETAUXNET THINTERCOMMUNALITETAUXAPP THVLMOYENNEUTILISEEPOUR HV THQUOTITEDESABATTEMENTSAVA THQUOTITEDESABATTEMENTSAJ IL THQUOTITEDESABATTEMENTSAJU IB IC ID IE IF IG IH II IJ IK IL IM {
|
|
110
|
+
replace `var' = 0 if `var'==.
|
|
111
|
+
}
|
|
112
|
+
gen code_insee_commune = trim(DEPARTEMENT) + trim(COMMUNE)
|
|
113
|
+
|
|
114
|
+
gen taux_com = THCOMMUNETAUXNET/100
|
|
115
|
+
gen taux_epci = THINTERCOMMUNALITETAUXAPP/100
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
gen valeur_locative_moyenne_com = THVLMOYENNEUTILISEEPOUR
|
|
119
|
+
gen valeur_locative_moyenne_epci = HV
|
|
120
|
+
|
|
121
|
+
* Pour certaines intercom, il n'y a pas de quotité ajustée mais seulement une quotité simple. Surement due aux interco créées après 2010 (qui est l'année du transfert de la TH départementale justifiant cet ajustement). Donc, si la valeur ajustée est nulle, on prend la quotité simple
|
|
122
|
+
gen abt_general_base_com = cond(IH~=0,IH,IF)
|
|
123
|
+
gen abt_general_base_epci = cond(II~=0,II,IG)
|
|
124
|
+
gen abt_pac_1_2_com = cond(THQUOTITEDESABATTEMENTSAJ~=0,THQUOTITEDESABATTEMENTSAJ,THQUOTITEDESABATTEMENTSAVA)
|
|
125
|
+
gen abt_pac_1_2_epci = cond(THQUOTITEDESABATTEMENTSAJU~=0,THQUOTITEDESABATTEMENTSAJU,IL)
|
|
126
|
+
gen abt_pac_3pl_com = cond(ID~=0,ID,IB)
|
|
127
|
+
gen abt_pac_3pl_epci = cond(IE~=0,IE,IC)
|
|
128
|
+
gen abt_condition_modeste_com = cond(IL~=0,IL,IJ)
|
|
129
|
+
gen abt_condition_modeste_epci = cond(IM~=0,IM,IK)
|
|
130
|
+
|
|
131
|
+
keep code_insee_commune taux_* valeur_locative_moyenne_* abt_*
|
|
132
|
+
foreach var of varlist taux_* valeur_locative_moyenne_* abt_* {
|
|
133
|
+
replace `var' = 0 if `var'==.
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
sort code_insee_commune
|
|
137
|
+
outsheet code_insee_commune taux_* valeur_locative_moyenne_* abt_* using "${export_2021}.csv", comma replace
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
*2022
|
|
141
|
+
set excelxlsxlargefile on
|
|
142
|
+
import excel using "${input_2022}.xlsx", firstrow clear
|
|
143
|
+
keep DEPARTEMENT COMMUNE NUMEROSIRENDELEPCI THCOMMUNETAUXNET THINTERCOMMUNALITETAUXAPP THVLMOYENNEUTILISEEPOUR IG THQUOTITEDESABATTEMENTSAVA THQUOTITEDESABATTEMENTSAJ II THQUOTITEDESABATTEMENTSAJU IL IM IN IO IP IQ IR IS IT IU IV IW
|
|
144
|
+
|
|
145
|
+
compress
|
|
146
|
+
|
|
147
|
+
foreach var of varlist THCOMMUNETAUXNET THINTERCOMMUNALITETAUXAPP THVLMOYENNEUTILISEEPOUR IG THQUOTITEDESABATTEMENTSAVA THQUOTITEDESABATTEMENTSAJ II THQUOTITEDESABATTEMENTSAJU IL IM IN IO IP IQ IR IS IT IU IV IW {
|
|
148
|
+
replace `var' = 0 if `var'==.
|
|
149
|
+
}
|
|
150
|
+
gen code_insee_commune = trim(DEPARTEMENT) + trim(COMMUNE)
|
|
151
|
+
|
|
152
|
+
gen taux_com = THCOMMUNETAUXNET/100
|
|
153
|
+
gen taux_epci = THINTERCOMMUNALITETAUXAPP/100
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
gen valeur_locative_moyenne_com = THVLMOYENNEUTILISEEPOUR
|
|
157
|
+
gen valeur_locative_moyenne_epci = IG
|
|
158
|
+
|
|
159
|
+
* Pour certaines intercom, il n'y a pas de quotité ajustée mais seulement une quotité simple. Surement due aux interco créées après 2010 (qui est l'année du transfert de la TH départementale justifiant cet ajustement). Donc, si la valeur ajustée est nulle, on prend la quotité simple
|
|
160
|
+
gen abt_general_base_com = cond(IR~=0,IR,IP)
|
|
161
|
+
gen abt_general_base_epci = cond(IS~=0,IS,IQ)
|
|
162
|
+
gen abt_pac_1_2_com = cond(THQUOTITEDESABATTEMENTSAJ~=0,THQUOTITEDESABATTEMENTSAJ,THQUOTITEDESABATTEMENTSAVA)
|
|
163
|
+
gen abt_pac_1_2_epci = cond(THQUOTITEDESABATTEMENTSAJU~=0,THQUOTITEDESABATTEMENTSAJU,II)
|
|
164
|
+
gen abt_pac_3pl_com = cond(IN~=0,IN,IL)
|
|
165
|
+
gen abt_pac_3pl_epci = cond(IO~=0,IO,IM)
|
|
166
|
+
gen abt_condition_modeste_com = cond(IV~=0,IV,IT)
|
|
167
|
+
gen abt_condition_modeste_epci = cond(IW~=0,IW,IU)
|
|
168
|
+
|
|
169
|
+
keep code_insee_commune taux_* valeur_locative_moyenne_* abt_*
|
|
170
|
+
foreach var of varlist taux_* valeur_locative_moyenne_* abt_* {
|
|
171
|
+
replace `var' = 0 if `var'==.
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
sort code_insee_commune
|
|
175
|
+
outsheet code_insee_commune taux_* valeur_locative_moyenne_* abt_* using "${export_2022}.csv", comma replace
|
|
@@ -19,10 +19,10 @@ class ppa_eligibilite(Variable):
|
|
|
19
19
|
return condition_age
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
class
|
|
22
|
+
class ppa_plancher_revenu_activite_apprenant(Variable):
|
|
23
23
|
value_type = float
|
|
24
24
|
entity = Individu
|
|
25
|
-
label = "Plancher des revenus d'activité pour être éligible à la PPA en tant qu'étudiant"
|
|
25
|
+
label = "Plancher des revenus d'activité pour être éligible à la PPA en tant qu'apprenant (étudiant/stagiaire ou apprenti)"
|
|
26
26
|
definition_period = MONTH
|
|
27
27
|
set_input = set_input_divide_by_period
|
|
28
28
|
|
|
@@ -36,7 +36,7 @@ class ppa_plancher_revenu_activite_etudiant(Variable):
|
|
|
36
36
|
)
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
class
|
|
39
|
+
class ppa_eligibilite_apprenants(Variable):
|
|
40
40
|
value_type = bool
|
|
41
41
|
entity = Famille
|
|
42
42
|
label = 'Eligibilité à la PPA (condition sur tout le trimestre)'
|
|
@@ -52,8 +52,8 @@ class ppa_eligibilite_etudiants(Variable):
|
|
|
52
52
|
def formula(famille, period, parameters):
|
|
53
53
|
ppa_majoree_eligibilite = famille('rsa_majore_eligibilite', period)
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
apprenant_i = famille.members('etudiant', period) + famille.members('stagiaire', period) + famille.members('apprenti', period)
|
|
56
|
+
plancher_apprenant = famille.members('ppa_plancher_revenu_activite_apprenant', period)
|
|
57
57
|
|
|
58
58
|
def condition_ressource(period2, plancher):
|
|
59
59
|
revenu_activite = famille.members('ppa_revenu_activite_individu', period2)
|
|
@@ -63,21 +63,21 @@ class ppa_eligibilite_etudiants(Variable):
|
|
|
63
63
|
m_2 = period.offset(-2, 'month')
|
|
64
64
|
m_3 = period.offset(-3, 'month')
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
condition_ressource(m_1,
|
|
68
|
-
* condition_ressource(m_2,
|
|
69
|
-
* condition_ressource(m_3,
|
|
66
|
+
condition_apprenant_i = (
|
|
67
|
+
condition_ressource(m_1, plancher_apprenant)
|
|
68
|
+
* condition_ressource(m_2, plancher_apprenant)
|
|
69
|
+
* condition_ressource(m_3, plancher_apprenant)
|
|
70
70
|
)
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
not_(
|
|
72
|
+
condition_non_apprenant_i = (
|
|
73
|
+
not_(apprenant_i) * (
|
|
74
74
|
condition_ressource(m_1, 0)
|
|
75
75
|
+ condition_ressource(m_2, 0)
|
|
76
76
|
+ condition_ressource(m_3, 0)
|
|
77
77
|
)
|
|
78
78
|
)
|
|
79
79
|
|
|
80
|
-
condition_famille = famille.any(
|
|
80
|
+
condition_famille = famille.any(condition_non_apprenant_i + condition_apprenant_i, role = Famille.PARENT)
|
|
81
81
|
return ppa_majoree_eligibilite + condition_famille
|
|
82
82
|
|
|
83
83
|
|
|
@@ -585,8 +585,8 @@ def ppa_base_formula(famille, parameters, period, three_months_of_reference):
|
|
|
585
585
|
seuil_non_versement = parameters(period).prestations_sociales.solidarite_insertion.minima_sociaux.ppa.pa_m.montant_minimum_verse
|
|
586
586
|
# éligibilité étudiants
|
|
587
587
|
|
|
588
|
-
|
|
588
|
+
ppa_eligibilite_apprenants = famille('ppa_eligibilite_apprenants', period)
|
|
589
589
|
ppa = famille('ppa_fictive', three_months_of_reference, options = [ADD]) / 3
|
|
590
|
-
ppa = ppa *
|
|
590
|
+
ppa = ppa * ppa_eligibilite_apprenants * (ppa >= seuil_non_versement)
|
|
591
591
|
|
|
592
592
|
return ppa
|