NEWS.md
convert_sf_to_shapes()
.as_dt_gtfs()
with methods for a few different classes (tidygtfs
, gtfs
and list
).filter_by_route_type()
now accepts Google Transit’s extended route types. Thanks @Ge-Rag.convert_shapes_to_sf()
, get_trip_geometry()
, get_trip_length()
, get_trip_speed()
, get_trip_segment_duration()
and get_stop_times_patterns()
now take an additional argument sort_sequence
, used to indicate whether shapes/timetables should be ordered by shape_pt_sequence
/stop_sequence
when applying the functions’ procedures.download_validator()
and validate_gtfs()
now support using validator v4.1.0 and v4.2.0.filter_by_stop_id()
: include_children
and include_parents
.convert_to_standard()
in which the date fields from feed_info
would not be converted back to an integer in their standard format (YYYYMMDD).transfers
table based on trip_id
and route_id
. Previously they would filter it based only on stop_id
. Thanks Daniel Langbein (@langbein-daniel).filter_by_route_id()
in which feeds with only one agency that omitted agency_id
in routes
and fare_attributes
would end up with an empty agency
table.filter_by_sf()
now correctly throws an error when an unsupported function is passed to spatial_operation
.filter_by_stop_id()
behavior of filtering by trips that contain the specified stops has been deprecated. For backwards compatibility reasons, this behavior is still the default as of the current version and is controlled by the parameter full_trips
. To actually filter by stop ids (the behavior that we now believe is the most appropriate), please use full_trips = FALSE
. This behavior will be the default from version 2.0.0 onward. To achieve the old behavior, manually subset the stop_times table by stop_id
and specify the trip_id
s included in the output in filter_by_trip_id()
.filter_by_sf()
has been deprecated in favor of filter_by_spatial_extent()
. For backwards compatibility reasons, usage of filter_by_sf()
is still allowed as of the curent version, but the function will be removed from the package in version 2.0.0.validate_gtfs()
now defaults to run sequentially. Previously it would default to run parallelly using all available cores. Heavily inspired by Henrik Bengtsson post “Please Avoid detectCores() in your R packages” (https://www.jottr.org/2022/12/05/avoid-detectcores/).seconds_to_string()
and, consequently, any other functions that use it.validate_gtfs()
behavior. Now used to run MobilityData Canonical GTFS validator with a feed. The old behavior was marked as deprecated since v1.0.0.download_validator()
.write_gtfs()
that prevented as_dir = TRUE
to be used.set_trip_speed()
that resulted in invalid stop_times tables when max(stop_sequence)
was higher than the number of stops of a given trip. Thanks Alena Stern (@alenastern).set_trip_speed()
that resulted in the speed of wrong trip_ids being updated because of the order that these ids would appear in the trips and stop_times tables. Thanks Alena Stern (@alenastern).convert_time_to_seconds()
.filter_by_agency_id()
.filter_by_service_id()
.filter_by_time_of_day()
.filter_by_weekday()
.frequencies_to_stop_times()
.get_children_stops()
.get_stop_times_patterns()
.get_trip_length()
.merge_gtfs()
: prefix
. The warnings
parameter was flagged as deprecated.get_parent_station()
and get_children_stops
now accept stop_id = NULL
to analyze all stop_id
s in the stops
table.get_trip_segment_duration()
would list wrong segment numbers, not necessarily starting from 1. Now segment numbers always range from 1 to N, where N is the total number of segments that compose each trip.filter_by_{route,service,shape,trip}_id()
that resulted in the agency
table not getting filtered when the specified id was character(0)
.get_trip_geometry()
, get_trip_duration()
, get_trip_segment_duration()
and convert_shapes_to_sf()
.shape_pt_sequence
/stop_sequence
in get_trip_geometry()
and convert_shapes_to_sf()
, since the GTFS reference says that the stop_times
and shapes
tables must be ordered by point/stop sequence anyway.get_trip_speed()
and set_trip_speed()
anymore.warnings
parameter from read_gtfs()
and write_gtfs()
and the optional
and extra
parameters from write_gtfs()
, flagged as deprecated on gtfstools v1.0.0.convert_stops_to_sf()
.convert_shapes_to_sf()
.filter_by_route_type()
.filter_by_route_id()
.filter_by_sf()
.filter_by_shape_id()
.filter_by_stop_id()
.filter_by_trip_id()
.get_parent_station()
.remove_duplicates()
.read_gtfs()
: fields
, skip
and encoding
. The warnings
parameter was flagged as deprecated.write_gtfs()
: files
, standard_only
and as_dir
. They substitute the previously existent optional
and extra
, which were flagged as deprecated. The warnings
parameter was flagged as deprecated too.get_trip_speed()
and set_trip_speed()
examples and tests now only run if lwgeom is installed. lwgeom is an sf “soft” dependency required by these functions, and is listed in Suggests
. However, package checks would fail not so gracefully if it wasn’t installed, which is now fixed.crs
passed to get_trip_geometry()
would be assigned to the result without actually reprojecting it.get_trip_geometry()
to not raise an error when the ‘file’ parameter is left untouched and the GTFS object doesn’t contain either the shapes or the stop_times table. Closes #29.merge_gtfs()
to create objects that inherited only from dt_gtfs
(ignoring gtfs
and list
).get_trip_speed()
returned NA
speeds if the specified trip_id
was listed in trips, but not in stop_times.set_trip_speed()
to stop raising a max()
-related warning when none of the specified trip_id
s exists.{gtfs2gps}
will now be exported by gtfstools. Huge thanks to the whole {gtfs2gps}
crew (Rafael Pereira @rafapereirabr, Pedro Andrade @pedro-andrade-inpe and João Bazzo @Joaobazzo)!read_gtfs()
and write_gtfs()
.string_to_seconds()
now runs much faster thanks to Mark Padgham (@mpadge).get_trip_geometry()
now runs much faster due to data.table
-related optimizations.validate_gtfs()
will be flagged as deprecated as well, since I plan to heavily change its usability and outputs in future versions.write_gtfs()
parameters went through major changes - the optional
and extra
params were flagged as deprecated and substituted by the more general files
and standard_only
.