finds.dev← search

// the find

riatelab/osrm

★ 254 · R · GPL-3.0 · updated Mar 2026

Interface between R and the OpenStreetMap-based routing service OSRM

An R package that wraps the OSRM routing engine, giving R users access to travel time matrices, shortest routes, trip optimization (TSP), and isochrones as sf spatial objects. Published on CRAN and peer-reviewed in JOSS. Aimed at spatial analysts and researchers who already have R workflows and want real-world routing without leaving the R environment.

Returns results as sf objects, so the output drops straight into tidyverse/ggplot2/tmap workflows without conversion gymnastics. The isochrone implementation is non-trivial — it infers reachable polygons from a grid of osrmTable calls rather than just drawing radius circles, which gives genuinely road-network-aware shapes. Test suite uses serialized .rds fixtures to test internal input/output formatting without requiring a live OSRM server, which is the right call for CI. The demo data (Berlin pharmacies) is bundled in the package and exercises every function, making it easy to verify a working install.

Isochrones are approximated by sampling a grid and contouring — resolution is configurable but inherently a heuristic, not exact reachability polygons; users who need precision will hit this. The package depends on a running OSRM instance, and self-hosting one for a whole country is non-trivial (multi-GB RAM, hours of preprocessing); there's only a brief pointer to Docker docs, no opinionated guide. The public demo server has a hard 1 req/s cap with no retry or backoff logic built into the package, so any loop over the API functions will get throttled and fail silently unless the caller handles it. At 254 stars the community is small, meaning niche bugs can sit unaddressed for a long time.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →