View source: R/ferry_emissions.R
ferry_emissions | R Documentation |
A function that calculates CO2e emissions between ferry ports.
ferry_emissions(
from,
to,
via = NULL,
type = c("Foot", "Car", "Average"),
num_people = 1,
times_journey = 1,
include_WTT = TRUE,
round_trip = FALSE
)
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. |
The distances are calculated using the Haversine formula. This is calculated as the crow flies.
Returns CO2e emissions in tonnes for the ferry journey.
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.