Skip to contents

Rebuilds the parquet-export workflow from the PBWG tooling: pulls APDF movements per airport, coerces registrations/types to the PBWG shape, and aggregates daily arrivals/departures with a heavy/medium/light split. Date ranges spanning multiple years are handled in yearly chunks to keep queries manageable.

Usage

pbwg_apdf_daily_airport_movements(
  airports,
  wef,
  til,
  conn = NULL,
  domestic_prefixes = pbwg_apdf_domestic_prefixes_default()
)

Arguments

airports

Character vector of ICAO airport codes.

wef

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

til

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

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.

domestic_prefixes

Character prefixes used to flag domestic traffic via pbwg_apdf_is_domestic(). Defaults to the ECTL set defined in pbwg_apdf_domestic_prefixes_default().

Value

Tibble with one row per airport per day containing:

  • ICAOAirport code.

  • DATEMovement date (UTC).

  • ARRSArrival count.

  • DEPSDeparture count.

  • HEAVYHeavy wake turbulence movements.

  • MEDMedium wake turbulence movements.

  • LIGHTLight wake turbulence movements.

  • ARRS_DOMDomestic arrivals matched on ICAO prefixes.

  • DEPS_DOMDomestic departures matched on ICAO prefixes.