electricitymaps / electricitymaps-contrib

The open source repository for Electricity Maps App and data parsers that enables a real-time visualisation of the CO2 emissions of electricity consumption
https://app.electricitymaps.com
GNU Affero General Public License v3.0
3.63k stars 952 forks source link

Europe: Use weighted average instead of mean to calculate emission factors #7470

Open cgicgi opened 8 hours ago

cgicgi commented 8 hours ago

Description

This is a follow up to the great improvement achieved with https://github.com/electricitymaps/electricitymaps-contrib/issues/6581 Thanks to @madsnedergaard , @VIKTORVAV99 and @w-flo

While reviewing the resulting EFs in the zone config files and cross-checking them with the PP-based numbers from https://colab.research.google.com/drive/14MR8YhEC4bb6TvJlMGYHhEo7MC07fQ9z?usp=sharing , I noticed that the direct EFs are being calculated based on the mean of the EFs from the individual PPs. This does not take into account outliers that may result from rarely used PPs.

Maybe I missed something and there is a good reason for using the plain mean, but IMHO this should be changed to a weighted average as it removes outliers and reflects better the generation induced emissions.

See 2 examples, FR + DE grafik grafik

w-flo commented 7 hours ago

I haven't looked at the implementation, so can't confirm or deny that it is not weighted in the current implementation, but I'd agree with your suggestion! I'd say that using a weighted average would be preferable.

Even better in my opinion: Take into account that only some of the generation can be matched to ETS power plant data correctly. The emission factor is unknown for a relatively large part of total generation, e.g. because of small power plants that don't report to ENTSO-E and/or ETS. I think that "unmatched" generation should be added to the average using a default emission factor for that energy source. So if we can match 20 TWh to ETS data, out of a total 30 TWh of gas power produced in that year, the remaining 10 TWh should be used as the weighting factor for a default gas emission factor (e.g. IPCC) that should be added into the average emission factor.

madsnedergaard commented 3 hours ago

Thanks for raising this :) This is indeed an improvement we're considering for next time we update it. The difference is actually fairly small for gas, but significantly changes values for coal:

Screenshot 2024-11-14 at 14 27 27