API reference
Every public function and class in Fastkit-Mobility, grouped by module. Each module page opens with a table of its APIs (one line each, with a link to a worked example where one exists) followed by the full details: signature, parameters, return values and assumptions. To find a function by name, use the search box. To learn how to use the library, start with Learn.
Modules
| Module |
|---|
| Data structures Typed trajectory, hierarchy and flow wrappers. TrajDataFrame, Positionfixes |
| Preprocessing Filtering, segmentation, staypoints, H3 and OD preparation. filter, segment, stay_locations |
| Trajectory Interpolation, smoothing, shape clustering and comparison. interpolate, smooth |
| Tessellation Square, H3 and Voronoi tilers. TessellationTilers |
| Utilities Straight-line geographic distances. haversine |
| Network Road and rail graphs, routing, snapping and map matching. match_trajectory, build_road_graph |
| Integration Joins with points of interest and events. join_with_pois, join_with_events |
| Measures Individual, collective, contact-network and evaluation metrics. radius_of_gyration, jump_lengths |
| Fitting Truncated power law, visitation law and daily-location fits. fit_values_to_truncated_powerlaw |
| Models Mobility generation models. Gravity, SpatialEPR |
| Input/output Readers and writers for common trajectory formats. read, load_geolife_trajectories |
| Privacy Re-identification risk assessment for trajectories. location_risk |
| Data Bundled and downloadable datasets. load_dataset, load_geolife |
| Visualization Interactive ECharts views ( fastmob[vis]).fastmob.vis |
Start from your input
| You have | Start here |
|---|---|
| Raw GPS or check-in points | Data structures, then preprocessing |
| A cleaned trajectory | Trajectory and individual measures |
| Visits, stays, or trips | Collective measures |
| Coordinate pairs for straight-line distance | Haversine distance |
| A road/rail graph or GPS trace | Network |
| A model output to compare | Evaluation |
| Trajectories to assess for privacy risk | Privacy |
| A distribution to fit to a law | Fitting |
| Files on disk to read or write | Input/output |
| Synthetic trajectories or flows to generate | Models |
Column and backend conventions
Most APIs auto-detect datetime, lat, lng, and uid from common
names. Pass explicit *_col arguments when your schema differs. See
Columns and backends
for the supported workflow.
How the modules fit together