This is the first release of TargomoR, which wraps the Targomo REST API for R users. It provides an interface familiar to users of leaflet.
getTargomo*()
to retrieve data from the API, and return as an sf
object (or list of such objects, in the case of routes)targomoOptions()
provides support for all main API settings, including variable travel times, rush hour modelling, modes of transport, up/downhill speed penalties and public transport time framesconfig
argument to getTargomo*()
allows for setting of proxy server and other configuration changes necessary for using package httrtimeout
argument to getTargomo*()
allows for extending request timeoutverbose
and progress
arguments for debuggingdrawTargomo*()
to add the data to a leaflet map, using customisable drawing methods*DrawOptions()
function allow for easy customisation of visuals, including changing colors, weights, opacitiesaddTargomo*()
to combine the API call and drawing, for use with %>%
onto leaflet mapssetTargomoVariables()
to write these environment variables, either locally or globally, to an .Renviron fileaddTargomoTiles()
to add Targomo basemaps to a leaflet mapgetTargomoCapabilities()
returns list of default and min/max settings for API key and region (with custom print method for nicer viewing)addTargomoAttribution()
adds an iframe to a leaflet map, adding an attribution (required by Targomo terms of use)