mobility-metrics

Individual mobility metrics

https://github.com/irmlma/mobility-metrics

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.2%) to scientific vocabulary

Keywords

individual-human-mobility mobility-metrics python
Last synced: 6 months ago · JSON representation ·

Repository

Individual mobility metrics

Basic Info
Statistics
  • Stars: 0
  • Watchers: 4
  • Forks: 1
  • Open Issues: 0
  • Releases: 1
Topics
individual-human-mobility mobility-metrics python
Created over 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

Individual mobility metrics

arXiv

Requirements, dependencies, and installation

This code has been tested on

  • Python 3.10, trackintel 1.2.2, geopandas 0.14.0

To create a virtual environment and install the required dependencies, please run the following: shell git clone https://github.com/irmlma/mobility-metrics.git cd mobility-metrics conda env create -f environment.yml conda activate metrics in your working folder. You can then install the package in edit mode using: pip install -e .

Evaluate mobility behavior using mobility metrics

Dataset distribution plots will be shown after metric calculation, and stored in the .\data\output folder (will be created if not existing). Input data of location visit sequences should be stored in the .\data\input folder. We implement basic mobility metrics as follows:

Basic metrics

Run python mobmetric/scripts/run_metrics.py for examples of calculating basic mobility metrics. The metric can be specified with the input arguement metric, accepting one of the arguements [rg, locf, jump,wait]: - Location visitation frquency. - Radius of gyration. Radius of gyration calculation receives the following parameter: - method of [duration, count]. count calculates with visitation frequency of locations, and duration calculates by additionally weighting the locations by their activity duration. - Jump length. Distance of moving between consecutive locations. - Wait time. Time of waiting between consecutive locations.

Entropy

  • Random Entropy
  • Uncorrelated Entropy
  • Real Entropy Run python mobmetric/scripts/run_entropy.py for examples of calculating entropy for location traces.

Mobility motifs

Run python mobmetric/scripts/run_motifs.py for examples of calculating mobility motifs. Motifs calculation receives the following parameter: - proportion_filter default 0.005. Filter to control how frequent a pattern could be considered a motifs, e.g., 0.005 means patterns occuring more than 0.5% of all the patterns are considered motifs. - time_format of [absolute, relative], default relative. Specify whether the input dataset is in absolute time format (e.g., time available as columns started_at and finished_at) or in relative time format (e.g., time available as columns started_at and duration) (obtained directly from mobility simulation).

TODO:

None

Citation

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

shell @misc{hong_revealing_2023, title={Revealing behavioral impact on mobility prediction networks through causal interventions}, author={Hong, Ye and Xin, Yanan and Dirmeier, Simon and Perez-Cruz, Fernando and Raubal, Martin}, publisher={arXiv}, year={2023}, url = {https://arxiv.org/abs/2311.11749}, doi = {10.48550/arXiv.2311.11749}, }

Contact

If you have any questions, open an issue or let me know: - Ye Hong {hongy@ethz.ch}

Owner

  • Name: Interpretable and robust machine learning for mobility analysis
  • Login: irmlma
  • Kind: organization
  • Location: Switzerland

Citation (CITATION.cff)

cff-version: 1.2.0
title: Mobility metrics
message: >-
  If you use this software, please cite it using the
  metadata from this file.
authors:
- family-names: Hong
  given-names: Ye
  orcid: 'https://orcid.org/0000-0002-8996-3748'
type: software
version: 0.0.1
date-released: 2024-06-13
preferred-citation:
  type: generic
  authors:
  - family-names: Hong
    given-names: Ye
    orcid: 'https://orcid.org/0000-0002-8996-3748'
  - family-names: Xin
    given-names: Yanan
    orcid: 'https://orcid.org/0000-0003-3866-821X'
  - family-names: Dirmeier
    given-names: Simon
    orcid: 'https://orcid.org/0000-0001-9795-3550'
  - family-names: Perez-Cruz
    given-names: Fernando
    orcid: 'https://orcid.org/0000-0001-8996-5076'
  - family-names: Raubal
    given-names: Martin
    orcid: 'https://orcid.org/0000-0001-5951-6835'
  doi: "10.48550/arXiv.2311.11749"
  publisher: "arXiv"
  title: "Revealing behavioral impact on mobility prediction networks through causal interventions"
  year: 2024

GitHub Events

Total
  • Push event: 1
  • Fork event: 1
Last Year
  • Push event: 1
  • Fork event: 1