Welcome to mobilkit’s documentation!

mobilkit is a library for analyzing human mobility data in Python, leveraging on the Dask framework for faster, parallel computation.

The library is in continuos development and currently allows to:

  • Load and filter raw mobility data covering large spatial and temporal extensions.

  • Compute the user statistics (number of active days, number of positions recorded) and filter them accordingly to the analysis.

  • extract home and work locations of users based on a given tessellation.

  • compute the land use of a given urban region

  • characterize the displacement of people under different grouping (distance from an epicenter, socio-economic index, etc.) after a major event

Documentation

Besides this documentation, many example notebooks can be found in the original repo under the docs/examples folder.

Detailed notebooks with all the functionalities shown are found in examples/.

Collaborate with us

mobilkit is an active project and any contribution is welcome.

You are encouraged to report any issue or problem encountered while using the software or to seek for support.

If you would like to contribute or add functionalities to mobilkit, feel free to fork the project, open an issue and contact us.

Installation

Note

mobilkit will install a complete installation of Dask, so consider installing it in a virtualenv to connect to an existing dask cluster.

Note

You can try mobilkit without installing it on Binder, just click below

https://mybinder.org/badge_logo.svg
  1. Create an environment mobilkit

    python3 -m venv mobilkit
    
  2. Activate

    source mobilkit/bin/activate
    
  3. Update pip to latest version in the environment

    pip install --upgrade pip
    
  4. Install mobilkit

    pip install mobilkit
    
  5. OPTIONAL to use mobilkit on the jupyter notebook

    • Activate the virutalenv:

      source mobilkit/bin/activate
      
    • Install jupyter notebook:

      pip install jupyter
      
    • Run jupyter notebook

      jupyter notebook
      
    • (Optional) install the kernel with a specific name

      ipython kernel install --user --name=mobilkit_env
      

If you already have scikit-mobility installed, skip the environment creation and run these commands from the skmob anaconda environment.

mobilkit by default will only install core packages needed to run the main functions. There are three optional packages of dipendencies (the mobilkit[complete] installs everything):

  • [viz] will install contextily, needed to visualize map backgrounds in certain viz functions;

  • [doc] will install all the needed packages to build the docs;

  • [skmob] will install scikit-mobility as well.

Test the installation

> source activate mobilkit
(mobilkit) > python
>>> import mobilkit

Citing

If you use mobilkit please cite us:

Note

Enrico Ubaldi, Takahiro Yabe, Nicholas K. W. Jones, Maham Faisal Khan, Satish V. Ukkusuri, Riccardo Di Clemente and Emanuele Strano Mobilkit: A Python Toolkit for Urban Resilience and Disaster Risk Management Analytics using High Frequency Human Mobility Data, 2021, KDD 2021 Humanitarian Mapping Workshop, https://arxiv.org/abs/2107.14297

Bibtex:
@misc{ubaldi2021mobilkit,

title={Mobilkit: A Python Toolkit for Urban Resilience and Disaster Risk Management Analytics using High Frequency Human Mobility Data}, author={Enrico Ubaldi and Takahiro Yabe and Nicholas K. W. Jones and Maham Faisal Khan and Satish V. Ukkusuri and Riccardo Di Clemente and Emanuele Strano}, year={2021}, eprint={2107.14297}, primaryClass={cs.CY}, archivePrefix={arXiv}}

Credits and contacts

This code has been developed by Mindearth, the Global Facility for Disaster Reduction and Recovery (GFDRR) and Purdue University.

Funding was provided by the Spanish Fund for Latin America and the Caribbean (SFLAC) under the Disruptive Technologies for Development (DT4D) program.

The findings, interpretations, and conclusions expressed in this repository and in the example notebooks are entirely those of the authors. They do not necessarily represent the views of the International Bank for Reconstruction and Development/World Bank and its affiliated organizations, or those of the Executive Directors of the World Bank or the governments they represent.

The code is released under the MIT license (see the LICENSE file for details).

Contents:

Indices and tables