-
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
Add geographic availability to services #30
Comments
The ODS PEP data comes with its own reference data, we're supposed to lookup in the following table using
|
The region reference data is spread in When unioned, the total number of rows is 2 179. Apparently, a given id_res (service) can appear several times in this table. That would mean a service can have several regions associated to it (to be confirmed). |
Number of matches between
The total number of |
With all the following tables mapped and joined to
|
Certain services are in many zone_diffusion:
585 services are available in more than one zone_diffusion. |
Final step is to join the data from the OFII (Office français de l'immigration et de l'intégration) ressource table. It adds zone_diffusion to only 4 services (table |
✅ OFII resource table is joined Number of rows with an empty |
Après avoir fait la jointure avec les données INSEE COG 2023, les communes restent sans libellé ( 28093 La requête : SELECT DISTINCT zone_diffusion_code, zone_diffusion_type, zone_diffusion_nom FROM public_intermediate.int_odspep__services
WHERE (zone_diffusion_type = 'Département'
OR zone_diffusion_type = 'Région'
OR zone_diffusion_type = 'Commune')
AND zone_diffusion_nom is NULL La requête retourne également les départements 1 et 7, mais je pense qu'il s'agit d'un bug de padding de zéros dans les données sources. |
in order to have unique id in aggregate_ressource table #30
* feature(pipeline): add odspep mapping for services #27 * feature(pipeline): add zone_diffusion to odspep mapping (only dep and reg) #27 * feature(pipeline): add zone_diffusion to odspep mapping (only com and bas) #27 * feature(pipeline): add zone_diffusion to odspep mapping (only com and bas) #27 * feature(pipeline): add zone_diffusion to odspep mapping (dir ofii) #27 * chore(lint): order select statements in ascending complexity * doc(dbt): add table documentation in _odspep__models.yml Co-authored-by: vmttn <taq@protonmail.ch> * docs(dbt): rephrase table description Co-authored-by: vmttn <taq@protonmail.ch> * chore(odspep): use double quotes when renaming columns (vs. transformations) Co-authored-by: vmttn <taq@protonmail.ch> * feat(odspep): add surrogate key to *_ressource data in order to have unique id in aggregate_ressource table #30 * feat(odspep): test id uniqueness in int services and int aggregated_ressource #30 * feat(odspep): enable unique service id using unique zone code #30 * fix(odspep): unique ressource and service id (dbt tested) #30 * feat(odspep): disabled dedup structures, removed aggr ressource id #30 * chore(odspep): renamed aggregated_ressource => zones_diffusion #30 * fix(odspep): readded odspep structures to int__structures (not deduplicated) * chore(odspep): cleanup * feat(odspep): basic dedup of structures id_res
ODS PEP
RES_PARTENARIALE
table has aPERIMETRE_GEO_RSP
column that indicates the range of the availability of the service. From the documentation:Problem: the
RES_PARTENARIALE
doesn't mention directly the place that would map withzone_diffusion_code
(commune, département, etc.) andzone_diffusion_nom
, we must get it from the address of the structure.To do:
ADRESSE
via theRES_PARTENARIALE.ID_ADR
(in sources or intermediate?)PERIMETRE_GEO_RSP
The text was updated successfully, but these errors were encountered: