Fastkit-Mobility helps researchers turn location data into insights about how people move. Clean GPS traces, find stops and trips, measure travel patterns, and simulate mobility using familiar Python dataframes. Its Rust engine handles compute-intensive work while you work with pandas or Polars.
Get started · Explore the examples · API reference · Benchmarks
One day of GeoLife GPS data: grey points are GPS fixes, gold circles are detected stops (staypoints), and coloured lines show movement between them (triplegs). Follow the complete GeoLife example.
Install Fastkit-Mobility and pandas for this example (Python 3.9 or newer):
pip install fastmob pandasCalculate each person's radius of gyration: a measure, in kilometres, of how widely their observed locations spread around their centre of movement.
import pandas as pd
from fastmob import radius_of_gyration
df = pd.DataFrame({
"uid": ["alice"] * 3 + ["bob"] * 3,
"datetime": pd.to_datetime(["2020-01-01 08:00", "2020-01-01 09:00", "2020-01-01 10:00"] * 2),
"lat": [41.9, 42.0, 42.1, 40.7, 40.8, 41.0],
"lng": [12.5, 12.5, 12.6, -74.0, -74.0, -73.9],
})
print(radius_of_gyration(df)) uid radius_of_gyration
0 alice 9.878827
1 bob 14.423721
In this small example, Bob's observed locations are more spread out than Alice's. Explore more individual and collective measures.
- Clean and segment traces: filter noisy GPS data and separate movement from stops. Learn how.
- Find stops and recurring places: identify where people spend time and group repeated visits to locations. Learn how.
- Measure movement: study individual ranges and travel patterns, or flows across a population. Explore measures.
- Work with transport networks: route and match GPS traces to road and rail networks. Explore network analysis.
- Model mobility: generate synthetic trajectories or flows and compare models with observations. Explore models.
Fastkit-Mobility uses Rust for compute-intensive operations and supports pandas, Polars and other eager dataframes through Narwhals. Many measure names and signatures follow scikit-mobility.
Average execution time for five measures on approximately 4 million time-sorted Brightkite check-ins. Fastkit-Mobility uses pandas; the comparison is with scikit-mobility. Times are averages of three runs on an Intel Core i7-10700 with Python 3.12, and the chart uses a logarithmic scale. The scikit-mobility input contained 3,999,891 rows and the Fastkit-Mobility input 4,000,000. Results depend on the operation, data and environment. See the raw benchmark record and more comparisons.
For citing a specific software release, see the citation guide.
- Guides and tutorials · API reference · Release notes
- Contributing and development setup
- Report an issue: include package versions, dataframe backend, a minimal example, expected behavior and the full error.
For a fastmob release, set the version in fastmob-py/Cargo.toml, run the
release checks, and tag the tested commit fastmob-v<version> (for example,
fastmob-v0.3.4). Push that tag to trigger the wheel builds and PyPI release.
Tags named only v<version> do not trigger the fastmob release workflow.
Fastmob is actively developed. Please include versions, dataframe backend, a minimal reproducible input, expected behavior, and the full error when opening an issue.
If you use Fastkit-Mobility in research, please cite the NetMob 2026 paper:
@inproceedings{santos2026fastkit,
author = {Santos, Gustavo H. and Viana, Aline Carneiro and
Pappalardo, Luca and Silva, Thiago H.},
title = {Fastkit-Mobility: A High-Performance, DataFrame-Agnostic Library for Mobility Analysis},
booktitle = {NetMob 2026},
address = {Niter{\'o}i, Brazil},
year = {2026},
month = oct,
url = {https://inria.hal.science/hal-05755990}
}
