CO2VEHICLEMODEL function:
|
Introduction
Approach
We use emission factors, data, guidelines from sources like US Department of Energy, US Environmental Protection Agency and UK Society of Motor Manufacturers and Traders. To simplify the usage we have made two minor modifications in our algorithm: First, for dual fuel vehicles, the average of emissions from its conventional and alternative fuels is used. Second, if a model is released across multiple years by the same maker, then the emissions for that model are averaged. The function to calculate the emission is simple: it just takes the Make and Model of a vehicle along with the distance travelled to calculate the emission.
Parameters
vehicle_make : Mandatory. Name of Vehicle Make (eg, Lexus)
vehicle_model : Mandatory. Name of Vehicle Model (eg, RX 300) for the selected MAKE (eg, Lexus)
distance_value : Mandatory. The distance travelled by vehicle.
distance_unit : Mandatory. The acceptable values are "km" for kilometers and "mi" for miles. This will default to "mi", if any other value is passed.
vehicle_model : Mandatory. Name of Vehicle Model (eg, RX 300) for the selected MAKE (eg, Lexus)
distance_value : Mandatory. The distance travelled by vehicle.
distance_unit : Mandatory. The acceptable values are "km" for kilometers and "mi" for miles. This will default to "mi", if any other value is passed.
UsageExample |
CO2VEHICLEMODEL(vehicle_make, vehicle_model, distance_value, distance_unit)
CO2VEHICLEMODEL("Lexus","RX 300","19000","km")
|
Notes:
We have made the entire database of vehicles available, which is structured by an alphabetical list of Models for every Make used by the function.