Skip to contents

Runs the DAIO aggregation used by PBWG, grouping the FIR-time entries by DAIO flag and region. Optional inclusion of SK_SOURCE_ID reproduces the CHN-specific variant of the legacy Python query.

Usage

pbwg_daio(wef, til, region, include_source_id = FALSE, conn = NULL)

Arguments

wef

Start date (inclusive). Can be anything that lubridate::as_date() understands.

til

End date (inclusive). Can be anything that lubridate::as_date() understands.

region

One or more TZ codes (e.g. "ECAC"). Values are embedded into the SQL IN (...) clause verbatim.

include_source_id

Should SK_SOURCE_ID be returned? Defaults to FALSE, mirroring the classic DAIO table.

conn

Optional Oracle DBI::DBIConnection. When omitted a fresh connection to PRUDEV is created via eurocontrol::db_connection(), with access to SWH_FCT.V_FAC_FLIGHT_MS and PRUDEV.V_PRU_AIRCRAFT_CATEGORY.

Value

A tibble::tibble() with "sql" attribute and columns:

  • YEARNumeric year derived from ENTRY_TIME.

  • MONTHNumeric month derived from ENTRY_TIME.

  • ENTRY_DATEDate (UTC) of the FIR entry.

  • TZ_NAMERegion name from DIMCL_TZ.

  • DAIODAIO flag (D, A, I, O).

  • SK_SOURCE_IDOptional source ID when include_source_id = TRUE.

  • FLIGHTTotal flights for the grouping.