footprintGetter: footprintGetter

Description Usage Arguments Details Value Examples

View source: R/funcs.R

Description

This function queries the goclimateneutral API and gets the values for one specific trip

Usage

1
footprintGetter(from, to, connections = NULL, class = "economy", API)

Arguments

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

Details

All flights are assumed to be 'to' and 'from' only, no connections (even though this is an underestimation). It would be easy to

Value

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.

Examples

1
2
3
4
5
6
## Not run: 
if(interactive()){
 #EXAMPLE1
 }

## End(Not run)

DataStrategist/carbonFootprintR documentation built on Dec. 17, 2021, 4:07 p.m.