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

feat: support for any EMC2 HTS #292

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

LucasJavaudin
Copy link

Here is the code I wrote to use any EMC2 household travel survey (2018+) in the pipeline.

I have tested the code with the HTS for Brest and Chambéry. Further testing with other HTS might be required because I found a few things that are not well standardized:

  • The name of the filename (shapefile or other format) with the "Zones fines" geospatial data is not standardized.
  • The surveys do not have all the possible mode codes so the codes in MODES_MAP (data/hts/cleaned.py) might be incomplete.
  • The columns used to identify the persons can vary (e.g., the ZFM column does not always match exactly with the ZF column in the geospatial data).

I also slightly changed the README and added a documentation file to explain how to use the pipeline for any region.

I hope this can be useful!

@vincent-leblond
Copy link
Contributor

This is interesting as we (Tellae) are currently, but almost finished, connecting EQASIM to the last EMC² of Vendée. @MarieMcLaurent is doing this.
I think that we will finish with our implementation and then test your code on the EMC² of Vendée.

@LucasJavaudin
Copy link
Author

Yes testing this with the EMC2 of Vendée would be great!

I forgot to mention that my implementation is based on the Lyon implementation (ADISP). Only few changes are required to make it compatible with both EMC2 I tested.

@sebhoerl
Copy link
Contributor

And here is the branch that contains an EMC2 implementation for Gironde:
https://github.com/eqasim-org/ile-de-france/tree/emc2

@sebhoerl
Copy link
Contributor

Let's see if they are 1:1 compatible. If not, I would propose to go, for the time being, with the existing pattern, like having a package ´emc2_gironde´, one ´emc2_vendee´ (if your two are 100% compatible, we can also just delegate the code from one to the other).

For the documentation:

This will make the pipeline filter all data sets for the departments noted in the list

This is intentionally not the case for the HTS (because we don't want to filter the ENTD for a department where we only have very few observations), maybe it would be good to clarify this there.

@LucasJavaudin
Copy link
Author

This will make the pipeline filter all data sets for the departments noted in the list

This is intentionally not the case for the HTS (because we don't want to filter the ENTD for a department where we only have very few observations), maybe it would be good to clarify this there.

I tried to clarify that in the last commit.

@LucasJavaudin
Copy link
Author

After quickly comparing with the EMC2 implementation of Gironde, I identified that:

  • The zone shapefile of Gironde would not be correctly detected by this PR (it is expected to be in Doc/SIG but it seems to be in Spatial; filename is fine though).
  • The mode code 62 in MODES_MAP is not defined in this PR but seems to appear in the Gironde data.
  • Both implementations use different ids to merge households with persons and zones.

@MarieMcLaurent
Copy link
Contributor

I've compare this implementation with the one we used for the last EMC² of Vendée.
Since we are working with txt files, our implementation is closer to EDGT 44 than Lyon. So unfortunately it wouldn't be compatible to be tested with this Standard EMC² HTS pipeline mostly for loading raw data.
But for the other stage, it could be interesting to have a standard pipeline if possible as it seems to be the part most compatible for most of HTS and specially EMC²s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants