with_mock() fromtestthat withwith_mocked_bindings() inall test cases (closes#174).actions/upload-artifact@v4, fixing a deprecationissue.isoline()androute() requests via thespeed_limitparameter. This sets&pedestrian[speed]=<LIMIT>for pedestrian mode and&vehicle[speedCap]=<LIMIT> for vehicle-basedmodes in API requests (refs#175).isoline() routing byenabling"bicycle","scooter","taxi","bus", and"privateBus",in line with newly available API options."pedestrian" inisoline() androute() functions (closes#167).route() to 7 requests persecond (RPS). Although HERE’s documentation specifies a 10 RPS limit, ithas been lowered to 5 RPS to avoid frequent 429 “Too Many Requests”errors.Please note that there are breaking changes introduced in this majorversion release for theweather(),flow(), andincidents() functions. Be sure to review the updateddocumentation to understand how these changes may affect your usage.
flow() andincident() requests (closes#158)weather().sf,data.frames, the inputfor points and areas of interest now also allows forsfcgeometry columns.aoi from the country border of Switzerland to the districtsof Zurich. This change was necessary because theflow() andincident() requests have a maximum allowed width and heightof 1 degree for the bounding box of the input AOIs.intermodal_route().snowFall column to numeric in weather observationrequest.defunct.R anddeprecated.Rto avoid NOTE (closes#162).R-CMD-check.yamlandpkgdown.yaml."scooter","taxi","bus","privateBus" inroute()androute_matrix()."car","truck","taxi" and"bus" inroute(). The new boolean parametervignettesdefines if vignettes should be in inlcuded in the total toll cost ofroutes (closes#151).set_currency() to allow changing the currency usedin toll requests to a currency code compliant to ISO 4217. The defaultcurrency is the current system locale setting. If the monetaryformatting category"LC_MONETARY" of the C locale is notset,"USD" is set as default.aggregate = FALSE as default inisoline() (closes#153).weather(), due toStatus 429; Too Many Requests;."visibility" and"snowCover" to numeric inweather(..., product = "observation"), as they contain nonnumeric character values (NAs introduced by coercion).route(..., arrival = TRUE) works.sapply is not type safe, replace its use withvapply(..., FUN.VALUE = type).master and releases are tagged after CRAN has accepted thepackage submission, which triggers the documentation build.isoline(..., traffic=FALSE) (closes#147)..connection_summary to avoid error inCPL_geos_union (set_freemium topic to index inpkgdown.HERE_RPS toHERE_FREEMIUM, and the functionhereR::set_rate_limit() tohereR::set_freemium(). Use theHERE_FREEMIUMenvironment variable to determine a plan-specific size of sub-matricesin thehereR::route_matrix() function (hereR::set_rate_limit() (closes#137).geocode()(closes#136).connection() (closes#130).route_matrix(). Removed query optimization becauseswitching the IDs results in reversed route information (closes#129).optimize parameter to chose from “balanced”,“quality” and “performance” inisoline() (closes#119).route(),route_matrix() andisoline().hereR/<version> R/<version> (<platform>).set_rate_limit(FALSE).isoline() now handles multipart polygons(MULTIPOLYGON) if received by the API (closes#121).route() (closes#117).tyler::tidyverse_style()to format the package.sfc class of the geometry column whenthere is only one geometry/row in adata.table (closes#111).queryScore ingeocode() results asscore column (closes#109).sf::st_unioncall inconnection(..., summary = TRUE).route(),intermodal_route() andconnection().route_matrix() fromRouting APIv7.2 (calculatematrix) toMatrix Routing APIv8 (see#87).isoline() fromRouting API v7.2(calculateisoline) toIsoline Routing API v8 (see#87).route() fromRouting API v7.2(calculateroute) toRouting API v8, which brings theelevation to the route geometries (closes#87).Note: Currently arrival time is not yet supported.geocode() with theupdated API v7.2 as it did with the previous API v6 (closes#98).mode andtype inroute(),route_matrix() andisoline(), usetransport_mode androuting_mode instead.connection() andintermodal_route() (closes#94)." " to a space pipe combination" | "(closes#102).geocode(). The alternative locations are ranked accordingto the order from the Geocoder API (closes#83 and#81).& in front of theapiKey argument (closes#73 and#74).geocode() fromv6.2 to v7 (closes#52).Note: The argumentautocomplete is defunctand the argumentaddresses is deprecated, useaddress instead.geocode() to position coordinates (display position) andreturn access coordinates (navigation position) as additional column inwell-known text format (closes#53).geocode() andreverse_geocode() independent of the input address level(closes#58).reverse_geocode()from v6.2 to v7.Note: The argumentlandmarks is defunct.autocomplete() isdefunct, please useautosuggest().connection()andstation() from v3 to v8 (closes#62).Note: Now the geometries (LINESTRING) of the pedestriansections are also included in the public transport routes returned byconnection().set_proxy() andunset_proxy(). Usea global proxy configuration for R in~/.Renvironinstead.intermodal_route()from Berlin to Switzerland, as the service is now also availablethere.sf argument togeocode() function.IfTRUE, the default, an {sf} object is returned, ifFALSE a data.frame withlng andlat columns. (intermodal_route() adds support for requesting intermodalroutes between given pairs of locations.set_verbose() function to define (for the currentR session) if thehereR package should messageinformation about the number of requests sent and data received (default=FALSE).st_make_valid(), butsf does. Thereforelwgeom is moved from the package dependencies to thesuggestions (see#38).traffic() function, which hasbeen replaced by the functionsflow() andincident().route_matrix() (see#30).origin anddestination arenow accepted as input inroute_matrix() (see#31).flow() andincident() to access traffic flow and incidents from theTraffic API. Deprecated thetraffic() function.set_auth() andunset_auth() are defunct and replaced byset_key() andunset_key() (see#23)..Deprecated() was skipped because the API endpoints havealso changed. After updating to a version greater than 0.2.1theauthentication must be adjusted.traffic(..., product = "flow"). Now it is possible to onlyretrieve flow information of severe congestion with a jam factor greaterthanmin_jam_factor, which speeds up requests.connection() implements requesting the most efficient andrelevant transit connections between given pairs of locations.station() retrieves nearby public transit stationswith corresponding line information.start parameter toorigin and unified the utilization of thedatetime andarrival parameters inroute(),route_matrix(),isoline() andconnection().c("POSIXct", "POSIXt") inputs for the requests (mostlydeparture) are converted to UTC using.encode_datetime() and the responses are parsed andreturned in the input timezone (or if missing:Sys.timezone()) using.parse_datetime() (see#28).@import sf to the package documentation to ensuresf objects are handled correctly.departure andarrival datetimecolumn to the return value ofroute(),route_matrix() andisoline().data.table object type from function returnvalues. New: Puredata.frame orsf, data.framebecause this integrates better with other packages (e.g. theoverline2() function from thestplanrpackage).traffic(): Clarified thatfrom_dtandto_dt have no effect on the traffic flow(product = "flow"). Traffic flow is always real-time.Detailed documentation of the variables in the return value.testthat.id column to the output ofgeocode() and removed the id orderedrow.namesin order to be consistent with other functions of the package. Using theid column the addresses to geocode can be joined to thecoordinates after geocoding (see#9).id column also toautocomplete(),reverse_geocode(),route(),isoline(),traffic() andweather(). Using theid column the result canbe joined to the input..get_content(). Theid column is still incorrect order, even if there are failing requests in a function call(see#17).rownames() <- NULL to all functions beforereturning the result.city column in the returned object ofweather() tostation, as it stands for thename of the nearest meteorological station.geocode(): In the case of empty responses therow names match the index of the geocoded addresses. Improved inputchecks. Option to use autocomplete by settingautocomplete = TRUE.autocomplete() allows autocompleting addresses.reverse_geocode() implements reverse geocoding POIs inorder to retrieve suggestions for addresses or landmarks.First release of thehereR package, ansf-based interface to theHERE RESTAPIs. The packages binds to the following HERE APIs:
Locations and routes are returned assf objects andtables asdata.table objects.