-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(pipeline) : Ensure the zone_diffusion_codes for DROM/COM #288
Conversation
@@ -15,7 +15,7 @@ departements AS ( | |||
), | |||
|
|||
-- TODO: Refactoring needed to be able to do geocoding per source and then use the result in the mapping | |||
services_with_zone_diffusion AS ( | |||
services_with_zone_diffusion_after_geocoding AS ( |
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.
NDA : Je le nomme comme ça car dans ce bloc, on s'attache à appliquer les codes et noms des zones de diffusion SUITE au geocoding (on considère qu'à cette étape, les codes INSEE sont mieux résolus et par conséquent que les zones de diffusion seront plus précises en les appliquant à partir des codes INSEE post-geocoding)
Vu avec @vmttn :
|
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.
+1 pour les tests à venir :)
pipeline/dbt/models/intermediate/int__union_services__enhanced.sql
Outdated
Show resolved
Hide resolved
a0588bf
to
ec38b53
Compare
Etude d'impact statistique:
|
ec38b53
to
a4f1a90
Compare
Vu avec @vmttn , on fait une exception pour ODSPEP et on fera un ticket supplémentaire plus tard pour rationaliser encore nos données d'adresse : mettre à 0 celles qui sont "mal" géocodées (en-dessous de 0.8) |
a95c124
to
35e63b2
Compare
35e63b2
to
0710b2d
Compare
There were cases where we did have the zone_diffusion_code set to "97" which can't be right, as it would mean that a given service coyuld be available across the oceans. Let's fix it and set the correct, 3-digit department number. This will also enable their search as we now (since the "new" communes) search for a match agains commune.departement, which can be 3 digits. There is also now a complete data validation that leaves the errors as a specific table in the public_dbt_test__audit schema.
d561014
to
e8ffb87
Compare
There were cases where we did have the zone_diffusion_code set to "97" which can't be right, as it would mean that a given service coyuld be available across the oceans.
Let's fix it and set the correct, 3-digit department number.
This will also enable their search as we now (since the "new" communes) search for a match agains commune.departement, which can be 3 digits.
I would love to add a data test for this, but not sure how useful that is. So far, CHECK_SERVICE_ERRORS() is only semantic but does not validate for instance that the zone_diffusion_code is a correct department number if the zone_diffusion_type is "department", and so on.
If we wanted to validate this, what should be the correct way to proceed?