ferry_emissions {carbonr} | R Documentation |
Calculate CO2e emissions from ferry journeys
Description
A function that calculates CO2e emissions between ferry ports.
Usage
ferry_emissions(
from,
to,
via = NULL,
type = c("Foot", "Car", "Average"),
num_people = 1,
times_journey = 1,
include_WTT = TRUE,
round_trip = FALSE
)
Arguments
from |
Port code for the port departing from. Use |
to |
Port code for the port arriving from. Use |
via |
Optional. Takes a vector containing the port code that the ferry travels through. Use |
type |
Whether the journey is taken on foot or by car. Options are |
num_people |
Number of people taking the journey. Takes a single numerical value. |
times_journey |
Number of times the journey is taken. |
include_WTT |
logical. Recommended |
round_trip |
Whether the journey is one-way or return. |
Details
The distances are calculated using the Haversine formula. This is calculated as the crow flies.
Value
Returns CO2e emissions in tonnes for the ferry journey.
Examples
# Emissions for a ferry journey between Belfast and New York City
seaport_finder(city = "Belfast")
seaport_finder(city = "New York")
ferry_emissions(from = "BEL", to = "BOY")