View source: R/convert_bookingData_fromNonCumulative_toCumulative.2.R
This function processes the booking data on flight level defined as unique combination of flight id and departure date. If some weeks-2-departure are missing than they are introduced (whole row) and cumulative bookings are calculated per flight.
1 2 3 4 5 6 | convert_bookingData_fromNonCumulative_toCumulative.2(
df,
choose_minAnDmax_w2d_forMe = T,
min_W2D = 0,
max_w2D = 60
)
|
df |
A data frame of booking data with the following columns in the following left-to-right order: flight id, departure date, weeks-2-departure, non-cumulative bookings on the given departure, revenue per person. |
choose_minAnDmax_w2d_forMe |
A boolean indicating whether to let the algorithm choose the range of weeks-2-departure from the data. |
min_W2D |
A numeric of minimum weeks-to-departure. Defults to 0. Relevant only if choose_minAnDmax_w2d_forMe is set to FALSE. |
max_w2D |
A numeric of maximum weeks-to-departure. Defults to 60. Relevant only if choose_minAnDmax_w2d_forMe is set to FALSE. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.