Skip to content

[JTRG] Geospatial context importance for travel mode detection

License

Notifications You must be signed in to change notification settings

mie-lab/mode_detect

Repository files navigation

Travel mode detection

This repository represents the implementation of the paper:

Ye Hong, Emanuel Stüdeli, Martin Raubal
IKG, ETH Zurich

flowchart

Requirements and dependencies

This code has been tested on

  • Python 3.10.9, Geopandas 0.12.2, trackintel 1.1.13, shap 0.41.0, scikit-learn 1.2.2

To create a virtual environment and install the required dependencies, please run the following:

    git clone https://github.com/hong2223/mode_detect
    cd mode-detect
    conda env create -f environment.yml
    conda activate mode-detect

in your working folder.

Inputs and Parameters

Require stage data with validated travel mode labels and LineString geometries as input. You can check 0_load\import_data.py for reading data from the PostGIS database and the corresponding data format. In addition, the processing scripts require the following input data and parameters:

  • 1_preprocess: staypoints data for calculating user tracking quality; area shapefile for geographical filtering; stages quality parameters (tracking, length, speed for each mode, etc.) for quality filtering.
  • 2_feature_extraction: geospatial context data (from OSM, Swiss Map Vector 25, or any other open-source data provider).
  • 3_rf_importance: search space for hyper-parameter search.

intermediate files will be stored in ./data/ folder. Figures generated by the scripts will be stored in ./fig/ folder.

Citation

If you find this code useful for your work or use it in your project, please consider citing:

@article{hong_evaluating_2023,
	title     = {Evaluating geospatial context information for travel mode detection},
	volume    = {113},
	doi       = {10.1016/j.jtrangeo.2023.103736},
	journal   = {Journal of Transport Geography},
	author    = {Hong, Ye and Stüdeli, Emanuel and Raubal, Martin},
	year      = {2023},
	keywords  = {Travel mode detection, Random forest, Feature attribution, Geospatial context information, GNSS tracking data},
	pages     = {103736},
}

Contact

If you have any questions, please open an issue or let me know:

About

[JTRG] Geospatial context importance for travel mode detection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published