Return all airport details given an input IATA code, ICAO code, or airport name.

airport_detail(input, input_type)

Arguments

input

An airport name, IATA code, or ICAO code. Input type will be guessed unless explicitly defined

input_type

One of "name", "IATA", or "ICAO". Function will attempt to guess type if not supplied

Value

A 1x17 tibble with airport details

Examples

airport_detail("YVR")
#> # A tibble: 1 × 17
#>   `OpenFlights ID` Name                 City  IATA  ICAO  Country `Country Code`
#>              <dbl> <chr>                <chr> <chr> <chr> <chr>   <chr>         
#> 1              156 Vancouver Internati… Vanc… YVR   CYVR  Canada  124           
#> # ℹ 10 more variables: `Country Code (Alpha-2)` <chr>,
#> #   `Country Code (Alpha-3)` <chr>, Latitude <dbl>, Longitude <dbl>,
#> #   Altitude <dbl>, UTC <chr>, DST <chr>, Timezone <chr>, Type <chr>,
#> #   Source <chr>
airport_detail("London Heathrow Airport")
#> # A tibble: 1 × 17
#>   `OpenFlights ID` Name                 City  IATA  ICAO  Country `Country Code`
#>              <dbl> <chr>                <chr> <chr> <chr> <chr>   <chr>         
#> 1              507 London Heathrow Air… Lond… LHR   EGLL  United… 826           
#> # ℹ 10 more variables: `Country Code (Alpha-2)` <chr>,
#> #   `Country Code (Alpha-3)` <chr>, Latitude <dbl>, Longitude <dbl>,
#> #   Altitude <dbl>, UTC <chr>, DST <chr>, Timezone <chr>, Type <chr>,
#> #   Source <chr>