Title: | Helper functions for EUROCONTROL useRs |
---|---|
Description: | The helper functions in this package are designed to make it easy, homogeneus and transparent to perform common tasks usually needed by data analysts and useRs in EUROCONTROL. |
Authors: | Enrico Spinielli [aut, cre] , EUROCONTROL [cph, fnd] |
Maintainer: | Enrico Spinielli <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.18 |
Built: | 2024-11-09 05:53:48 UTC |
Source: | https://github.com/eurocontrol/eurocontrol |
A data frame with the following fields
the model full name, e.g. "A-320neo".
the manufacturer's code, e.g. "AIRBUS".
the model's designator, e.g. "A20N"
the date when the data have been last updated, e.g. "2023-05-19".
aircraft_model
aircraft_model
An object of class tbl_df
(inherits from tbl
, data.frame
) with 10438 rows and 4 columns.
A data frame with the following fields
the aircraft type designator, e.g. "A310".
the aircraft description, e.g. "LandPlane".
the aircraft , e.g. "IT".
the aircraft wake turbulence category, e.g. "M".
the number pf engines, e.g. "2". Note: this is not a number unfortunately,
there is one model encoded C
the engine type, e.g. "Jet".
the date when the data have been last updated, e.g. "2023-05-19".
aircraft_type
aircraft_type
An object of class tbl_df
(inherits from tbl
, data.frame
) with 2719 rows and 7 columns.
The returned dbplyr::tbl_dbi()
is referencing the airlines table in PRISME.
You can use dplyr
/dbplyr
verbs to filter, join, ... with other
datasets.
airlines_tbl(conn = NULL)
airlines_tbl(conn = NULL)
conn |
Database connection or instantiate the default one. |
a dbplyr::tbl_dbi()
referencing the Oracle table for airlines.
You need to either provide a connection conn
that has access to PRU_DEV.V_COVID_DIM_AO
or go with the
default which uses PRU_DEV to establish a db_connection()
.
## Not run: arl <- airlines_tbl() # other operations on arl, i.e. filtering, # followed by a collect() to retrieve the concrete data frame arl_filtered <- arl |> dplyr::filter(AO_ISO_CTRY_CODE == "IT") |> collect() # NOTE: you can reuse the connection for other API calls conn <- arl$src$con # other ops requiring conn # ... # IMPORTANT: close the DB connection DBI::dbDisconnect(conn) ## End(Not run)
## Not run: arl <- airlines_tbl() # other operations on arl, i.e. filtering, # followed by a collect() to retrieve the concrete data frame arl_filtered <- arl |> dplyr::filter(AO_ISO_CTRY_CODE == "IT") |> collect() # NOTE: you can reuse the connection for other API calls conn <- arl$src$con # other ops requiring conn # ... # IMPORTANT: close the DB connection DBI::dbDisconnect(conn) ## End(Not run)
Airline info including group affiliation
airlines_tidy(conn = NULL)
airlines_tidy(conn = NULL)
conn |
Optional connection to the PRU_DEV schema. |
A dbplyr::tbl_dbi()
with the following columns:
AO_CODE
: the the ICAO Airline Designator, i.e. 'OAL'
AO_NAME
: the airline's name, i.e. 'Olympic'
AO_GRP_CODE
: the airline's affiliation group code, i.e. 'AEE_GRP'
AO_GRP_NAME
: the airline's affiliation group, i.e. 'AEGEAN Group'
AO_ISO_CTRY_CODE
: the ISO2C code of the airline's country, i.e. 'GR'
EU
: (a character) whether the airlines is in a EUROCONTROL's Member State
(full, comprehensive or transition plus Kosovo), i.e. 'TRUE'
You need to either provide a connection conn
that has access to PRUDEV.V_COVID_DIM_AO
or go with the default which uses PRU_DEV to establish a db_connection()
.
## Not run: arls <- airlines_tidy() # other operations on arls, i.e. filtering, # followed by a collect() to retrieve the concrete data frame arls_filtered <- arls |> filter(stringr::str_starts("A")) |> collect() # NOTE: you can reuse the connection for other API calls conn <- arls$src$con # other ops requiring conn # ... # IMPORTANT: close the DB connection DBI::dbDisconnect(conn) ## End(Not run)
## Not run: arls <- airlines_tidy() # other operations on arls, i.e. filtering, # followed by a collect() to retrieve the concrete data frame arls_filtered <- arls |> filter(stringr::str_starts("A")) |> collect() # NOTE: you can reuse the connection for other API calls conn <- arls$src$con # other ops requiring conn # ... # IMPORTANT: close the DB connection DBI::dbDisconnect(conn) ## End(Not run)
retrieve latest airport list from OurAirports
airports_oa()
airports_oa()
a data frame
## Not run: apts <- airports_oa() ## End(Not run)
## Not run: apts <- airports_oa() ## End(Not run)
The returned dbplyr::tbl_dbi()
is referencing the airspace profiles table in PRISME.
You can use dplyr
/dbplyr
verbs to filter, join, ... with other
datasets.
airspace_profile_tbl(conn = NULL)
airspace_profile_tbl(conn = NULL)
conn |
Database connection or instantiate the default one. |
a dbplyr::tbl_dbi()
referencing the Oracle table for airspace profiles.
You need to either provide a connection conn
that has access to FSD.ALL_FT_ASP_PROFILE
or
go with the default which uses PRU_DEV to establish a db_connection()
.
## Not run: pp <- airspace_profile_tbl() # other operations on pp, i.e. filtering, # followed by a collect() to retrieve the concrete data frame # IMPORTANT: close the DB connection when done DBI::dbDisconnect(pp$src$con) # if you use a DB connection for many different APIs conn <- eurocontrol::db_connection("PRU_DEV") pp <- airspace_profile_tbl(conn = conn) # ... do something else with conn # ... # then manually close the connection to the DB DBI::dbDisconnect(conn) ## End(Not run)
## Not run: pp <- airspace_profile_tbl() # other operations on pp, i.e. filtering, # followed by a collect() to retrieve the concrete data frame # IMPORTANT: close the DB connection when done DBI::dbDisconnect(pp$src$con) # if you use a DB connection for many different APIs conn <- eurocontrol::db_connection("PRU_DEV") pp <- airspace_profile_tbl(conn = conn) # ... do something else with conn # ... # then manually close the connection to the DB DBI::dbDisconnect(conn) ## End(Not run)
The returned dbplyr::tbl_dbi()
includes segments for scheduled and non-scheduled flights
temporally intersecting the right-opened interval [wef, til)
.
General aviation, State, military and sensitive flight are excluded.
airspace_profiles_tidy( conn = NULL, wef, til, airspace = "FIR", profile = "CTFM" )
airspace_profiles_tidy( conn = NULL, wef, til, airspace = "FIR", profile = "CTFM" )
conn |
Database connection or instantiate the default one. |
wef |
With EFfect date (included) at Zulu time
in a format recognized by |
til |
unTILl date (excluded) at Zulu time
in a format recognized by |
airspace |
the type of airspace (default: 'FIR'), one of:
|
profile |
the model of the trajectory profile (default: 'CTFM'), one of:
|
a dbplyr::tbl_dbi()
with the following columns
ID: the so called SAM ID
, used internally by PRISME
SEQ_ID: the sequence number of the segment for the relevant airspace profile
ENTRY_TIME: the time of entry into the relevant airspace
ENTRY_LON: the longitude of entry into the relevant airspace
ENTRY_LAT: the latitude of entry into the relevant airspace
ENTRY_FL: the flight level of entry into the relevant airspace
EXIT_TIME: the time of exit out of the relevant airspace
EXIT_LON: the longitude of exit out of the relevant airspace
EXIT_LAT: the latitude of exit out of the relevant airspace
EXIT_FL: the flight level of exit out of the relevant airspace
AIRSPACE_ID: the airspace ID
AIRSPACE_TYPE: the airspace type as per airspace
input parameter
MODEL_TYPE: the trajectory model as per profile
input parameter
You need to either provide a connection conn
that has access to as noted in
airspace_profile_tbl()
and flights_tidy()
or go with the default which uses
PRU_DEV to establish a db_connection()
.
## Not run: ps <- airspace_profiles_tidy(wef = "2023-01-01", til = "2023-04-01") # IMPORTANT: always close the DB connection when done DBI::dbDisconnect(ps$src$con) # if you re-use DB connections conn <- eurocontrol::db_connection("PRU_DEV") ps <- airspace_profiles_tidy(conn = conn) # ... do something else with conn # ... # then manually close the connection to the DB DBI::dbDisconnect(conn) ## End(Not run)
## Not run: ps <- airspace_profiles_tidy(wef = "2023-01-01", til = "2023-04-01") # IMPORTANT: always close the DB connection when done DBI::dbDisconnect(ps$src$con) # if you re-use DB connections conn <- eurocontrol::db_connection("PRU_DEV") ps <- airspace_profiles_tidy(conn = conn) # ... do something else with conn # ... # then manually close the connection to the DB DBI::dbDisconnect(conn) ## End(Not run)
The returned dbplyr::tbl_dbi()
is referencing the airport operator data flow table in PRISME.
You can use dplyr
/dbplyr
verbs to filter, join, ... with other
datasets.
aodf_tbl(conn = NULL)
aodf_tbl(conn = NULL)
conn |
Database connection or instantiate the default one. |
a dbplyr::tbl_dbi()
referencing the Oracle table for airport operator data flow.
You need to either provide a connection conn
that has access to SWH_FCT.FAC_APDS_FLIGHT_IR691
or
go with the default which uses PRU_ATMAP to establish a db_connection()
.
## Not run: aodf <- aodf_tbl() # ... # IMPORTANT: close the DB connection when done with `aodf` DBI::dbDisconnect(aodf$src$con) ## End(Not run)
## Not run: aodf <- aodf_tbl() # ... # IMPORTANT: close the DB connection when done with `aodf` DBI::dbDisconnect(aodf$src$con) ## End(Not run)
The returned dbplyr::tbl_dbi()
includes movements information in the
interval [wef, til)
.
NOTE: it can only cover ONE month at a time
aodf_tidy(conn = NULL, wef, til)
aodf_tidy(conn = NULL, wef, til)
conn |
Database connection or instantiate the default one. |
wef |
With EFfect date (included) at Zulu time
in a format recognized by |
til |
unTILl date (excluded) at Zulu time
in a format recognized by |
A dbplyr::tbl_dbi()
with the following columns:
APDS_ID: the airport operator dataflow unique record id.
ID: the so called SAM ID
, used internally by PRISME
AP_C_FLTID: flight identifier (aource Airport)
AP_C_FLTRUL: which sets of regulations the flight is operated under. Possible values are:
IFR
for IFR
VFR
for VFR
NA
if unknown
AP_C_REG: the aircraft registration (with spaces, dashes, ... stripped), e.g. GEUUU.
ADEP_ICAO: (ICAO code of the) Aerodrome of DEParture (source airport).
ADES_ICAO: (ICAO code of the) Aerodrome of DEStination (source airport).
SRC_PHASE: flight phase. DEP
=departure, ARR
=arrival.
MVT_TIME_UTC: (best available) movement time
(takeoff if SRC_PHASE
= DEP
, landing if SRC_PHASE
= ARR
).
BLOCK_TIME_UTC: Block time
(off-block if SRC_PHASE
= DEP
, in-block if SRC_PHASE
= ARR
).
SCHED_TIME_UTC: scheduled time
(of departure if SRC_PHASE
= DEP
, of arrival if SRC_PHASE
= ARR
; source airport).
ARCTYP: (best available) the ICAO code for the aircraft type, for example A21N for Airbus A321neo.
AP_C_RWY: Runway ID (of departure if SRC_PHASE
= DEP
, of arrival if SRC_PHASE
= ARR
; source airport).
AP_C_STND: Stand ID (of departure if SRC_PHASE
= DEP
, of arrival if SRC_PHASE
= ARR
; source airport).
C40_CROSS_TIME: time of first (last) crossing at 40 NM from ARP for departure (arrival).
C40_CROSS_LAT: latitude of first (last) crossing at 40 NM from ARP for departure (arrival).
C40_CROSS_LON: longitude of first (last) crossing at 40 NM from ARP for departure (arrival).
C40_CROSS_FL: flight level of first (last) crossing at 40 NM from ARP for departure (arrival).
C40_BEARING: bearing of first (last) crossing at 40 NM from ARP for departure (arrival).
C100_CROSS_TIME: time of first (last) crossing at 100 NM from ARP for departure (arrival).
C100_CROSS_LAT: latitude of first (last) crossing at 100 NM from ARP for departure (arrival).
C100_CROSS_LON: longitude of first (last) crossing at 100 NM from ARP for departure (arrival).
C100_CROSS_FL: flight level of first (last) crossing at 100 NM from ARP for departure (arrival).
C100_BEARING: bearing of first (last) crossing at 100 NM from ARP for departure (arrival).
You need to either provide a connection conn
that has access to SWH_FCT.FAC_APDS_FLIGHT_IR691
,
or go with the default which uses PRU_ATMAP to establish a db_connection()
.
## Not run: my_aodf <- aodf_tidy(wef = "2023-01-01", til = "2023-01-02") # ... DBI::dbDisconnect(my_aodf$src$con) ## End(Not run)
## Not run: my_aodf <- aodf_tidy(wef = "2023-01-01", til = "2023-01-02") # ... DBI::dbDisconnect(my_aodf$src$con) ## End(Not run)
Provide a connection to the relevant Oracle database
db_connection(schema = "PRU_PROD")
db_connection(schema = "PRU_PROD")
schema |
the Oracle DB schema to connect to. |
A connection to a database (specifically an implementation of DBI::DBIConnection for an Oracle database.)
The schema
is in fact the prefix of the environment variables
where the credentials are stored, like <schema>_USR
,
<schema>_PWD
and <schema>_DBNAME
.
Possible values for schema
are PRU_PROD
, PRU_DEV
,
PRU_TEST
, ...
## Not run: conn <- db_connection() # ... perform other API operations re-using the same connection # ... DBI::dbDisconnect(conn) ## End(Not run)
## Not run: conn <- db_connection() # ... perform other API operations re-using the same connection # ... DBI::dbDisconnect(conn) ## End(Not run)
The returned dbplyr::tbl_dbi()
includes scheduled and non-scheduled flights whose airspace segments
temporally intersecting the right-opened interval [wef, til)
.
General aviation, State, military and sensitive flight are excluded.
flights_airspace_profiles_tidy( conn = NULL, wef, til, airspace = "FIR", profile = "CTFM" )
flights_airspace_profiles_tidy( conn = NULL, wef, til, airspace = "FIR", profile = "CTFM" )
conn |
Database connection or instantiate the default one. |
wef |
With EFfect date (included) at Zulu time
in a format recognized by |
til |
unTILl date (excluded) at Zulu time
in a format recognized by |
airspace |
the type of airspace (default: 'FIR'), one of:
|
profile |
the model of the trajectory profile (default: 'CTFM'), one of:
|
a dbplyr::tbl_dbi()
with the same columns as flights_tidy()
You need to either provide a connection conn
that has access to as noted in
airspace_profile_tbl()
and flights_tidy()
or go with the default which uses
PRU_DEV to establish a db_connection()
.
## Not run: aa <- flights_airspace_profiles_tidy(wef = "2023-01-01", til = "2023-04-01") # if you re-use DB connections conn <- eurocontrol::db_connection("PRU_DEV") flights_airspace_profiles_tidy(conn = conn, wef = "2023-01-01", til = "2023-04-01") # ... do something else with conn # ... # then manually close the connection to the DB DBI::dbDisconnect(conn) ## End(Not run)
## Not run: aa <- flights_airspace_profiles_tidy(wef = "2023-01-01", til = "2023-04-01") # if you re-use DB connections conn <- eurocontrol::db_connection("PRU_DEV") flights_airspace_profiles_tidy(conn = conn, wef = "2023-01-01", til = "2023-04-01") # ... do something else with conn # ... # then manually close the connection to the DB DBI::dbDisconnect(conn) ## End(Not run)
The returned dbplyr::tbl_dbi()
is referencing the flights table in PRISME.
You can use dplyr
/dbplyr
verbs to filter, join, ... with other
datasets.
flights_tbl(conn = NULL)
flights_tbl(conn = NULL)
conn |
Database connection or instantiate the default one. |
a dbplyr::tbl_dbi()
object referencing the Oracle table for flights.
You need to either provide a connection conn
that has access to
SWH_FCT.V_FAC_FLIGHT_MS
or
go with the default which uses PRU_DEV to establish a db_connection()
.
Market Segment is not available before 2004.
## Not run: flt <- flights_tbl() # other operations on flt, i.e. filtering, # followed by a collect() to retrieve the concrete data frame flt_filtered <- flt |> filter(TO_DATE("2023-06-01 10:00", "YYYY-MM-DD HH24:MI") <= IOBT, IOBT < TO_DATE("2023-06-02 10:30", "YYYY-MM-DD HH24:MI")) |> collect() # NOTE: you can reuse the connection for other API calls conn <- flt$src$con # other ops requiring conn # ... # IMPORTANT: close the DB connection DBI::dbDisconnect(conn) ## End(Not run)
## Not run: flt <- flights_tbl() # other operations on flt, i.e. filtering, # followed by a collect() to retrieve the concrete data frame flt_filtered <- flt |> filter(TO_DATE("2023-06-01 10:00", "YYYY-MM-DD HH24:MI") <= IOBT, IOBT < TO_DATE("2023-06-02 10:30", "YYYY-MM-DD HH24:MI")) |> collect() # NOTE: you can reuse the connection for other API calls conn <- flt$src$con # other ops requiring conn # ... # IMPORTANT: close the DB connection DBI::dbDisconnect(conn) ## End(Not run)
The returned dbplyr::tbl_dbi()
includes scheduled and non-scheduled flight
departing in the right-opened interval [wef, til)
.
Defaults values will assure that General aviation, State, military and sensitive flight will excluded. They can be retrieved via the other function call arguments in case of need.
flights_tidy( conn = NULL, wef, til, icao_flt_types = c("S", "N"), ids = NULL, include_sensitive = FALSE, include_military = FALSE, include_head = FALSE )
flights_tidy( conn = NULL, wef, til, icao_flt_types = c("S", "N"), ids = NULL, include_sensitive = FALSE, include_military = FALSE, include_head = FALSE )
conn |
Database connection or instantiate the default one. |
wef |
With EFfect date (included) at Zulu time
in a format recognized by |
til |
unTILl date (excluded) at Zulu time
in a format recognized by |
icao_flt_types |
the types of flights as described below in
|
ids |
list of |
include_sensitive |
include sensitive flights, default FALSE |
include_military |
include military flights, default FALSE |
include_head |
include Head of State flights, default FALSE |
A dbplyr::tbl_dbi()
with the following columns (grouped here by
flight details, aerodrome details, aircraft info, aircraft operator
info and operational details):
FLT_UID: flight unique id.
ID: the so called SAM ID
, used internally by PRISME
AIRCRAFT_ID: the callsign of the relevant flight, e.g. BAW6VB.
LOBT: Last received Off-Block Time.
IOBT: Initial Off-Block Time.
FLT_RULES (see FPL Item 8): which sets of regulations the flight is operated under. Possible values are:
I
for IFR
V
for VFR
Y
first IFR thereafter VFR
Z
first VFR thereafter IFR
ICAO_FLT_TYPE (see FPL Item 8): flight type. Possible values:
S
for scheduled air service
N
for non-scheduled air service
G
for general aviation
M
for military (note: filtered out)
X
for other than the preceding categories
RULE_NAME: market segment type as defined on the Market Segment Rules, it can be:
“Mainline”
“Regional”
“Low-Cost”
“Business Aviation”
“All-Cargo”
“Charter” (Non-Scheduled)
“Military”
“Other”
"Not classified"
SENSITIVE: 'Y' if sensitive
SPECIAL_EXEMPT: reasons for special handling by ATS. One of:
"AEAP" ATFM exemption approved
"EMER" emergency
"FIRE" fire fighting
"HEAD" flights with Head of State status
"MEDE" medical evacuation
"NEXE" not exempted
"SERE" search & rescue
ADEP: ICAO code of the Aerodrome of DEParture
NAME_ADEP: the (AIU) name of the ADEP
airport
COUNTRY_CODE_ADEP: the ISO 2-alpha country code for ADEP
COUNTRY_NAME_ADEP: the country name for ADEP
ADES: ICAO code of the
Aerodrome of DEStination (different from ADES_FILED
in case of
diversion)
NAME_ADES: the (AIU) name of the ADES
airport
COUNTRY_CODE_ADES: the ISO 2-alpha country code for ADES
COUNTRY_NAME_ADES: the country name for ADES
ADES_FILED: ICAO code of
the Aerodrome of DEStination filed in the Flight Plan.
Note: it can be different from ADES
in case of diversion
NAME_ADES_FILED: the (AIU) name of the ADES_FILED
airport
COUNTRY_CODE_ADES_FILED: the ISO 2-alpha country code for ADES_FILED
COUNTRY_NAME_ADES_FILED: the country name for ADES_FILED
REGISTRATION: the aircraft registration (with spaces, dashes, ... stripped), e.g. GEUUU.
AIRCRAFT_ADDRESS: the ICAO 24-bit address of the airframe for ADS-B/Mode S broadcasting.
AIRCRAFT_TYPE_ICAO_ID: the ICAO code for the aircraft type, for example A30B for an Airbus A-300B2-200.
WK_TBL_CAT (see FPL Item 9): wake turbulence category, can be
L
LIGHT, i.e. maximum certificated takeoff mass of 7000 kg (15_500 lbs) or less.
M
MEDIUM, i.e maximum certificated takeoff mass less than 136_000 kg (300_000 lbs),
but more than 7_000 kg (15_500 lbs)
H
HEAVY, i.e. maximum certificated takeoff mass of 136_000 kg (300_000 lbs) or more
(except those specified as J
)
J
SUPER, presently the only the AIRBUS A-380-800
AIRCRAFT_OPERATOR: the ICAO Airline Designator,
i.e. OAL
for Olympic
AO_GRP_CODE: Aircraft Operator group (code), i.e. AEE_GRP
AO_GRP_NAME: : Aircraft Operator group (name), i.e. AEGEAN Group
AO_ISO_CTRY_CODE: ISO country code for AO
EOBT_1: Estimated Off-Block Time for FPL-based (M1) trajectory
ARVT_1: ARriVal Time for FPL-based (M1) trajectory
TAXI_TIME_1: Taxi time for FPL-based (M1) trajectory
AOBT_3: Actual Off-Block Time for flown (M3) trajectory
ARVT_3: ARVival Time for flown (M3) trajectory
TAXI_TIME_3: Taxi time for flown (M3) trajectory
RTE_LEN_1: route length (in Nautical Miles) for FPL-based (M1) trajectory
RTE_LEN_3: route length (in Nautical Miles) for for flown (M3) trajectory
FLT_DUR_1: route duration (in minutes) for FPL-based (M1) trajectory
FLT_DUR_3: route length (in minutes) for flown (M3) trajectory
FLT_TOW: takeoff weight
You need to either provide a connection conn
that has access to
SWH_FCT.DIM_FLIGHT_TYPE_RULE
(for FLT_RULES
),
PRUDEV.V_COVID_DIM_AO
(for aircraft and aircraft group info) and
SWH_FCT.V_FAC_FLIGHT_MS
(for market segment info) or go with the default
which uses PRU_DEV to establish a db_connection()
.
## Not run: flts <- flights_tidy(wef = "2023-01-01", til = "2023-01-05") # other operations on flts, i.e. filtering, # followed by a collect() to retrieve the concrete data frame flts_filtered <- flts |> filter(TO_DATE("2023-06-01 10:00", "YYYY-MM-DD HH24:MI") <= IOBT, IOBT < TO_DATE("2023-01-02 10:30", "YYYY-MM-DD HH24:MI")) |> collect() # NOTE: you can reuse the connection for other API calls conn <- flts$src$con # other ops requiring conn # ... # IMPORTANT: close the DB connection DBI::dbDisconnect(conn) ## End(Not run)
## Not run: flts <- flights_tidy(wef = "2023-01-01", til = "2023-01-05") # other operations on flts, i.e. filtering, # followed by a collect() to retrieve the concrete data frame flts_filtered <- flts |> filter(TO_DATE("2023-06-01 10:00", "YYYY-MM-DD HH24:MI") <= IOBT, IOBT < TO_DATE("2023-01-02 10:30", "YYYY-MM-DD HH24:MI")) |> collect() # NOTE: you can reuse the connection for other API calls conn <- flts$src$con # other ops requiring conn # ... # IMPORTANT: close the DB connection DBI::dbDisconnect(conn) ## End(Not run)
The data frame for point trajectories needs to have the following columns:
Name | Description | Type |
FLIGHT_ID |
Flight ID | int |
TIME_OVER |
Time over point | datetime |
LONGITUDE |
Longitude (decimal degrees) | double |
LATITUDE |
Latitude (decimal degrees) | double |
FLIGHT_LEVEL |
Flight level | int |
POINT_ID |
Point ID or NO_POINT | char |
AIR_ROUTE |
Air route or NO_ROUTE | char |
LOBT |
Last Off-block Time | datetime |
SEQ_ID |
Positions' sequence number | int |
CALLSIGN |
Flight call sign | char |
REGISTRATION |
Aircraft registration | char |
MODEL_TYPE |
Aircraft model | char |
AIRCRAFT_TYPE |
Aircraft ICAO type | char |
AIRCRAFT_OPERATOR |
Aircraft operator | char |
ADEP |
Departing aerodrome (ICAO) ID | char |
ADES |
Destination aerodrome (ICAO) ID | char |
generate_so6(trajectory)
generate_so6(trajectory)
trajectory |
A data frame for point profile trajectories. |
A data frame for trajectories in SO6 format.
## Not run: conn <- eurocontrol::db_connection("PRU_DEV") pf <- point_profiles_tidy(conn = conn, wef = "2020-01-01", til = "2020-01-10") |> generate_so6() # ... do something else with conn # ... # then manually close the connection to the DB DBI::dbDisconnect(conn) generate_so6(trj) ## End(Not run)
## Not run: conn <- eurocontrol::db_connection("PRU_DEV") pf <- point_profiles_tidy(conn = conn, wef = "2020-01-01", til = "2020-01-10") |> generate_so6() # ... do something else with conn # ... # then manually close the connection to the DB DBI::dbDisconnect(conn) generate_so6(trj) ## End(Not run)
Return the corresponding IATA season for a date
iata_season_for_date(date)
iata_season_for_date(date)
date |
a date |
the name of the IATA season in the form summer-yyyy
## Not run: season_iata("2024-04-01") ## End(Not run)
## Not run: season_iata("2024-04-01") ## End(Not run)
A data frame with the following fields
the country name, e.g. "Italy"
the 3-letter ISO code, e.g. "ITA"
the 2-letter ISO code, e.g. "IT"
the 2-letter ICAO code, e.g. "LI"
the 3-digits ISO code, e.g. "380"
the date of status
code, e.g. 1996-04-01
the status code, e.g. "M"
(M
Member State, C
Comprehensive Agreement State, T
Transitional State,
NA for Kosovo)
These are useful to grab the right spatial polygons in case of need.
member_state
member_state
An object of class tbl_df
(inherits from tbl
, data.frame
) with 45 rows and 7 columns.
Kosovo is also included in the list.
The returned dbplyr::tbl_dbi()
is referencing the point profiles table in PRISME.
You can use dplyr
/dbplyr
verbs to filter, join, ... with other
datasets.
point_profile_tbl(conn = NULL)
point_profile_tbl(conn = NULL)
conn |
Database connection or instantiate the default one. |
a dbplyr::tbl_dbi()
referencing the Oracle table for point profiles.
You need to either provide a connection conn
that has access to
FSD.ALL_FT_POINT_PROFILE
or go with the default which uses
PRU_DEV to establish a db_connection()
.
## Not run: pt <- point_profile_tbl() # if you re-use DB connections conn <- eurocontrol::db_connection("PRU_DEV") pt <- point_profile_tbl(conn = conn) # ... do something else with conn # ... # then manually close the connection to the DB DBI::dbDisconnect(conn) ## End(Not run)
## Not run: pt <- point_profile_tbl() # if you re-use DB connections conn <- eurocontrol::db_connection("PRU_DEV") pt <- point_profile_tbl(conn = conn) # ... do something else with conn # ... # then manually close the connection to the DB DBI::dbDisconnect(conn) ## End(Not run)
Extract NM point profile trajectories from PRISME database. When a bbox is defined, we return only the (full) point profiles for the flights flying thru the region.
point_profiles_tidy( conn = NULL, wef, til = lubridate::today(tzone = "UTC"), profile = "CTFM", bbox = NULL )
point_profiles_tidy( conn = NULL, wef, til = lubridate::today(tzone = "UTC"), profile = "CTFM", bbox = NULL )
conn |
Database connection or instantiate the default one. |
wef |
With EFfect date (included) at Zulu time
in a format recognized by |
til |
unTILl date (excluded) at Zulu time
in a format recognized by |
profile |
the model of the trajectory profile (default: 'CTFM'), one of:
|
bbox |
(Optional) axis aligned bounding box (xmin, ymin, xmax, ymax) |
a dataframe representing a flight trajectory with the following columns:
FLIGHT_ID: a unique identifier for the flight
TIME_OVER: the time over llon/lat
LONGITUDE: the longitude
LATITUDE: the latitude
FLIGHT_LEVEL: the flight level
POINT_ID: the published point ID ('NO_POINT' otherwise)
AIR_ROUTE: the air rout name ('DCT' otherwise)
LOBT: the last off-block time
SEQ_ID: the progressive sequence number in the trajectory points
CALLSIGN: the callsign of the flight
REGISTRATION: the aircraft registration
MODEL_TYPE: the trajectory model as per profile
input parameter
AIRCRAFT_TYPE: the ICAO aircraft type
AIRCRAFT_OPERATOR: the flight operator
ICAO24: the ICAO 24-bit address of the aircraft
ADEP: the Aerodrom of Departure
ADES: the aerodrome of Destination
You need to either provide a connection conn
that has access to as noted in
airspace_profile_tbl()
and flights_tidy()
or go with the default which uses
PRU_DEV to establish a db_connection()
.
## Not run: # export 1 day of NM (planned) trajectories pf1 <- point_profiles_tidy(wef = "2019-07-14", til = "2019-07-15", profile = "FTFM") # export 2 hours of NM (flown) trajectories pf2 <- point_profiles_tidy(wef = "2019-07-14 22:00", til = "2019-07-15") # export 1 day of NM (flown) trajectories pf3 <- point_profiles_tidy(wef = "2019-07-14", til = "2019-07-15", profile = "CTFM") # export all CTFM trajectories within a bounding box 40 NM around EDDF bb <- c(xmin = 7.536746, xmax = 9.604390, ymin = 49.36732, ymax = 50.69920) pf4 <- point_profiles_tidy(wef = "2019-01-01 00:00", til = "2019-01-02 00:00", bbox = bb) # if you re-use DB connections conn <- eurocontrol::db_connection("PRU_DEV") pf <- point_profiles_tidy(conn = conn, wef = "2020-01-01", til = "2020-01-10") # ... do something else with conn # ... # then manually close the connection to the DB DBI::dbDisconnect(conn) ## End(Not run)
## Not run: # export 1 day of NM (planned) trajectories pf1 <- point_profiles_tidy(wef = "2019-07-14", til = "2019-07-15", profile = "FTFM") # export 2 hours of NM (flown) trajectories pf2 <- point_profiles_tidy(wef = "2019-07-14 22:00", til = "2019-07-15") # export 1 day of NM (flown) trajectories pf3 <- point_profiles_tidy(wef = "2019-07-14", til = "2019-07-15", profile = "CTFM") # export all CTFM trajectories within a bounding box 40 NM around EDDF bb <- c(xmin = 7.536746, xmax = 9.604390, ymin = 49.36732, ymax = 50.69920) pf4 <- point_profiles_tidy(wef = "2019-01-01 00:00", til = "2019-01-02 00:00", bbox = bb) # if you re-use DB connections conn <- eurocontrol::db_connection("PRU_DEV") pf <- point_profiles_tidy(conn = conn, wef = "2020-01-01", til = "2020-01-10") # ... do something else with conn # ... # then manually close the connection to the DB DBI::dbDisconnect(conn) ## End(Not run)
IATA summer season begins on the last Sunday of March and ends on the last Saturday of October. IATA winter season begins on the last Sunday of October and ends Saturday of before next year summer season.
season_iata(year, season = "summer")
season_iata(year, season = "summer")
year |
the year for the season definition |
season |
the (northern hemisphere) season, either "summer" (default) or "winter" |
an interval for the season definition, end/start dates are inclusive
## Not run: season_iata(2019) ## End(Not run)
## Not run: season_iata(2019) ## End(Not run)