Major changes
travel_time_matrix(), arrival_travel_time_matrix(), accessibility() and pareto_frontier() are 2 to 4 times faster, bicycle-only routing 1.3 to 2.8 times, and expanded_travel_time_matrix() 1.5 to 2.6 times. Public transport routing in these functions takes about as long as before.detailed_itineraries() with shortest_path = TRUE (the default) and no fare_structure now routes public transport with R5's RAPTOR algorithm, as travel_time_matrix() does, instead of McRAPTOR. It is 28 to 225 times faster on the Porto Alegre sample data, with the same output columns. See #603. Results can differ slightly:
time_window instead of at random seconds;max_walk_time;pickup_type / drop_off_type restrictions are respected;shortest_path = FALSE) and fares still use McRAPTOR, and a pair that RAPTOR cannot route falls back to McRAPTOR. Closed #464.seed argument in travel_time_matrix(), expanded_travel_time_matrix(), arrival_travel_time_matrix(), accessibility(), isochrone(), travel_time_surface() and pareto_frontier(). It makes the random departure offsets of frequency-based GTFS routes, and the departure times McRAPTOR samples within time_window, reproducible across runs and n_threads. The default seed = NULL keeps random draws. In expanded_travel_time_matrix() the trips of each minute are now numbered by total travel time, so arrival_travel_time_matrix() returns the fastest trip of the latest departure that arrives in time. Closes #593. See #597.transfer_time (with breakdown = TRUE) is now R5's transfer walking time, and waiting at the transfer stop is counted in wait_time;get_gtfs_errors() names some files without the .txt extension.Bug fixes
options(java.parameters = "-Xmx...") before library(r5r) was ignored since r5r 2.2.0. It takes effect again.fare_structure, pareto_frontier(), detailed_itineraries() with shortest_path = FALSE), almost every origin was routed at the same departure times within time_window. This was caused by an overflow in R5's random seed (conveyal/r5#1026). Each origin now gets its own reproducible sample, so results change slightly. Closes #601.accessibility() with the logistic, exponential and linear decay functions ignored trips longer than max(cutoffs), which underestimated accessibility. Only the step function now caps max_trip_duration at max(cutoffs).departure_datetime, since results depend on it. Without public transport, the current time is used. arrival_travel_time_matrix() requires arrival_datetime for all modes. Closed #486.pareto_frontier() now requires fare_structure and fare_cutoffs. Without fare_cutoffs it failed, and without fare_structure it ignored fares.ids raise an error in one-to-many functions. Repeated ids are still allowed in detailed_itineraries() with all_to_all = FALSE.max_fare without a fare_structure raises an error instead of being ignored.travel_time_matrix(), expanded_travel_time_matrix() and arrival_travel_time_matrix() swapped from_id and to_id with walk-only routing and no elevation data, both in memory (fewer origins than destinations, a regression in 2.4.0, #501) and in output_dir files (more origins than destinations).arrival_travel_time_matrix():
max_walk_time, max_bike_time or max_car_time below max_trip_duration, it searched the wrong departure window;expanded_travel_time_matrix() and arrival_travel_time_matrix() mixed up transit trips departing at 00:00:00 with street-only trips, and failed with walk-only routing and more than 5000 origins (#586).detailed_itineraries():
walk_speed;origins or destinations return an empty result instead of crashing.isochrone():
polygon_output = FALSE) assigned segments to the wrong band with unsorted cutoffs;id column, id is always character, and the st_centroid warning is gone.new_carspeeds, carspeed_scale, new_lts) left it active for the next call. Routing settings are now reset on exit, including on error.output_dir)
detailed_itineraries() file, whose geometry, osm_id_list and edge_id_list columns always contain commas.max_trip_duration are empty fields, as NA in memory, instead of 2147483647 (#586).detailed_itineraries() raises an error for repeated origin-destination pairs, which overwrote each other, and for ids that are not valid file names.Minor changes
GPL (>= 3) | MIT + file LICENSE.accessibility() accepts fractional opportunities instead of truncating them to integers. Missing values count as 0 with a warning, and infinite values raise an error.progress defaults to TRUE in all routing functions;isochrone() no longer ignores progress.verbose = TRUE.check_transit_availability() finds the operating dates, including calendar exceptions, when no dates are given.detailed_itineraries() are found faster and with less memory. With suboptimal_minutes > 0, the option numbers of two exactly tied itineraries can be swapped.max_walk_time, max_bike_time, max_car_time, max_trip_duration, time_window, percentiles, n_threads, max_rides, max_lts, draws_per_minute, cutoffs, suboptimal_minutes, and zoom in isochrone()) reject non-integer values instead of truncating them.max_car_time now caps car-only trips, not only the car legs of transit trips. Car-only trips can no longer end with a walk unbounded by max_walk_time, so 3% of car travel times on the Porto Alegre sample are 1 to 8 minutes longer, now consistent with isochrone().time_window with a fare_structure (e.g. 8 draws per minute in 10 minutes, or the default 5 in 150 minutes or more);time_window = 200 in pareto_frontier()).percentiles and cutoffs are sorted, and cutoffs are validated (whole numbers from 1 to 120, no duplicates). They used to crash inside R5 or duplicate rows.linear decay decay_value must be a whole number of minutes from 1 to 59.lon/lat now trigger a warning listing the affected ids, instead of being dropped silently.RuntimeException (#586).build_network() aborts with an informative message when a cached network.dat is rebuilt and fails on high-priority GTFS errors. Before, it returned an unusable network.sf origins/destinations that also had lon/lat (or x/y) columns were routed at those columns instead of the point geometry.Major changes
isochrone() function has gone through major changes which substantially
improved polygon-based isochrones. The function now builds on top of a travel
time surface that uses a regular grid of points across the network (specifically
a grid of Web Mercator pixels) and then uses the marching squares algorithm to
generate the isochrone polygons. See detailed in the updated vignette. Closed
#455 and Closed #495.get_gtfs_errors() to help diagnose eventual errors in
the GTFS data that prevent building the network. Closed #431 and #541.Minor changes
check_transit_availability() that checks the number and
proportion of public transport services from the GTFS feeds that are active on
specified dates.street_network_bbox() that efficiently extracts the
geographic bounding box of the transport network.Bug fixes
in travel_time_matrix(), arrival_travel_time_matrix() and expanded_travel_time_matrix().
Closes #501.New contributors to r5r
Major changes
build_network() to replace setup_r5(), which is being deprecated. Idiomatically r5r_core is now r5r_network.arrival_travel_time_matrix() to calculate travel time matrix between origin destination pairs considering the time of arrival, instead of a depature time. Closes #291travel_time_matrix(), expanded_travel_time_matrix() and arrival_travel_time_matrix(). In practice, this means that these functions are now much faster when there are multiple origins to few destinations but only when there is no elevation .tif file in the data path. Closes #450r5r have new parameters new_carspeeds, carspeed_scale and new_lts which allow one to use custom car speeds and LTS levels for cycling. These parameters provide convient and efficient ways to build different scenarios of traffic congestion, road closure and interventions in cycling infrastructure. Closes #289Minor changes
build_network() and setup_r5() now have their own class "r5r_network", making the package more consistent and safer from errors #472.Verbose=F now completly silences java output. Verbose=T only reports messages up to INFO level as opposed to up to DEBUG #456.options(r5r.r5jar=...) to use a local JAR instead of the R5 jar downloaded by r5r.Bug fixes
network_settings.json wasn't showing the right version numbers #459. Version number now dynamically updated #456.New co-authors
Major changes
detailed_itineraries() now has a new parameter osm_link_ids. A logical. Whether the output should include the additional columns with the OSM ids of the road segments used along the trip geometry Defaults to FALSE. Closes issues #298Minor changes
r5rlog file in the data path.Bug fixes
New contributors
Minor changes
isochrone() function has a new boolean parameter polygon_output that allows users to choose whether the output should be a polygon- or line-based isochrone. Closed #382Breaking changes
Major changes
tools::R_user_dir()r5r_cache() to manage the cache of the R5 Jar file.Minor changes
accessibility() function, the value of max_trip_duration is now capped by the max value passed to the cutoffs parameter. Closes #348.max_walk_time to make it clear that in walk-only trips, whenever max_walk_time differs from max_trip_duration, the lowest value is considered. Closes #353max_bike_time to make it clear that in bicycle-only trips, whenever max_bike_time differs from max_trip_duration, the lowest value is considered. Closes #353suboptimal_minutes in the detailed_itineraries() function.detailed_itineraries() function.Bug Fixes
output_dir parameter in the detailed_itineraries(all_to_all = TRUE) function. Closes #327 with a contribution (PR #354) from Luyu Liu.detailed_itineraries from working with frequency-based GTFS feeds. It should ONLY work with frequency-based GTFS feeds.New contributors to r5r
Major changes
isochrone()function. Closes #123, and addresses requrests in issues #164 and #328.r5r.r5r users.Minor changes
time_window is not set to 10 minutes in all functions to avoid weird results reported upstream in R5. Closes #342.percentiles parameter in the expanded_travel_time_matrix() because this function does not expose this parameter to users. Closes #343.r5r.Bug fixes
Breaking changes
max_walk_dist and max_bike_dist parameters with max_walk_time and max_bike_time to better align with R5 inputs. Closes #273.r5r now uses R5's native elevation weighting for walking and cycling impedance functions. As a result r5r does not have raster or rgdal package dependencies anymore. Closes #243 and #233.breakdown and breakdown_stat in travel_time_matrix() were removed. New function expanded_travel_time_matrix() should be used to retrieve detailed information of travel time matrices.r5rnow throws an error if users simultaneously pass more than one of the following modes c('WALK','CAR','BICYCLE') to the transport_mode parameter. This is because these modes are understood as mutually exclusive.setup_r5() no longer has a version parameter.New functions
expanded_travel_time_matrix() to calculate minute-by-minute travel times between origin destination pairs and get additional information on public transport routes, number of transfers, and total access, waiting, in-vehicle and transfer times.pareto_frontier() to compute of travel time and monetary cost Pareto frontier.r5r_sitrep() to generate an r5r situation report to help debug code errorssetup_fare_structure() to setup a fare structure to calculate the monetary costs of tripsread_fare_structure() to read a fare structure object from a filewrite_fare_structure() to write a fare structure object to diskMajor changes
6.8.detailed_itineraries() has been substantially improved. The new vesion is faster than previous ones. It also includes new parameters listed below. Closes #265.
time_window parametersuboptimal_minutes parameter, which extends the search space and returns a larger number of trips beyond the fastest ones;max_fare parameter;draws_per_minute to travel_time_matrix(), accessibility() and pareto_frontier() functions. Closes #230.output_dir to all routing functions, which can be used to specify a directory in which the results should be saved as .csv files (one file for each origin). This parameter is particularly useful when running estimates on memory-constrained settings, because writing the results to disk prevents R5 from storing them in memory.accessibility() are now of returned as doubles / class numeric, except when using a step decay function. Closes #235.detailed_itineraries() function has a new parameter all_to_all, which allows users to set whether they want to query routes between all origins to all destinations (all_to_all = TRUE) or to query routes between the 1st origin to the 1st destination, then the 2nd origin to the 2nd destination, and so on (all_to_all = FALSE, the default). Closes #224.Minor changes
cutoffs parameter in accessibility(), clarifying the function only accepts up to 12 cutoff values. Closes #216.percentiles parameter in accessibility() and travel_time_matrix(), clarifying these function only accepts up to 5 values. Closes #246.verbose = FALSE and progress = FALSE by default.street_network_to_sf(). Closes #251.Bug fixes
transit_network_to_sf() generated some routes with invalid geometries. Closes #256.setup_r5(path, overwrite = TRUE) to work.Minor change
Major changes
r5r.montecarlo_draws option. Defaults to 5. This would mean 300 draws in a 60 minutes time window, for example. The user may also set a custom value using options(r5r.montecarlo_draws = 10L) (in which you substitute 10L by the value you want to set).Minor changes
total_time column name to combined_time in travel_time_matrix()
output, to avoid confusion with travel_time column.Major changes
Updated R5 to version 6.4. Closes #182.
Significant performance improvements in all functions, due to a faster method for consolidating outputs. Closes #180
New function transit_network_to_sf(), to extract the public transport network
from R5 as simple features. Closes #179
New progress parameter in the accessibility(), travel_time_matrix, and
detailed_itineraries() functions, to show or hide the progress counter
indicator. Closes #186
Created new support function java_to_dt() and removed dependency on the jdx package. Closes #206
Reduced r5r's internet dependency quite considerably. Internet is now only required to download the latest R5 jar if it hasn't been downloaded before. Closes #197.
Added two new parameters breakdown and breakdown_stat to the travel_time_matrix(). This allows users to breakdown the travel time information by trip subcomponents (access time, waiting time, traveling time etc). It allows one to extract more information but it makes computation time slower. Closes #194
Minor changes
setup_r5() parameter, overwrite, that forces the building of a new network.dat, even if one already exists.departure_datetime to clarify the parameter must be set to local time. Closes #188transit_network_to_sf() regarding stops that are not snapped to road network. Closes #192.max_walking_dist and max_cycling_dist parameters. Closes #193.Major changes
New function accessibility() to calculate access to opportunities. Closes #169
New function find_snap() to help users identify where in the street network the input of origin and destination points are snapped to. Closes 168.
New parameter max_bike_dist added to routing and accessibility functions. Closes #174
Implemented temporary solution for elevation. Closes #171. Now r5r can read Digital Elevation Model (DEM) data from raster files in .tif format to weight the
street network for walking and cycling according to the terrain's slopes. Ideally, we would like to see a solution that accounts for elevation implemented upstream in R5. For now, this is a temporary solution implemented within r5r.
Minor changes
The street_network_to_sf() now has a more clean output when the provided GTFS covers a larger area than the street network pbf. Closes #173
The size of poa.zip sample GTFS data has been reduced due to CRAN policies. Closes #172.
Progress counter Implemented. Closes 150. When the verbose parameter is set to FALSE, r5r prints a progress counter and eventual ERROR messages. This comes with a minor penalty for computation performance. Hence we have kept verbose defautls to TRUE.
Bug fixes
Major changes
max_lts parameter to detailed_itineraries() and travel_time_matrix() functions. LTS stands for Level of Traffic Stress, and allows modeling of bicycle comfort in routing analysis. Additional information can be found in Conveyal's documentation.Minor changes
check_connection() to check internect connection before
download files from Ipea server.Major changes
detailed_itineraries() when
shortest_path = TRUE. Closes #153.Minor changes
travel_time_matrix() and detailed_itineraries() now output more detailed
messages in the console, when verbose = TRUE. This shall make debugging the
package much easier.travel_time_matrix(). Closes #149.id column. Closes #154.Bug fixes
{geobr} package when downloading metadata. Closed #137.departure_datetime in detailed_itineraries() and travel_time_matrix(). Closes #147.detailed_itineraries() that caused a crash when the shape of a route in the input GTFS is broken. Closes #145Minor changes
Minor changes
mode_egress to routing functions, so that users can
explicitly set the transport mode used after egress from public transport (walk,
car or bicycle). Closed #63.setup_r5() before.Major changes
Minor changes
percentiles parameter in the travel_time_matrix function now only accepts up to 5 cut points due to changes in R5.Minor changes
travel_matrix_function when the user
sets time_window parameter. Closes #127.detailed_itinerariesMajor changes
travel_time_matrix now has new parameters time_window and
percentiles it now calculates travel times for multiple departure times each
minute within a given time window. For now, the function automatically set the
number of Monte Carlo Draws to 5 times the size of time_window. Closes #104
and #118Minor changes
Minor changes