R/airport_lookups.R
airport_lookup.Rd
Return city name, airport name, IATA code, or IACO code given an input IATA code, ICAO code, or airport name.
airport_lookup(input, input_type = "IATA", output_type = "name")
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 |
output_type | One of "name", "city", "IATA", or "ICAO". Defaults to "name" if otherwise not specified |
The appropriate city, airport name, IATA code, or ICAO code for that airport
airport_lookup("CYVR")#> [1] "Vancouver International Airport"airport_lookup("YVR", output_type = "city")#> [1] "Vancouver"airport_lookup("Vancouver International Airport", input_type="name",output_type = "IATA")#> [1] "YVR"airport_lookup("YVR",input_type = "IATA", output_type = "city")#> [1] "Vancouver"# Produces a list of similar named airports airport_lookup("Vancoover","name","city")#> Warning: No exact matches but some similar names in the database include:#> Vancouver International Airport #> Vancouver Harbour Water Aerodrome #> Vancouver International Seaplane Base