Overview

mobts is a Python package for working with mobility time series data.

It is mainly aimed for count data collected from urban mobility sensors, such as bicycle counters, traffic counters, or similar counting systems.

The multi-stage pipeline

The package currently focuses on two main tasks:

  1. Preprocessing - prepares raw data for analysis: standardizing the format, detecting suspicious or unreliable observations (measurement errors, sensor dropouts, implausible spikes), and replacing them with NaN.

  2. Imputation - fills in missing values, whether they were already missing or were just flagged by preprocessing, using time-series and donor-based estimation methods.

Running preprocessing before imputation isn’t required, but it’s recommended: separating a “true zero” observation from a “the sensor was broken” observation gives imputation a cleaner time-series to work with.

Why mobts

Raw mobility counter data is rarely clean. Common problems include:

  • missing observations

  • suspicious zero values

  • sensor failures

  • extreme, implausible values

mobts provides tools to detect these issues and produce a complete, reliable time series from imperfect raw data.

Where to go next