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: improved location of activities and outputs analysis #7

Closed
wants to merge 25 commits into from

Conversation

MarieMcLaurent
Copy link

@MarieMcLaurent MarieMcLaurent commented Jul 29, 2024

This PR includes improvements in location of activities by using new data source and a better use of existing data. The PR also include results analysis used for validating our developments.

Parameters

exclude_no_employee

With this new parameter in data.sirene.cleaned file, it exclude all enterprises without employee ("NN", "00", and NaN values for "trancheEffectifsEtablissement").

home_location_source

In synthesis.locations.home.locations, with parameter home_location_source at "tiles" home location can be retrieved from centroid of INSEE tiles. Downloaded from INSEE, tiles are processed in a new script file data.tiles.raw in the same model as data.bpe.raw. Then tuiles_id column replace building_id column in return of synthesis.locations.home.locations and synthesis.spatial.home.locations. (No use of this column found in other files)

education_location_source

With this new parameter, person with education trips are send in education location corresponding to their age ranges : primary school for 0 to 10 years old, middle school for 11 to 14, high school for 15 to 17 and higher education for more than 18 years old. This parameter has 3 possible values: bpe, adresses & weighted. bpe is default value that represent actual education affectation without any restriction. weighted enable this affectation with given student count as weight for each type of education location. And adresses allows user to give education location with student count from custom geojson or geopackage file.

This new assignment is achieved thanks to two major changes in the processing of education trips: taking into account age ranges for OD choices, and distinguishing between different types of destination education locations.
For OD with AGEREV10 variable from MOBSCO data, age_range column is added to return of data.od.cleaned and data.od.weighted. This enables to have new weight sum in function of ["origin_id", "destination_id","age_range"] in place of ["origin_id", "destination_id"] for the new assignment with possibility of re-aggregation without age_range to find the current processing (as work).
Distinction of different education locations comes with changes in synthesis.locations.education, synthesis.population.spatial.primary.locations & synthesis.population.spatial.primary.candidates files with add of "TYPEQU" column. With this new column and use of age variable from person data-frame, the distinction between educational locations is made by dividing people, OD and locations into age range using EDUCATION_MAPPING dictionary. To compensate for the mismatch between locations and ODs, false locations are added in synthesis.locations.education for each location category missing from the communes.

Analysis output

documentation.flow_output

This is an output file for analyzing eqasim results in comparison with other user-supplied results. The analysis is presented as a difference in flow destination volume between these results on the INSEE 1km grid.
Theses outputs were used in order to validate our new code implementations.

Example of result:

image
Output contains one graph per age range x destination purpose. Age range are ["Yrs:0-10", "Yrs:11-14", "Yrs:15-18", "Yrs:18-25", "Yrs:25-50", "Yrs:50-65", "Yrs:65-75", "Yrs:75+"].

PR compatibility

This also included non filter of entd from other issue. eqasim-org#249

@vincent-leblond vincent-leblond changed the title Feat: new data source, parameters and analysis outputs feat: improved location of activities and outputs analysis Aug 8, 2024
vincent-leblond and others added 6 commits August 8, 2024 11:51
* feat: addition municipalities info to households and activities

* upadate tests & improve municipalities for house

* first try correction test & changelog

* fix: test gpkg hashes

---------

Co-authored-by: Marie Laurent <[email protected]>
@vincent-leblond vincent-leblond deleted the feat/new_params_categorisation branch November 15, 2024 11:00
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.

2 participants