Skip to contents

Retrieves comprehensive information about all Colombian airports from the API Colombia service. This function fetches data including airport names, codes, types, locations, and geographical coordinates for all airports across Colombia's departments.

Usage

get_colombia_airports()

Value

A tibble with the following columns:

  • id: Airport identifier (integer)

  • name: Airport name (character)

  • iata_code: IATA airport code (character)

  • oaci_code: ICAO airport code (character)

  • type: Airport type (character)

  • city: City where airport is located (character)

  • department: Department where airport is located (character)

  • latitude: Latitude coordinates (numeric)

  • longitude: Longitude coordinates (numeric)

Details

This function sends a GET request to the API Colombia service. If the API request fails or returns an error status code, the function returns NULL with an informative message. Note: The API returns latitude and longitude values swapped, so this function corrects the coordinates by swapping them back to their correct positions.

Note

Requires internet connection.

See also

Examples

if (interactive()) {
  get_colombia_airports()
}