seaport_finder: Check the code or name of a seaport

View source: R/seaport_finder.R

seaport_finderR Documentation

Check the code or name of a seaport

Description

Find the name and/or code of a seaport. For use in the ferry_emissions function.

Usage

seaport_finder(city, country, port_code, distance = 0.1, ignore.case = FALSE)

Arguments

city

Name of the city.

country

Name of the country.

port_code

Name of the port.

distance

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

ignore.case

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

Value

Data frame containing the country, city, country code, port code, latitude, and longitude of a seaport.

Examples

# Look up the city of Aberdeen to find the port_code for it
seaport_finder(city = "Aberdeen")

# Search for a country and city and it finds matches
seaport_finder(country = "United", city = "borunemouth", ignore.case = TRUE)

carbonr documentation built on Oct. 17, 2024, 1:06 a.m.