Library for downloading and processing Spanish mobility data from MITMA
Project description
pySpainMobility
A Python package to access, download and starndardise
Mobility patterns play a critical role in a wide range of societal challenges, from epidemic modeling and emergency response to transportation planning and regional development. Yet, access to high-quality, timely, and openly available mobility data remains limited. In response, the Spanish Ministry of Transportation and Sustainable Mobility has released daily mobility datasets based on anonymized mobile phone data, covering districts, municipalities, and greater urban areas from February 2020 to June 2021 (version 1) and again from January 2022 onward (version 2). pySpainMobility is a Python package that simplifies access to these datasets and their associated spatial tessellations through a standardized, well-documented interface. By lowering the technical barrier to working with large-scale mobility data, the package enables reproducible analysis and supports applications across research, policy, and operational domains.
The full documentation of the library is available on the pySpainMobility website and a paper with some examples and further details is available on arXiv. If you are using the library or it content, please use this reference:
Beneduce, C., Gullón Muñoz-Repiso, T., Lepri, B., & Luca, M. (2025). pySpainMobility: a Python Package to Access and Manage Spanish Open Mobility Data
Bibtex:
@article{beneduce2025pyspainmobility,
title={pySpainMobility: a Python Package to Access and Manage Spanish Open Mobility Data},
author={Beneduce, Ciro and Gullón Muñoz-Repiso, Tania and Lepri, Bruno and Luca, Massimiliano},
year={2025}
}
Table of Content
Documentation
The documentation of pySpainMobility classes and functions is available at pyspainmobility.github.io/pySpainMobility
Installation
scikit-mobility for Python >= 3.8 and all it's dependencies are available from conda-forge and can be installed using
conda install -c conda-forge scikit-mobility.
Note that it is NOT recommended to install scikit-mobility from PyPI! If you're on Windows or Mac, many GeoPandas / scikit-mobility dependencies cannot be pip installed (for details see the corresponding notes in the GeoPandas documentation).
installation with pip (python >= 3.8 required)
-
Create an environment
venvpython3 -m venv venv -
Activate the environment
source venv/bin/activate -
Install
pySpainMobilitypip install pyspainmobility
installation with conda - miniconda
-
Create an environment
mobilityand install pipconda create -n mobility pip python=3.9 -
Activate
conda activate mobility -
Install
pySpainMobilityconda install -c conda-forge pySpainMobility
Examples
Examples can be found in the repository named Examples
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyspainmobility-1.0.2.tar.gz.
File metadata
- Download URL: pyspainmobility-1.0.2.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4ee4bd4671ac46741b50547dc065c10a05c4f292cd14be609f35f5a2aafc436
|
|
| MD5 |
8bce339a07c58461800ab89eaba0ed4c
|
|
| BLAKE2b-256 |
dfc82ef94d1b310bdaab0119d96ae97366475129518192e5fe8cbd23a8b45c12
|
File details
Details for the file pyspainmobility-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pyspainmobility-1.0.2-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6871f5a259680fab9f49f19e0b9deddb363c0389fa4788cae004de639c92d56
|
|
| MD5 |
e8b76a65e1dd88ff5d8fdd3cdf7ddcb7
|
|
| BLAKE2b-256 |
805f351eb95310b3ff2ec43b2a58ee552811af8312ba1ecc94c7150e0e297de5
|