Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

route_bikecitizens

Get a route from the BikeCitizens web service


Description

See bikecitizens.net for an interactive version of the routing engine used by BikeCitizens.

Usage

route_bikecitizens(
  from = NULL,
  to = NULL,
  base_url = "https://map.bikecitizens.net/api/v1/locations/route.json",
  cccode = "gb-leeds",
  routing_profile = "balanced",
  bike_profile = "citybike",
  from_lat = 53.8265,
  from_lon = -1.576195,
  to_lat = 53.80025,
  to_lon = -1.51577
)

Arguments

from

A numeric vector representing the start point

to

A numeric vector representing the end point

base_url

The base URL for the routes

cccode

The city code for the routes

routing_profile

What type of routing to use?

bike_profile

What type of bike?

from_lat

Latitude of origin

from_lon

Longitude of origin

to_lat

Latitude of destination

to_lon

Longitude of destination

Examples

route_bikecitizens()
ldf <- od_coords(stplanr::od_data_lines[2, ])
r <- route_bikecitizens(ldf)
plot(r)

stplanr

Sustainable Transport Planning

v0.8.2
MIT + file LICENSE
Authors
Robin Lovelace [aut, cre] (<https://orcid.org/0000-0001-5679-6536>), Richard Ellison [aut], Malcolm Morgan [aut] (<https://orcid.org/0000-0002-9488-9183>), Barry Rowlingson [ctb], Nick Bearman [ctb], Nikolai Berkoff [ctb], Scott Chamberlain [rev] (Scott reviewed the package for rOpenSci, see https://github.com/ropensci/onboarding/issues/10), Mark Padgham [ctb], Andrea Gilardi [ctb] (<https://orcid.org/0000-0002-9424-7439>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.