Description Usage Arguments Details Value Examples
This function queries the goclimateneutral API and gets the values for one specific trip
1 | footprintGetter(from, to, connections = NULL, class = "economy", API)
|
from |
Origin airport code |
to |
Destination airport code |
connections |
are there any connections? provide as comma seperated list if more than one , Default: NULL |
class |
what class the flight is in. Can be 'economy', 'premium_economy', 'business' and 'first'., Default: 'economy' |
API |
API Key. Contact goclimateneutral in order to obtain your own at https://www.goclimateneutral.org/contact |
All flights are assumed to be 'to' and 'from' only, no connections (even though this is an underestimation). It would be easy to
rturns a tibble with the origin and destination airport codes as well as the tons of CO2 of that flight and the cost to offset, currently in SEK.
1 2 3 4 5 6 | ## Not run:
if(interactive()){
#EXAMPLE1
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.