Contrasting Results
Contrast
Bases: dict
Source code in passengersim/contrast.py
__dir__
__getattr__
apply
apply(
func: Callable,
axis: int | Literal["index", "columns", "rows"] = 0,
) -> pd.DataFrame | pd.Series
Source code in passengersim/contrast.py
fig_bid_price_history
fig_bid_price_history(
summaries,
by_carrier: bool | str = True,
show_stdev: float | bool | None = None,
cap: Literal["some", "zero", None] = None,
raw_df=False,
)
Source code in passengersim/contrast.py
fig_bookings_by_timeframe
fig_bookings_by_timeframe(
summaries: dict[str, SummaryTables],
by_carrier: bool | str = True,
by_class: bool | str = False,
raw_df=False,
source_labels: bool = False,
ratio: str | bool = False,
) -> alt.Chart | pd.DataFrame
Generate a figure contrasting bookings by timeframe for one or more runs.
Parameters:
-
summaries
(dict[str, SummaryTables]
) –One or more SummaryTables to compare. The keys of this dictionary are the text names used to label the "source" for each set of data in the figure.
-
by_carrier
(bool or str
, default:True
) –Whether to differentiate carriers by colors (the default) or give the name of a particular carrier as a string to filter the results shown in the figure to only that one carrier.
-
by_class
(bool or str
, default:False
) –Whether to differentiate booking class by colors (the default) or give the name of a particular booking class as a string to filter the results shown in the figure to only that one booking class.
-
raw_df
(bool
, default:False
) –Set to true to return the raw dataframe used to generate the figure, instead of the figure itself.
-
source_labels
(bool
, default:False
) –Write source labels above the columns of the figure. Source labels are also available as tool tips, but if the figure is being shared as an image without tooltips, the source labels may make it easier to interpret.
-
ratio
(str or bool
, default:False
) –Compute ratios against a reference point and display them in tooltips.
Other Parameters:
-
report
(Reporter
) –Giving a reporter for this keyword only argument allow you to automatically append this figure to the report (in addition to returning it for display or other processing).
-
trace
(ExcelWriter or (ExcelWriter, str)
) –Write the raw dataframe backing this figure to the Excel workbook.
Source code in passengersim/contrast.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
|
fig_carrier_load_factors
fig_carrier_load_factors(
summaries,
raw_df=False,
load_measure: Literal[
"sys_lf", "avg_leg_lf"
] = "sys_lf",
orient: Literal["h", "v"] = "h",
ratio: str | bool = True,
)
Source code in passengersim/contrast.py
fig_carrier_revenues
fig_carrier_revenues(
summaries,
raw_df=False,
orient: Literal["h", "v"] = "h",
ratio: str | bool = True,
)
Source code in passengersim/contrast.py
fig_carrier_yields
fig_carrier_yields(
summaries,
raw_df=False,
orient: Literal["h", "v"] = "h",
ratio: str | bool = True,
)
Source code in passengersim/contrast.py
fig_demand_to_come
Source code in passengersim/contrast.py
fig_fare_class_mix
Source code in passengersim/contrast.py
fig_leg_forecasts
fig_leg_forecasts(
summaries,
raw_df=False,
by_flt_no=None,
by_class: bool | str = True,
of: Literal["mu", "sigma"]
| list[Literal["mu", "sigma"]] = "mu",
agg_booking_classes: bool = False,
)
Source code in passengersim/contrast.py
fig_path_forecasts
fig_path_forecasts(
summaries,
raw_df=False,
by_path_id=None,
path_names: dict | None = None,
agg_booking_classes: bool = False,
by_class: bool | str = True,
of: Literal["mu", "sigma", "closed"] = "mu",
)
Source code in passengersim/contrast.py
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 |
|