Repository: electricitymaps/electricitymaps-contrib

Issue:
Peat combustion in Finland and Ireland / total gCO2eq/kWh 25-30% worse
Hello once again,
I had a look on the ENTSO-E data regarding Finnish and Irish electricity production.

They both have a significant number of **peat power plants** installed. And peat (together with Estonian oil shale ;) ) is even worse than coal when it comes to climate impact.
Currently on the map, the electricity generation from peat in Finland and Ireland seems to be contained in biomass with a CO2eq of 230 g/kWh.
But it is way worse than this, somewhere between 1,100 and 1,200 g/kWh or even higher. Since numbers for emissions from peat for electricity generation are kind of hard to find,  I tried to calculate that by using a specific emission value:
[380 g/kWh[thermal]](http://www.volker-quaschning.de/datserv/CO2-spez/index_e.php) / 33% efficiency = 1,140 g / kWh[electric]

Finland has 1,077 MW and Ireland has 344 MW of peat capacity installed. 
In the ENTSO-E data, it is declared as **FOSSIL peat**. 
Suprisingly, Finland [declared peat as "slowly renewable"](https://en.wikipedia.org/wiki/Peat_energy_in_Finland#Definition), which is actually taking some thousand years - let alone draining and destroying the swamp lands/bogs from which the peat is produced has a negative environmental and climate impact on its own.
That's why, in my opinion, peat should not be included in biomass on the map - it is not restored anually or in a few decades, such as usual biomass, but in hundreds or thousands of years. It should rather be included in an own category (e.g. "lignite/peat", if the coal split is implemented).

FYI, there is an analysis on whether peat is sustainable or not. Check out the first paragraph of the conclusion. 
https://www.researchgate.net/publication/222546437_How_sustainable_is_the_use_of_peat_for_commercial_energy_production
There it says:

> "On all undisturbed Finnish peatlands probably less peat grows than is being used, and on the 1200 km2 allotted to the industry growth is 85 times too slow. Also, peat that is growing beyond commercial reach cannot be said to re-plenish a renewable resource. The requirement that sustainable use of a renewable resource must be less or equal to its rate of regrowth is not fulﬁlled."

And since global warming is the main issue of this century, every additional release of unnecessary CO2, that can not be "recycled" within very short time, is "pure evil" for our climate.

Check out the Excel-file attached. I copied some Finnish and Irish data from ENTSO-E for 22-24 Feb. and applied the emission factors for most relevant types of generation to it. I hope I didn't do any mistakes.

[Peat in Finland and Ireland.xlsx](https://github.com/corradio/electricitymap/files/802161/Peat.in.Finland.and.Ireland.xlsx)

For Finland's domestic production the specific emissions in the period would rise from 233 g/kWh by about 30% to 300 g/kWh, considering Peat as non-renewable fuel (1,140 g/kWh CO2eq) instead of Biomass (230 g/kWh CO2eq).
For Ireland, they would increase from 315 g/kWh by about 25% to 388 g/kWh in the analyzed period. 
I did not consider any imports!

What is your opinion on peat - is it fossil or renewable? Should it be considered as "Biomass" or not? Is the difference high enough?

Greetings, Alex


Peat combustion in Finland and Ireland / total gCO2eq/kWh 25-30% worse
Hello once again,
I had a look on the ENTSO-E data regarding Finnish and Irish electricity production.

They both have a significant number of **peat power plants** installed. And peat (together with Estonian oil shale ;) ) is even worse than coal when it comes to climate impact.
Currently on the map, the electricity generation from peat in Finland and Ireland seems to be contained in biomass with a CO2eq of 230 g/kWh.
But it is way worse than this, somewhere between 1,100 and 1,200 g/kWh or even higher. Since numbers for emissions from peat for electricity generation are kind of hard to find,  I tried to calculate that by using a specific emission value:
[380 g/kWh[thermal]](http://www.volker-quaschning.de/datserv/CO2-spez/index_e.php) / 33% efficiency = 1,140 g / kWh[electric]

Finland has 1,077 MW and Ireland has 344 MW of peat capacity installed. 
In the ENTSO-E data, it is declared as **FOSSIL peat**. 
Suprisingly, Finland [declared peat as "slowly renewable"](https://en.wikipedia.org/wiki/Peat_energy_in_Finland#Definition), which is actually taking some thousand years - let alone draining and destroying the swamp lands/bogs from which the peat is produced has a negative environmental and climate impact on its own.
That's why, in my opinion, peat should not be included in biomass on the map - it is not restored anually or in a few decades, such as usual biomass, but in hundreds or thousands of years. It should rather be included in an own category (e.g. "lignite/peat", if the coal split is implemented).

FYI, there is an analysis on whether peat is sustainable or not. Check out the first paragraph of the conclusion. 
https://www.researchgate.net/publication/222546437_How_sustainable_is_the_use_of_peat_for_commercial_energy_production
There it says:

> "On all undisturbed Finnish peatlands probably less peat grows than is being used, and on the 1200 km2 allotted to the industry growth is 85 times too slow. Also, peat that is growing beyond commercial reach cannot be said to re-plenish a renewable resource. The requirement that sustainable use of a renewable resource must be less or equal to its rate of regrowth is not fulﬁlled."

And since global warming is the main issue of this century, every additional release of unnecessary CO2, that can not be "recycled" within very short time, is "pure evil" for our climate.

Check out the Excel-file attached. I copied some Finnish and Irish data from ENTSO-E for 22-24 Feb. and applied the emission factors for most relevant types of generation to it. I hope I didn't do any mistakes.

[Peat in Finland and Ireland.xlsx](https://github.com/corradio/electricitymap/files/802161/Peat.in.Finland.and.Ireland.xlsx)

For Finland's domestic production the specific emissions in the period would rise from 233 g/kWh by about 30% to 300 g/kWh, considering Peat as non-renewable fuel (1,140 g/kWh CO2eq) instead of Biomass (230 g/kWh CO2eq).
For Ireland, they would increase from 315 g/kWh by about 25% to 388 g/kWh in the analyzed period. 
I did not consider any imports!

What is your opinion on peat - is it fossil or renewable? Should it be considered as "Biomass" or not? Is the difference high enough?

Greetings, Alex




Discussion:
Thanks Alex for this very interesting issue. @brunolajoie what is your take on this?
We definitely didn't use enough time to think about that.
Thanks Alex,

If ENTSOE list is as "Fossil peat", then we have all reason to believe that it's actually not renewable fast enough indeed. Let me investigate this a bit based on your post and come back to you with a practical suggestion. I am curious in articular about how this "fossil peat" is legally accounted as per EU or UN official GHG accountings. 
@brunolajoie any news here?
@alexanmtz feel free to submit a pull request with the modifications. Will close due to inactivity else.
@corradio 
I'd love to further contribute to this issue that I once created, but unfortunately, I really don't know where exactly and how to edit the code for FI and IR emissions regarding this issue.

I assume this does belong to the piece of code/the file, where the production types from entso-e are summarized under "biomass" as well as the code where CO2 emissions are calculated from the mix.

For now, I can only do the maths, guessing it needs something like
```
if "Fossil peat" exists for a region
then "country specific biomass factor" [in g/kWh] = 
   (1140 g/kWh * peat_power + 230 g/kWh * biomass_power + 230 g/kWh * waste_power)/(total_bio_power)
```

**Something better that just came to my mind:**
An easier way for now would be **assigning "Fossil peat" to "coal"** in the entsoe.py instead.
The emission factor from peat would be ~30% lower than actually it is, but this comes much closer to the real emissions and still represents a part of the production from fossil fuel combustion. 
This could be mentioned under the "country specific emission factors-section", for example.

For Finland, e.g., this will increase production from coal by ~50% from ca. 800 MW to 1,300 MW at the moment and lower biomass production by ~50% from 1,500 MW to 1,000 MW as well. So emissions will increase notably. 
Is this the way to go for the moment?

Edit: the latter is something I could mangage to change in the code ;)
Hi @alixunderplatz ,

In principle you should be able to edit this file:
https://github.com/tmrowco/electricitymap/blob/master/config/co2eq_parameters.js
It allows for overriding emission factors for specific countries.

Olivier
@alixunderplatz @brunolajoie any update here?
@corradio @brunolajoie 
Remaining question here is whether to 
- include peat in "coal"  instead of "biomass" 
or
- whether to assign a country-specific CO2 parameter.

I will look at the entso-e numbers and shares through the days for peat and biomass again and try to draw a conclusion from that. At least for Finland, 'cause Ireland is still offline.
Here you can see the "fossil peat" vs. "biomass" categories with data from ENTSO-E for 2017 for Finland.

![image](https://user-images.githubusercontent.com/25743609/35815546-0ab4a162-0a99-11e8-879c-b802c239a6c3.png)

Peat is obviously mostly used for electricity generation during the heating period, probably in CHP plants? I vaguely remember reading something like that somewhere. 
So assigning a fixed custom biomass CO2-factor including varying peat shares won't account properly for these clear seasonal changes through the year. I also think we hadn't yet agreed on an emission factor for peat. I had just calculated 1140 g/kWh without any LCA influences . We could try to find something in studies, I could also again dig into the study above and look for numbers.

Putting peat into coal will push it far closer to its real CO2 equivalent. As peat is an intermediate product of converting dead biomass into lignite and coal, this will be the "more natural" category as well. We could include a note on this in the readme in the capacity part.
Thanks Alex! I'm currently trying to find global database for country-specific GHG intensity factor per fuel in #738, which should answer our question here. I'm afraid we can't afford to cherry pick different LCA analyses for every county, because they will never be based on the same assumption. We need to crack issue 738 in priority over this one !
@brunolajoie @alixunderplatz is there a quick win to be done here? Else I suggest we close the issue.
@corradio @brunolajoie quickest is probably shifting peat fro biomass to the coal category in the ENTSO-E parser

 'biomass': ['B01', 
**'B08',**
 'B17'],
    'coal': ['B02', 'B05', **'B08'**],
I agree with that. As ENTSOE puts it, it's clearly a fossil fuel, and with a C/H ratio is close to 1, our best shot is probably to assign it as coal.
Should be we change it for all ENTSOE countries, or just FI / IE?

On Thu, May 3, 2018 at 3:36 PM Bruno Lajoie <notifications@github.com>
wrote:

> I agree with that. As ENTSOE puts it, it's clearly a fossil fuel, and with
> a C/H ratio is close to 1, our best shot is probably to assign it as coal.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/tmrowco/electricitymap/issues/393#issuecomment-386297859>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABlEKGjTO-MmX4xzASXsY3Qv0w9K0eodks5tuwfogaJpZM4MMeZR>
> .
>

@corradio afaik, the third and last peat-reporting ENTSO-E country is Estonia (~3 MW or so)
so let's change it everywhere?

On Thu, May 3, 2018 at 3:48 PM Alex <notifications@github.com> wrote:

> @corradio <https://github.com/corradio> afaik, the third and last
> peat-reporting ENTSO-E country is Estonia (~3 MW or so)
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/tmrowco/electricitymap/issues/393#issuecomment-386301622>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABlEKEfyZYFPF3i-1cxcqHRpEvih46CFks5tuwq1gaJpZM4MMeZR>
> .
>

If you don't mind, yes :)
biomass & coal capacity for these 3 will need to be adjusted as well, I'll post them here
Updating all to the latest capacity in the same run:

For FI:
Update README.md text to "Solar & Wind: IRENA", link is the same

```
"FI": {
    "_comment": "coal incl. 1135 MW peat",
    "bounding_box": [
      [
        20.6455928891,
        59.846373196
      ],
      [
        31.5160921567,
        70.1641930203
      ]
    ],
    "capacity": {
      "biomass": 1970,
      "coal": 2854,
      "gas": 1865,
      "geothermal": 0,
      "hydro": 3149,
      "nuclear": 2782,
      "oil": 1386,
      "solar": 50,
      "unknown": 619,
      "wind": 1995
    },

```

For IE:
Add source to README.md 
[Biomass, Solar & Wind: IRENA] (http://resourceirena.irena.org/gateway/countrySearch/?countryCode=IRL)
Delete IWEA source for Wind

```
"IE": {
    "_comment": "coal incl. 344 MW peat",
    "bounding_box": [
      [
        -9.97708574059,
        51.6693012559
      ],
      [
        -6.03298539878,
        55.1316222195
      ]
    ],
    "capacity": {
      "biomass": 107,
      "coal": 1199,
      "gas": 4265,
      "hydro": 216,
      "hydro storage: 292",
      "nuclear": 0,
      "oil": 1272,
      "solar": 10,
      "unknown": 647,
      "wind": 3253
    },
```

For EE:
Add source to README.md 
[Biomass & Solar: IRENA] (http://resourceirena.irena.org/gateway/countrySearch/?countryCode=EST)

```
 "_comment": "coal incl. 5 MW peat. 'Other renewable' category of ENTSO-E assumed to represent capacity for it.",
 "bounding_box": [
      [
        23.3397953631,
        57.4745283067
      ],
      [
        28.1316992531,
        59.6110903998
      ]
    ],
    "capacity": {
      "biomass": 217,
      "coal": 5,
      "gas": 204,
      "hydro": 8,
      "nuclear": 0,
      "oil": 1976,
      "solar": 11,
      "wind": 487
    },
```
@maxbellec are you able to assist? That would be appreciated as I have too
much on my plate right now.
Else I'll make sure to do the changes

On Thu 3 May 2018 at 16:45, Alex <notifications@github.com> wrote:

> Updating all to the latest capacity in the same run:
>
> For FI:
> Update README.md text to "Solar & Wind: IRENA", link is the same
>
> "FI": {
>     "_comment": "coal incl. 1135 MW peat",
>     "bounding_box": [
>       [
>         20.6455928891,
>         59.846373196
>       ],
>       [
>         31.5160921567,
>         70.1641930203
>       ]
>     ],
>     "capacity": {
>       "biomass": 1970,
>       "coal": 2854,
>       "gas": 1865,
>       "geothermal": 0,
>       "hydro": 3149,
>       "nuclear": 2782,
>       "oil": 1386,
>       "solar": 50,
>       "unknown": 619,
>       "wind": 1995
>     },
>
>
> For IE:
> Add source to README.md
> [Biomass, Solar & Wind: IRENA] (
> http://resourceirena.irena.org/gateway/countrySearch/?countryCode=IRL)
> Delete IWEA source for Wind
>
> "IE": {
>     "_comment": "coal incl. 344 MW peat",
>     "bounding_box": [
>       [
>         -9.97708574059,
>         51.6693012559
>       ],
>       [
>         -6.03298539878,
>         55.1316222195
>       ]
>     ],
>     "capacity": {
>       "biomass": 107,
>       "coal": 1199,
>       "gas": 4265,
>       "hydro": 216,
>       "hydro storage: 292",
>       "nuclear": 0,
>       "oil": 1272,
>       "solar": 10,
>       "unknown": 647,
>       "wind": 3253
>     },
>
> For EE:
> Add source to README.md
> [Biomass & Solar: IRENA] (
> http://resourceirena.irena.org/gateway/countrySearch/?countryCode=EST)
>
>  "_comment": "coal incl. 5 MW peat. 'Other renewable' category of ENTSO-E assumed to represent capacity for it.",
>  "bounding_box": [
>       [
>         23.3397953631,
>         57.4745283067
>       ],
>       [
>         28.1316992531,
>         59.6110903998
>       ]
>     ],
>     "capacity": {
>       "biomass": 217,
>       "coal": 5,
>       "gas": 204,
>       "hydro": 8,
>       "nuclear": 0,
>       "oil": 1976,
>       "solar": 11,
>       "wind": 487
>     },
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/tmrowco/electricitymap/issues/393#issuecomment-386320742>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABlEKKV0arkHMF9bTo8NK1_Vu2lY-Cy-ks5tuxgggaJpZM4MMeZR>
> .
>

Thanks Alex for this very interesting issue. @brunolajoie what is your take on this?
We definitely didn't use enough time to think about that.
Thanks Alex,

If ENTSOE list is as "Fossil peat", then we have all reason to believe that it's actually not renewable fast enough indeed. Let me investigate this a bit based on your post and come back to you with a practical suggestion. I am curious in articular about how this "fossil peat" is legally accounted as per EU or UN official GHG accountings. 
@brunolajoie any news here?
@alexanmtz feel free to submit a pull request with the modifications. Will close due to inactivity else.
@corradio 
I'd love to further contribute to this issue that I once created, but unfortunately, I really don't know where exactly and how to edit the code for FI and IR emissions regarding this issue.

I assume this does belong to the piece of code/the file, where the production types from entso-e are summarized under "biomass" as well as the code where CO2 emissions are calculated from the mix.

For now, I can only do the maths, guessing it needs something like
```
if "Fossil peat" exists for a region
then "country specific biomass factor" [in g/kWh] = 
   (1140 g/kWh * peat_power + 230 g/kWh * biomass_power + 230 g/kWh * waste_power)/(total_bio_power)
```

**Something better that just came to my mind:**
An easier way for now would be **assigning "Fossil peat" to "coal"** in the entsoe.py instead.
The emission factor from peat would be ~30% lower than actually it is, but this comes much closer to the real emissions and still represents a part of the production from fossil fuel combustion. 
This could be mentioned under the "country specific emission factors-section", for example.

For Finland, e.g., this will increase production from coal by ~50% from ca. 800 MW to 1,300 MW at the moment and lower biomass production by ~50% from 1,500 MW to 1,000 MW as well. So emissions will increase notably. 
Is this the way to go for the moment?

Edit: the latter is something I could mangage to change in the code ;)
Hi @alixunderplatz ,

In principle you should be able to edit this file:
https://github.com/tmrowco/electricitymap/blob/master/config/co2eq_parameters.js
It allows for overriding emission factors for specific countries.

Olivier
@alixunderplatz @brunolajoie any update here?
@corradio @brunolajoie 
Remaining question here is whether to 
- include peat in "coal"  instead of "biomass" 
or
- whether to assign a country-specific CO2 parameter.

I will look at the entso-e numbers and shares through the days for peat and biomass again and try to draw a conclusion from that. At least for Finland, 'cause Ireland is still offline.
Here you can see the "fossil peat" vs. "biomass" categories with data from ENTSO-E for 2017 for Finland.

![image](https://user-images.githubusercontent.com/25743609/35815546-0ab4a162-0a99-11e8-879c-b802c239a6c3.png)

Peat is obviously mostly used for electricity generation during the heating period, probably in CHP plants? I vaguely remember reading something like that somewhere. 
So assigning a fixed custom biomass CO2-factor including varying peat shares won't account properly for these clear seasonal changes through the year. I also think we hadn't yet agreed on an emission factor for peat. I had just calculated 1140 g/kWh without any LCA influences . We could try to find something in studies, I could also again dig into the study above and look for numbers.

Putting peat into coal will push it far closer to its real CO2 equivalent. As peat is an intermediate product of converting dead biomass into lignite and coal, this will be the "more natural" category as well. We could include a note on this in the readme in the capacity part.
Thanks Alex! I'm currently trying to find global database for country-specific GHG intensity factor per fuel in #738, which should answer our question here. I'm afraid we can't afford to cherry pick different LCA analyses for every county, because they will never be based on the same assumption. We need to crack issue 738 in priority over this one !
@brunolajoie @alixunderplatz is there a quick win to be done here? Else I suggest we close the issue.
@corradio @brunolajoie quickest is probably shifting peat fro biomass to the coal category in the ENTSO-E parser

 'biomass': ['B01', 
**'B08',**
 'B17'],
    'coal': ['B02', 'B05', **'B08'**],
I agree with that. As ENTSOE puts it, it's clearly a fossil fuel, and with a C/H ratio is close to 1, our best shot is probably to assign it as coal.
Should be we change it for all ENTSOE countries, or just FI / IE?

On Thu, May 3, 2018 at 3:36 PM Bruno Lajoie <notifications@github.com>
wrote:

> I agree with that. As ENTSOE puts it, it's clearly a fossil fuel, and with
> a C/H ratio is close to 1, our best shot is probably to assign it as coal.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/tmrowco/electricitymap/issues/393#issuecomment-386297859>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABlEKGjTO-MmX4xzASXsY3Qv0w9K0eodks5tuwfogaJpZM4MMeZR>
> .
>

@corradio afaik, the third and last peat-reporting ENTSO-E country is Estonia (~3 MW or so)
so let's change it everywhere?

On Thu, May 3, 2018 at 3:48 PM Alex <notifications@github.com> wrote:

> @corradio <https://github.com/corradio> afaik, the third and last
> peat-reporting ENTSO-E country is Estonia (~3 MW or so)
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/tmrowco/electricitymap/issues/393#issuecomment-386301622>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABlEKEfyZYFPF3i-1cxcqHRpEvih46CFks5tuwq1gaJpZM4MMeZR>
> .
>

If you don't mind, yes :)
biomass & coal capacity for these 3 will need to be adjusted as well, I'll post them here
Updating all to the latest capacity in the same run:

For FI:
Update README.md text to "Solar & Wind: IRENA", link is the same

```
"FI": {
    "_comment": "coal incl. 1135 MW peat",
    "bounding_box": [
      [
        20.6455928891,
        59.846373196
      ],
      [
        31.5160921567,
        70.1641930203
      ]
    ],
    "capacity": {
      "biomass": 1970,
      "coal": 2854,
      "gas": 1865,
      "geothermal": 0,
      "hydro": 3149,
      "nuclear": 2782,
      "oil": 1386,
      "solar": 50,
      "unknown": 619,
      "wind": 1995
    },

```

For IE:
Add source to README.md 
[Biomass, Solar & Wind: IRENA] (http://resourceirena.irena.org/gateway/countrySearch/?countryCode=IRL)
Delete IWEA source for Wind

```
"IE": {
    "_comment": "coal incl. 344 MW peat",
    "bounding_box": [
      [
        -9.97708574059,
        51.6693012559
      ],
      [
        -6.03298539878,
        55.1316222195
      ]
    ],
    "capacity": {
      "biomass": 107,
      "coal": 1199,
      "gas": 4265,
      "hydro": 216,
      "hydro storage: 292",
      "nuclear": 0,
      "oil": 1272,
      "solar": 10,
      "unknown": 647,
      "wind": 3253
    },
```

For EE:
Add source to README.md 
[Biomass & Solar: IRENA] (http://resourceirena.irena.org/gateway/countrySearch/?countryCode=EST)

```
 "_comment": "coal incl. 5 MW peat. 'Other renewable' category of ENTSO-E assumed to represent capacity for it.",
 "bounding_box": [
      [
        23.3397953631,
        57.4745283067
      ],
      [
        28.1316992531,
        59.6110903998
      ]
    ],
    "capacity": {
      "biomass": 217,
      "coal": 5,
      "gas": 204,
      "hydro": 8,
      "nuclear": 0,
      "oil": 1976,
      "solar": 11,
      "wind": 487
    },
```
@maxbellec are you able to assist? That would be appreciated as I have too
much on my plate right now.
Else I'll make sure to do the changes

On Thu 3 May 2018 at 16:45, Alex <notifications@github.com> wrote:

> Updating all to the latest capacity in the same run:
>
> For FI:
> Update README.md text to "Solar & Wind: IRENA", link is the same
>
> "FI": {
>     "_comment": "coal incl. 1135 MW peat",
>     "bounding_box": [
>       [
>         20.6455928891,
>         59.846373196
>       ],
>       [
>         31.5160921567,
>         70.1641930203
>       ]
>     ],
>     "capacity": {
>       "biomass": 1970,
>       "coal": 2854,
>       "gas": 1865,
>       "geothermal": 0,
>       "hydro": 3149,
>       "nuclear": 2782,
>       "oil": 1386,
>       "solar": 50,
>       "unknown": 619,
>       "wind": 1995
>     },
>
>
> For IE:
> Add source to README.md
> [Biomass, Solar & Wind: IRENA] (
> http://resourceirena.irena.org/gateway/countrySearch/?countryCode=IRL)
> Delete IWEA source for Wind
>
> "IE": {
>     "_comment": "coal incl. 344 MW peat",
>     "bounding_box": [
>       [
>         -9.97708574059,
>         51.6693012559
>       ],
>       [
>         -6.03298539878,
>         55.1316222195
>       ]
>     ],
>     "capacity": {
>       "biomass": 107,
>       "coal": 1199,
>       "gas": 4265,
>       "hydro": 216,
>       "hydro storage: 292",
>       "nuclear": 0,
>       "oil": 1272,
>       "solar": 10,
>       "unknown": 647,
>       "wind": 3253
>     },
>
> For EE:
> Add source to README.md
> [Biomass & Solar: IRENA] (
> http://resourceirena.irena.org/gateway/countrySearch/?countryCode=EST)
>
>  "_comment": "coal incl. 5 MW peat. 'Other renewable' category of ENTSO-E assumed to represent capacity for it.",
>  "bounding_box": [
>       [
>         23.3397953631,
>         57.4745283067
>       ],
>       [
>         28.1316992531,
>         59.6110903998
>       ]
>     ],
>     "capacity": {
>       "biomass": 217,
>       "coal": 5,
>       "gas": 204,
>       "hydro": 8,
>       "nuclear": 0,
>       "oil": 1976,
>       "solar": 11,
>       "wind": 487
>     },
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/tmrowco/electricitymap/issues/393#issuecomment-386320742>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABlEKKV0arkHMF9bTo8NK1_Vu2lY-Cy-ks5tuxgggaJpZM4MMeZR>
> .
>


Resolving patch:
diff --git a/parsers/ENTSOE.py b/parsers/ENTSOE.py
--- a/parsers/ENTSOE.py
+++ b/parsers/ENTSOE.py
@@ -47,8 +47,8 @@
 }
 ENTSOE_PARAMETER_BY_DESC = {v: k for k, v in ENTSOE_PARAMETER_DESC.items()}
 ENTSOE_PARAMETER_GROUPS = {
-    'biomass': ['B01', 'B08', 'B17'],
-    'coal': ['B02', 'B05'],
+    'biomass': ['B01', 'B17'],
+    'coal': ['B02', 'B05', 'B08'],
     'gas': ['B03', 'B04'],
     'geothermal': ['B09'],
     'hydro': ['B11', 'B12'],
@@ -628,16 +628,17 @@ def validate_production(datapoint, logger):
 
 
 def get_biomass(values):
-    if 'Biomass' in values or 'Fossil Peat' in values or 'Waste' in values:
-        return values.get('Biomass', 0) + \
-               values.get('Fossil Peat', 0) + \
-               values.get('Waste', 0)
+    if 'Biomass' in values or 'Waste' in values:
+        return (values.get('Biomass', 0)
+                + values.get('Waste', 0))
 
 
 def get_coal(values):
-    if 'Fossil Brown coal/Lignite' in values or 'Fossil Hard coal' in values:
-        return values.get('Fossil Brown coal/Lignite', 0) + \
-               values.get('Fossil Hard coal', 0)
+    if 'Fossil Brown coal/Lignite' in values or 'Fossil Peat' in values \
+       or 'Fossil Hard coal' in values:
+        return (values.get('Fossil Brown coal/Lignite', 0)
+                + values.get('Fossil Peat', 0)
+                + values.get('Fossil Hard coal', 0))
 
 
 def get_gas(values):


Test patch:
diff --git a/parsers/test/test_IN_AP.py b/parsers/test/test_IN_AP.py
--- a/parsers/test/test_IN_AP.py
+++ b/parsers/test/test_IN_AP.py
@@ -24,7 +24,8 @@ def test_fetch_production(self):
             self.assertIsNotNone(data['production'])
             self.assertIsNotNone(data['storage'])
         except Exception as ex:
-            self.fail("IN_AP.fetch_production() raised Exception: {0}".format(ex.message))
+            self.fail(
+                "IN_AP.fetch_production() raised Exception: {0}".format(ex))
 
     def test_fetch_consumption(self):
         try:
@@ -35,7 +36,8 @@ def test_fetch_consumption(self):
             self.assertIsNotNone(data['datetime'])
             self.assertIsNotNone(data['consumption'])
         except Exception as ex:
-            self.fail("IN_AP.fetch_consumption() raised Exception: {0}".format(ex.message))
+            self.fail(
+                "IN_AP.fetch_consumption() raised Exception: {0}".format(ex))
 
 
 if __name__ == '__main__':