Use 2011 exchange rates for monetary emission factors calculations
martincollignon opened this issue · comments
Full process for determining the carbon footprint of a transaction
- Assign transaction to a transaction category
- Convert the transaction amount to 2011 amount in the country of purchase (currently using annual consumer price index averages by country, improvement possibilities: category averages & monthly consumer price index by country)
- Convert the transaction amount in 2011 amount in the country of purchase to transaction amount in 2011 EUR amount in the country of purchase. Currently we're using the latest available in https://github.com/tmrowco/northapp-contrib/blob/master/integrations/utils/currency/exchange_rates.json
- Multiply the transaction amount in 2011 EUR amount in the country of purchase to the emission factor.
What this issue is about
Convert the transaction amount in 2011 amount in the country of purchase to transaction amount in 2011 EUR amount in the country of purchase. Currently we're using the latest available in https://github.com/tmrowco/northapp-contrib/blob/master/integrations/utils/currency/exchange_rates.json
Solution
- Add 2011 exchange rate data in utils
- Create a new convertTo2011Euro function in https://github.com/tmrowco/northapp-contrib/blob/master/integrations/utils/currency/currency.js
- Call that function in https://github.com/tmrowco/northapp-contrib/blob/master/co2eq/purchase/index.js instead of convertToEuro