Map-based stated preference surveys for transport research

Respondents show on a map where they travel. CombPath turns this into choice tasks with real travel times from OpenStreetMap and timetable data, following an efficient experimental design. Answers go straight into Apollo, and the estimated model on into agent-based simulations such as MATSim.

Try the demo Source code (soon on GitHub)

How a survey works

The heavy computing happens beforehand, offline. The web survey only looks values up, so it is fast, also on phones, and runs on a small server.

1

Describe a trip

Origin and destination via place search or a click on the map. Only the H3 cell is stored, never the address.

2

Choose

Several situations with car, public transport, bike, on-demand bus or your own modes. Times and costs vary around the real values of the trip.

3

Estimate and simulate

Export in Apollo's wide format with availabilities and reference values. The estimated model can be handed to MATSim as PMML.

How it all fits together

Open data and tools, combined into a study package. Green: data, blue: preparation, orange: survey, purple: model and simulation.

OPEN DATA PREPARATION (OFFLINE) SURVEY (OWN SERVER) MODEL OpenStreetMapRoads, paths, places Timetables (GTFS)DELFI via gtfs.de PopulationCensus 2022, 100 m grid Area typesRegioStaR (BMDV) Map tilesOpenFreeMap / OpenMapTiles H3 gridfiner in towns (Uber H3) Travel time matricesCar: OSRM · PT, bike, walk: R5 Place search and basemapfrom OSM, on your own server Experimental designR, spdesign (D-efficient, pivot) Study packageParquet matrices + YAMLinit · build-study.sh (Docker) RespondentsPhone or PC, panel link CombPathReact + MapLibre (map) FastAPI (pivot, storage)Caddy (HTTPS), SQLite no third-party requests ExportApollo CSV, one row per choice Apollo (R)MNL with covariates PMMLmodel exchange format MATSimmode choice (DMC) Congested travel timesback into the matrices

Features

Privacy by design

Locations only as H3 cells, panel IDs only as salted hashes, no IP logs, no cookies, no third-party requests: map and place search come from your own server.

Quick to set up

For a German district the district key is enough; any other area works with your own boundary and data. One script builds the study package in Docker, and the survey then runs on any small server.

Realistic choice tasks

Pivot design around the real travel times and costs of the trip, including fares, parking, access walks and on-demand time windows.

Configurable

Modes, attributes, questions, quotas and presentation (table or route cards) in YAML, no programming needed.

Panel ready

Panel ID and profile values from the link, redirects for complete, screenout and quota full, resume after interruption, embedding via iframe.

Open

Source code under AGPL-3.0, documentation and templates under CC BY 4.0. Self-hosting is free.

Example: Elbe-Elster district, Germany

The first study looks at how people in rural southern Brandenburg choose between car, ride-sharing, public transport, bike, on-demand bus and on-demand bus as a feeder to rail. Destinations reach Berlin, Dresden, Leipzig and Cottbus; public transport fares follow the regional VBB tariff with its real fare zones.

The demo lets you click through the survey yourself (in German). Demo answers are not analysed and are deleted regularly.

Choice task as a table with on-demand bus, public transport and car

Credits and licenses

CombPath stands on the shoulders of open data and software. Thanks to everyone who provides them.

ComponentUsed forLicense
OpenStreetMap contributorsRoad network, places, addressesODbL 1.0
OpenFreeMap, OpenMapTilesMap tiles (served locally)Data © OpenStreetMap (ODbL), schema © OpenMapTiles
DELFI e. V. via gtfs.deTimetables of all German operatorsCC BY 4.0
Federal and State Statistical Offices, Census 2022Population on a 100 m gridData licence Germany – attribution – 2.0
BMDV, regional statistical area typology (RegioStaR)Area types per municipalityData licence Germany – attribution – 2.0
VBB Berlin-Brandenburg transport associationFare zones (Elbe-Elster example)CC BY 4.0
H3 (Uber Technologies)Hexagonal gridApache-2.0
OSRMCar travel times and distancesBSD-2-Clause
R5 (Conveyal), r5pyPublic transport, bike and walk travel timesR5: MIT · r5py: GPL-3.0-or-later or MIT
pyosmium, GeoPandas, Shapely, pandas, Apache ArrowData preparationBSD or Apache-2.0
spdesign (Sandorf, Campbell)Experimental designCC BY-SA 4.0
Apollo (Hess, Palma)Choice model estimationGPL-2
MapLibre GL JS, React, h3-js, ViteSurvey in the browserBSD-3-Clause, MIT, Apache-2.0, MIT
FastAPI, UvicornSurvey serverMIT, BSD-3-Clause
CaddyWeb server, HTTPSApache-2.0
MATSim, Discrete Mode ChoiceAgent-based simulationGPL-2.0-or-later