airport_finder: Find the airport code for an airport

View source: R/airport_finder.R

airport_finderR Documentation

Find the airport code for an airport

Description

Find the name, city, country, and IATA code of an airport. For use in the airplane_emissions function.

Usage

airport_finder(
  name,
  city,
  country,
  IATA_code,
  distance = 0.1,
  ignore.case = FALSE
)

Arguments

name

Name of the airport.

city

City that the airport is in.

country

Country that the airport is in.

IATA_code

The IATA code.

distance

Maximum distance allowed for a match between the name/country/city given, and that of the value in the data set.

ignore.case

If FALSE, the check for is case-sensitive. If TRUE, case is ignored.

Value

Data frame containing the name, city, country, and IATA code of an airport.

Examples

# Can get the IATA code from the name of an airport. Gets similar matches.
airport_finder(name = "Bristo")

# Can get the IATA code from the name and city of an airport
airport_finder(name = "Bristo", country = "United Kingdom")

# Can find the name and city of an airport given the IATA code
airport_finder(IATA_code = "BRS")

lilyclements/caRbon documentation built on April 17, 2025, 6:10 p.m.