fasttrips.Transfer
- class fasttrips.Transfer(input_archive, output_dir, gtfs_feed)[source]
Transfer class.
One instance represents all of the Transfer links.
Stores transfer link information in
Transfer.transfers_df
, an instance ofpandas.DataFrame
.- __init__(input_archive, output_dir, gtfs_feed)[source]
Constructor. Reads the gtfs data from the transitfeed schedule, and the additional fast-trips transfers data from the input files in input_archive.
Methods
__init__
(input_archive, output_dir, gtfs_feed)Constructor.
add_numeric_stop_id
(stops)Stops are now equipped to add numeric ID (DAPs are in) so grab them
add_transfer_attributes
(transfer_links_df, ...)Adds transfer attributes for transfer links and returns those transfer links with the additional columns.
write_transfers_for_extension
()This writes to an intermediate file a formatted file for the C++ extension.
Attributes
INPUT_TRANSFERS_FILE
File with fasttrips transfer information (this extends the gtfs transfers file).
OUTPUT_TRANSFERS_FILE
File with transfer links for C++ extension It's easier to pass it via file rather than through the initialize_fasttrips_extension() because of the strings involved
TRANSFERS_COLUMN_AUTO_CAPACITY
fasttrips Transfers column name: Auto Capacity, vehicles per hour per mile.
TRANSFERS_COLUMN_DISTANCE
fasttrips Transfers column name: Link walk distance, in miles.
TRANSFERS_COLUMN_ELEVATION_GAIN
fasttrips Transfers column name: Elevation Gain, feet gained along link.
TRANSFERS_COLUMN_FROM_ROUTE
fasttrips Transfers column name: Origin route identifier
TRANSFERS_COLUMN_FROM_STOP
gtfs Transfers column name: Origin stop identifier
TRANSFERS_COLUMN_FROM_STOP_NUM
fasttrips Transfers column name: Origin Stop Numerical Identifier.
TRANSFERS_COLUMN_INDIRECTNESS
fasttrips Transfers column name: Indirectness, ratio of Manhattan distance to crow-fly distance.
TRANSFERS_COLUMN_MIN_TRANSFER_TIME
gtfs Transfers column name: Minimum transfer time for transfer_type=2.
TRANSFERS_COLUMN_MIN_TRANSFER_TIME_MIN
gtfs Transfers column name: Minimum transfer time for transfer_type=2.
TRANSFERS_COLUMN_PENALTY
Transfers column name: Link generic cost.
TRANSFERS_COLUMN_POPULATION_DENSITY
fasttrips Transfers column name: Population Density, people per square mile.
TRANSFERS_COLUMN_RETAIL_DENSITY
fasttrips Transfers column name: Retail Density, employees per square mile.
TRANSFERS_COLUMN_SCHEDULE_PRECEDENCE
fasttrips Transfers column name: Schedule precedence
TRANSFERS_COLUMN_STOP_TO_STOP
fasttrips Transfers column name: Is this a stop-to-stop transfer? (e.g.
TRANSFERS_COLUMN_TIME
Transfers column name: Link walk time.
TRANSFERS_COLUMN_TIME_MIN
Transfers column name: Link walk time in minutes.
TRANSFERS_COLUMN_TO_ROUTE
fasttrips Transfers column name: Destination route identifier
TRANSFERS_COLUMN_TO_STOP
gtfs Transfers column name: Destination stop identifier
TRANSFERS_COLUMN_TO_STOP_NUM
fasttrips Transfers column name: Destination Stop Numerical Identifier.
TRANSFERS_COLUMN_TRANSFER_TYPE
gtfs Transfers column name: Transfer Type
WALK_SPEED_MILES_PER_HOUR
Transfer walk speed, in miles per hour