mirror of
https://github.com/LucasJavaudin/intermodality-analysis.git
synced 2026-02-27 10:32:29 +00:00
Analysis of intermodality trips by aggregating mobility surveys
- Python 98.7%
- R 1.3%
| docs | ||
| output | ||
| R | ||
| src/intermodality_analysis | ||
| .gitignore | ||
| .python-version | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
Aggregating Mobility Surveys to Understand Intermodality: Evidence from 78 French Surveys
This repository contains the code I use to analyze intermodality trips by aggregating French mobility surveys.
The MobiSurvStd library is used to standardize the mobility surveys.
Requirements
- Python environment with the packages listed in
pyproject.toml(I recommend using uv) - R with the libraries
arrowandicarus - A set of mobility surveys standardized with MobiSurvStd (the 78 surveys that I use are not open-data)
- INSEE data on the municipalities' density level (for survey re-weighting)
- INSEE data on the census (for survey re-weighting)
- A file with the location of public-transit stops in France with column
stop_name,slug(AOM code),modes(list of modes served by the stop), andgeometry. This file is only used for the last part of the code. Contact me if you need it. - LaTeX (to generate the paper PDF)
- Typst (to generate the poster)
How to run
- Go through all the Python files and modify the global configuration variables when needed. All
theses configuration variables are in uppercase. The main configuration variables are in
main.py,weighting.py, andmpl.py. They are used to specify the path for the input and output files and to configure the language, size, format, labels, etc. of the graphs. - Run the main script
main.pywith Python. For example, if you useuv, useuv run python src/intermodality_analysis/main.py. - You can access the result values in
output/results.json(default path) and the generated graphs inoutput/paper_graphs(for paper) oroutput/poster_graphs(for poster). - (Optional) To generate the paper PDF, run LaTeX on the file
docs/wctr/wctr_javaudin.texto PDF. Note that the result values need to be manually changed. - (Optional) To generate the poster PDF, run Typst on the file
docs/poster/intermodality_poster.typ. From the main directory:typst compile docs/poster/main.typ --root .. Note that the result values are automatically updated from the values inoutput/results.json.
License
The Python and R codes are licensed under the MIT license. Feel free to modify and redistribute them for your cool projects with MobiSurvStd!
The LaTeX and Typst files are copyrighted and all rights are reserved. You may NOT use, copy, modify, or distribute this code without my explicit permission.