quetzal.io.export_utils module
- quetzal.io.export_utils.create_line_load_b_a_graph(load_fwd, load_bwd=None, image_name='line_load_b_a.png', width=0.2, yticks=None, xticks=None, legend=True, forward_label='forward', backward_label='backward', title='Line load', save_fig=True, clean_sequence=False)[source]
Export load graph for the specified line, with boardings and alightings at each station
The user can directly chose the figure size and font size in jupyter notebook with the following lines: plt.rcParams[‘figure.figsize’] = (12, 8) plt.rcParams[‘xtick.labelsize’] = 15 plt.rcParams[‘ytick.labelsize’] = 15 plt.rcParams[‘axes.titlesize’] = 15 plt.rcParams[‘legend.fontsize’] = 15 plt.rcParams[‘axes.labelsize’] = 15
- quetzal.io.export_utils.create_two_directions_load_b_a_graph(load_fwd_bwd, load_column='load', boarding_column='boardings', alighting_column='alightings', forward_col_suffix='_fwd', backward_col_suffix='_bwd', forward_label='forward', backward_label='backward', legend=True, **kwargs)[source]
Export load graph for the specified line, with boardings and alightings at each station The input load_fwd_bwd must be a dataframe with the columns: - ‘a’: station - ‘link_sequence’: bar plot sequence - ‘load_fwd’: load forward FROM a - ‘boarding_fwd’: boarding forward at a (outgoing forward link) - ‘alighting_fwd’: alighting forward at a (incoming forward link) - ‘load_bwd’: load backward TO a - ‘boarding_bwd’: boarding forward at a (outgoing backward link) - ‘alighting_bwd’: alighting forward at a (incoming backward link)
The user can directly chose the figure size and font size in jupyter notebook with the following lines: plt.rcParams[‘figure.figsize’] = (12, 8) plt.rcParams[‘xtick.labelsize’] = 15 plt.rcParams[‘ytick.labelsize’] = 15 plt.rcParams[‘axes.titlesize’] = 15 plt.rcParams[‘legend.fontsize’] = 15 plt.rcParams[‘axes.labelsize’] = 15
- quetzal.io.export_utils.directional_loads_to_station_bidirection_load(load_fwd, load_bwd, stations_to_parent_stations={}, load_column='load', boarding_column='boardings', alighting_column='alightings', forward_suffix='_fwd', backward_suffix='_bwd')[source]
Take forward and backward loaded links for a line and return a station-oriented load df
- quetzal.io.export_utils.plot_load_b_a_for_loadedlinks(loaded_links, ax=None, load_column='load', boarding_column='boardings', alighting_column='alightings', width=0.2, label='', shift_alightings=False)[source]
Export load graph for the specified line.
The user can directly chose the figure size and font size in jupyter notebook with the following lines: plt.rcParams[‘figure.figsize’] = (12, 8) plt.rcParams[‘xtick.labelsize’] = 15 plt.rcParams[‘ytick.labelsize’] = 15 plt.rcParams[‘axes.titlesize’] = 15 plt.rcParams[‘legend.fontsize’] = 15 plt.rcParams[‘axes.labelsize’] = 15
- quetzal.io.export_utils.save_line_load_graph(load_fwd, load_bwd, load_column='volume_pt', image_name='line_load.png', yticks=None, title='Line load', legend=True, save_fig=True, clean_sequence=False, *args, **kwargs)[source]
Export load graph for the specified line.
The user can directly chose the figure size and font size in jupyter notebook with the following lines: plt.rcParams[‘figure.figsize’] = (12, 8) plt.rcParams[‘xtick.labelsize’] = 15 plt.rcParams[‘ytick.labelsize’] = 15 plt.rcParams[‘axes.titlesize’] = 15 plt.rcParams[‘legend.fontsize’] = 15 plt.rcParams[‘axes.labelsize’] = 15