Fix calculation of the share of electricity in primary energy #2205
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In my previous PR I attempted to fix the calculation of the share of electricity in primary energy consumption (used in this chart). However, I then realized that the calculation was still problematic, so I reverted it.
Short explanation (TLDR)
We should calculate the share of electricity in terms of direct primary energy consumption, instead of input-equivalent primary energy. This is not ideal, since we use the substitution method in most of our charts, but it's the best trade-off given the data we have.
Once this PR is merged, I'll change the subtitle of the chart, to mention that we use direct primary energy consumption, and not primary energy using the substitution method.
Comparison:
Detailed explanation
I can think of at least the following different ways to calculate the share of electricity in primary energy:
(total electricity generation) / (direct primary energy consumption).
This is what this PR calculates. Since we don't have direct primary energy consumption (the Statistical Review only provides input-equivalent primary energy consumption), we estimate it as the primary energy consumption of fossil and biofuels, plus the electricity generated by nuclear and renewables.
(total electricity generation) / (input-equivalent primary energy consumption).
This is what we currently have in production. It has the problem that the denominator includes the "thermal losses" of non-fossil sources (that were introduced to mimic the inefficiencies of fossil fuels). But, since these losses are not in the numerator, the result underestimates the share of electricity.
(total electricity generation, where non-fossil electricity sources are inflated to mimic the inefficiencies of fossil fuels) / (input-equivalent primary energy consumption).
This was the solution I proposed in my previous PR. But then I realized that it is arbitrary to include in the numerator the "thermal losses" of nuclear and renewables, but not the actual thermal losses of fossil fuels.
(total electricity generation, where all electricity sources are inflated assuming the same inefficiencies as fossil fuels) / (input-equivalent primary energy consumption).
This would be a more accurate version of what I proposed in my previous PR. Here, all electricity sources in the numerator are converted into their input-equivalents. I think this would be a more accurate way to describe the "share of electricity in primary energy consumption, using the substitution method". But this calculation applies the same efficiency factors to all electricity sources (including all fossil sources), which feels like too rough an approximation.
(total electricity generation) / (physical energy content primary energy consumption).
I think that the physical energy content method is a more meaningful way to calculate primary energy than the substitution method (and it seems to be the default method by the IEA). We could estimate the physical energy content primary energy by deflating the primary energy consumption from renewable sources, and inflating only the nuclear electricity generation (to account for the thermal losses, in a similar way that they are accounted for in fossil generation). However, since we do not use this method elsewhere on our site, it would be a drastic change. We may consider using this method once the IEA releases its data publicly.
So, in conclusion, there is no perfect choice, but option 1 seems to be a good trade-off. That's why I adopted it in this PR.