Create calendar.txt from calendar_dates.txt
Details
When calendar_dates.txt
declares all service dates, calendar.txt
becomes optional in the
GTFS feed specification.
However, to perform some operations, this table might be necessary.
This method allows to create a calendar.txt
table, based on the calendar_dates.txt
.
It performs an approximation, considering, for each service_id
, the
minimum and maximum dates and setting each week day to true if it has any date that matches that date. The results
might not be 100
Examples
if (FALSE) { # \dontrun{
gtfs <- GTFShift::load_feed("gtfs.zip")
gtfs$calendar <- GTFShift::create_calendar(gtfs)
} # }