MyNixOS website logo
Description

Interface Between R and the OpenStreetMap-Based Routing Service Valhalla.

An interface between R and the 'Valhalla' API. 'Valhalla' is a routing service based on 'OpenStreetMap' data. See <https://valhalla.github.io/valhalla/> for more information. This package enables the computation of routes, trips, isochrones and travel distances matrices (travel time and kilometer distance).

valh

CRAN R buildstatus codecov Project Status: Active – The project has reached a stable, usablestate and is being activelydeveloped.

Interface Between R and the OpenStreetMap-Based Routing Service Valhalla

Description

Valhalla is a routing service that is based on OpenStreetMap data. This package provides an interface to the Valhalla API from R. It allows you to query the Valhalla API for routes, isochrones, time-distance matrices, nearest point on the road network, and elevation data.

This package relies on the usage of a running Valhalla service (tested with v3.4.x-3.5.x of Valhalla).

Features

  • vl_route(): Get route between locations.
  • vl_matrix(): Get travel time matrices between points.
  • vl_locate(): Get the nearest point on the road network.
  • vl_elevation(): Get elevation data at given location(s).
  • vl_isochrone(): Get isochrone polygons.
  • vl_optimized_route(): Get optimized route between locations.
  • vl_status(): Get information on Valhalla service.

Installation

  • Development version from GitHub:
# install.packages("remotes")
remotes::install_github("riatelab/valh")

Motivation & Alternatives

The package is designed to provide an easy-to-use interface to the Valhalla routing service from R. Special care has been taken to support multiple input formats, and the package treats sf objects as first-class citizens in both input and output. Additionally, we have tried to maintain a minimal number of dependencies.

This package offers an API that closely resembles that of the osrm package which provides an R interface to the OSRM routing service.

Note that there are other packages that provide an interface to Valhalla API from R :

  • valhallr: This package is on CRAN, but only allows you to access to some Valhalla services (height, locate and optimized route are notably absent). In addition, it calls on many heavy dependencies to install, whereas valh is particularly light on dependencies. Finally, it doesn’t allow you to work directly with sf objects as input.

  • rvalhalla: This package is not on the CRAN, and while it provides access to various Valhalla services, it only does the heavy lifting needed to easily use the data for two of the services (route and sources_to_target). In addition, it doesn’t allow you to work directly with sf objects as input.

Community Guidelines

One can contribute to the package through pull requests and report issues or ask questions here. See the CONTRIBUTING.md file for detailed instructions.

Metadata

Version

0.1.0

License

Unknown

Platforms (76)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows