Open demeringo opened 5 months ago
It would be good to both update the factors but also have an option for users to pass the factors they want to use to the API; this would give a lot of flexibility
This feature exist but not well documented : https://doc.api.boavizta.org/Reference/format/usage
{
"usage": {
"usage_location": "FRA",
"avg_power": 120,
"elec_factors": {
"gwp": 0.1
}
}
}
Problem
The documentation states that for usage impacts, the PE factor comes from IRENA (2016). API doc link https://doc.api.boavizta.org/Explanations/usage/elec_factors/
However the wikipedia article states that data is from 2021 (which I also remember from our past exchanges). https://en.wikipedia.org/wiki/List_of_countries_by_renewable_electricity_production
We are likely serving slightly outdated factors.
Solution
Short term:
Long term:
Alternatives
Workaround 1: use a custom version of API with updated factors
Workaround 2: pass directly custom factors when calling the API
Additional context or elements
Factors are defined in
boaviztapi/boaviztapi/data/crowdsourcing/electrical_mix.csv
Adrien mentions that the data was likely extracted from the source DB using SQL query that mentions 2016.
Linked issue is
https://github.com/Boavizta/boaviztapi/issues/117