-
Notifications
You must be signed in to change notification settings - Fork 101
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
Ajoute le logement social #1008
Conversation
Un peu d'indulgence svp 👶 🐥 J'ai commencé par ajouter les variables :
Étant donné qu'on a juste besoin de connaître l'éligibilité, je ne vais peut-être pas ajouter le calcul de tous les plafonds. |
3e7ff58
to
441c609
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexsegura, j'ai commencé une revue. Je te laisse faire une passe et on en rediscute après.
# Gentilly, Issy-les-Moulineaux, Ivry-sur-Seine, Joinville-le-Pont, le Kremlin-Bicêtre, Les Lilas, Le Pré-Saint-Gervais, | ||
# Levallois-Perret, Malakoff, Montreuil, Montrouge, Neuilly-sur-Seine, Nogent-sur-Marne, Pantin, Puteaux, Saint-Cloud, | ||
# Saint-Denis, Saint-Mandé, Saint-Maurice, Saint-Ouen, Suresnes, Vanves, Vincennes | ||
paris_communes_limitrophes = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ca serait top que les code INSEE soient mis en ligne avec la commune correspondante. Genre :
'75100', # Paris
'93001', # Aubervilliers
# Levallois-Perret, Malakoff, Montreuil, Montrouge, Neuilly-sur-Seine, Nogent-sur-Marne, Pantin, Puteaux, Saint-Cloud, | ||
# Saint-Denis, Saint-Mandé, Saint-Maurice, Saint-Ouen, Suresnes, Vanves, Vincennes | ||
paris_communes_limitrophes = [ | ||
'75100', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le code INSEE de Paris est 75056 (https://geo.api.gouv.fr/communes?nom=Paris).
CategorieMenageLogementSocial.categorie_5, | ||
CategorieMenageLogementSocial.categorie_6, | ||
], | ||
default = CategorieMenageLogementSocial.categorie_1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment sont gérées les familles avec 15 personnes à charge ? 🙂
values: | ||
2016-12-22: | ||
reference: https://www.legifrance.gouv.fr/affichTexte.do;jsessionid=186AC8F0B7590C42DAA390BA6C89612B.tpdila11v_1?cidTexte=JORFTEXT000033681769&dateTexte=&oldAction=rechJO&categorieLien=id&idJO=JORFCONT000033680662 | ||
value: 11067 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il manque des sauts de ligne dans les fichiers de paramètres.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ne devrait-on pas mettre un .editorconfig
pour le projet ?
@guillett tu peux jeter un coup d'oeil à nouveau ? C'est mieux là. |
22c3e5a
to
519cefb
Compare
|
||
# Extraction du département | ||
# Exemple : 75056 → 75 | ||
departement = (depcom.astype(int) / 1000).astype(int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benjello do you have better implementation ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On peut diviser par 1000 et utiliser round aussi.
Mais au-delà de la formule qui finalement importe peu, on peut utiliser une petite fonction helper explicite genre departement_from_depcom
mais en français.
C'est plus clair mais cela rajoute de la complexité avec un helper ce qui peut aussi compliquer les liens sur le web.
Je n'ai pas d'avis tranché
# est au plus égale à cinquante-cinq ans constitue un jeune ménage | ||
# au sens du présent arrêté. | ||
age = famille.members('age', period) | ||
sum_age = famille.sum(age) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Une famille dont les deux parents ont 20 ans avec 5 enfants de 10 ans, est-elle un jeune ménage ?
|
||
return select( | ||
[ | ||
# Six personnes, ou une personne seule avec quatre personnes à charge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ce select
pourrait être simplifié et je trouve bizarre de commencer par la catégorie 6 plutôt que 1.
- Ajout de la variable zone_logement_social - Ajout de la variable logement_social_categorie_menage - Ajout de la variable logement_social_plafond_ressources - Ajout de la variable logement_social_eligible
* Multiple barèmes exist a subfolder ease additions in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est bon pour moi.
prestations/logement_social
.Nécessaire pour betagouv/aides-jeunes#431
Ces changements (effacez les lignes ne correspondant pas à votre cas) :