Electricitymap-contrib: Ă…land / carbon intensity of zones fully powered by imports

Created on 1 Dec 2017  Â·  31Comments  Â·  Source: tmrowco/electricitymap-contrib

The Åland utility http://www.kraftnat.aland.fi/ However it says "Förändringar i bakomliggande system gör att statistiken inte visas rätt för tillfället." Which means that due to system work in the background the current stats aren't shown atm.

Yesterday's (and further back) data http://www.kraftnat.ax/text2.con?iPage=24&iLan=1

However http://www.fingrid.fi/en/Pages/default.aspx has the live import data from Sweden to Ă…land, and the rest which is local is wind production http://www.allwinds.ax/vindkraftverken/?lang=en (no live data what I can find)

Not much to go on, but it's a start.

help wanted parser

Most helpful comment

I think it is possible to parse the Ă…land power generation figures from that image,
which is updated every 30 seconds.
stamnat

My idea was to use numpy and Image from PIL, recolor everything blue([0,0,255] in RGB) black and everything else white in the image, and scrape pixel masks for each digit and the decimal dot. Then one tries to fit these masks where the numbers appear on the image. I got it working but not very robust with respect to flow directions. My guess is that the arrow directions change if the flows reverse in which case the flow directions would also be machine readable using similar ideas.

http://194.110.178.135/grafik/stamnat.php is a source for the raw image
On deciphering the image:

Did Kraftnät Åland have live generation statistics on the front page? The background changes breaking statistics might also refer to their monthly electricity graph, which does not show updates after mid-January:
http://194.110.185.12/graphmonth1.php
The monthly graphs strongly hint that any production that is not wind or fossil is renewable(förnyelsebar). The prime suspect for other generation is the 2.1 MW wood CHP plant owned by Mariehamns Bioenergi, according to Finnish Energy Industry Association's district heating statistics. It is possible that there is some solar or tidal generation, but for now assuming that other generation is 100% biomass based is my best guess.

All 31 comments

This looks terrific. Don't we all all we need in order to write a parser?

Once kraftnat's stats start working again we should be good to go. @Bjarkigd do you want to write this parser?

I have to be honest and say that I have no idea at all about how to do that, I've no coding skills or experience at all, zilch, zero nada.

That's fair enough, would you be prepared to contact them about live wind generation data? They have it on http://www.kraftnat.ax/text2.con?iPage=28&iLan=1 but it's in an image format which is hard to scrape. Contact page is here.

I could do that

@Bjarkigd If you get an answer from them, I could help with the coding part

I think it is possible to parse the Ă…land power generation figures from that image,
which is updated every 30 seconds.
stamnat

My idea was to use numpy and Image from PIL, recolor everything blue([0,0,255] in RGB) black and everything else white in the image, and scrape pixel masks for each digit and the decimal dot. Then one tries to fit these masks where the numbers appear on the image. I got it working but not very robust with respect to flow directions. My guess is that the arrow directions change if the flows reverse in which case the flow directions would also be machine readable using similar ideas.

http://194.110.178.135/grafik/stamnat.php is a source for the raw image
On deciphering the image:

Did Kraftnät Åland have live generation statistics on the front page? The background changes breaking statistics might also refer to their monthly electricity graph, which does not show updates after mid-January:
http://194.110.185.12/graphmonth1.php
The monthly graphs strongly hint that any production that is not wind or fossil is renewable(förnyelsebar). The prime suspect for other generation is the 2.1 MW wood CHP plant owned by Mariehamns Bioenergi, according to Finnish Energy Industry Association's district heating statistics. It is possible that there is some solar or tidal generation, but for now assuming that other generation is 100% biomass based is my best guess.

Some supportive documents for mapping all fossil production as 'oil':
Of the 44.8 MW "gasturbin" capacity

Some additional info from the data provider via email:

  • "Gustavs" is in principle _import_, not export as the parser assumes
  • The sum of listed wind and oil production and imports is often bigger than the shown total consumption
  • It is more reliable to rely on total imports and listed production for the total consumption than "Total förbrukning" shown
  • It is not possible to deduce unknown/biomass production from the map that is provided

It should be easy to modify the logic of the parser, will make PR soon.

It is a bit concerning that we don't know some of the generation. Is fossil or biomass production significant on a monthly/yearly scale?

Fossil we can read, and all of it is diesel generators or gas turbines using fuel oil.

Some daily production/import statistics from last months, until January:
Blue is import from Sweden, Yellow import from Finland, Red fossil production, Green renewables
http://194.110.185.12/graphmonth6.php
http://194.110.185.12/graphmonth5.php
http://194.110.185.12/graphmonth4.php
http://194.110.185.12/graphmonth3.php
http://194.110.185.12/graphmonth2.php
We see that imports dominate renewables, and that renewable production
fluctuates a lot between days. My guess is that renewables is mostly wind.

@tmslaine if I understand correctly,

  • we know fossil = oil
  • we already have access to wind data
  • the rest is renewable, but we can't assume it's biomass

Hence my question: what is renewable but not wind nor biomass? or to put it differently: why can't we assume that unknown is biomass?

  • we know fossil = oil
  • we have access to wind data
  • we do not know the amount or type of other generation, however the statistics suggest that it must be renewable(biomass, solar or hydro)
  • we know imports

As oil+wind+imports already gives a higher number than the shown consumption, I think the amount of other generation must be quite marginal. We can of course assume that other generation is biomass, but we do not have data, or any way to estimate how much it produces.

If oil+wind+imports > consumption, doesn't it suggest something is wrong with the numbers? Is there anyone we can contact to get some confirmation?

I inquired Kraftnät Åland about it already, the response was:

  • It is true[that the numbers do not match]
  • The consumption figure is missing network losses, and there is some wind power included which is not online measured
  • There is no way to get the consumption completely right
  • In the base case, oil+wind+imports gives a good estimate for the total consumption

I'm still puzzled about the unknown part. If oil, wind and imports are a good estimate for consumption, where does it leave the unknown part (currently assumed to be biomass)? Based on the data, it doesn't seem to be negligible.

The old logic is based on two false assumptions:

  • 1) the reported consumption is correct
  • 2) to make oil+wind+imports < reported cons.,a positive number for Gustavs is assumed to be export

With these assumptions in place, unknown production is calculated in the live version as the portion of (reported cons.+exports) that is not covered by oil, wind and imports

Now that we know that Gustavs is _import_ and the reported consumption is a couple of MW off, the best guess with available data is to define oil+wind+imports(incl. Gustavs) = consumption

Say the flow from Gustavs was 5 MW and the calculated unknown production was 7 MW.
Changing the interpretation of Gustavs from -5 MW to 5 MW adds 10 MW to the energy balance.
Redefining consumption as oil+wind+imports yields roughly 3 MW larger than reported consumption, therefore all of "unknown production" is in fact explained by import from Finland.

Got it! If I understood correctly, the "unknown" part can't actually be relied upon as it is based on the consumption value which is not precisely enough measured.
Will approve the PR :)

Has this been fully fixed now @tmslaine ?

Ă…land is now showing as correctly as possible given the available data.
There is a front end bug that gives no CO2 intensity when all electricity is imported
but otherwise this issue has been fixed.

I think we still assume the direction of flow in the exchanges? But Ă…land is unlikely to be exporting any electricity so I think you can close this @tmslaine, thank for your help on this.

@tmslaine what bug are you talking about exactly?

I think the CO2 intensity calculations show NaN when the parser returns 0.0 MW generation for an area.
For bigger areas this is an OK approach, but for small zones with capability to import all needed electricity there could be an exception to this rule that calculates the CO2 intensity based purely on the CO2 intensity of imports. Last weekend for example there were times when Ă…land was shown as grey because all available electricity was imported.

ok. Let's leave that issue opened then.
Can you post a screenshot with the time visible when you see it next time?
That way we'll be able to debug it.

On Wed, Mar 14, 2018 at 4:37 PM, tmslaine notifications@github.com wrote:

I think the CO2 intensity calculations show NaN when the parser returns
0.0 MW generation for an area.
For bigger areas this is an OK approach, but for small zones with
capability to import all needed electricity there could be an exception to
this rule that calculates the CO2 intensity based purely on the CO2
intensity of imports. Last weekend for example there were times when Ă…land
was shown as grey because all available electricity was imported.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tmrowco/electricitymap/issues/883#issuecomment-373066116,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABlEKPO0qg1CrryJi__G0WC_uF222jAsks5teTksgaJpZM4QxVzL
.

This happened at 17 March 2018 09:45 CET:

aland no local production

I've pushed a potential fix. Let's see if it works.

Seems to still be happening, e.g. at 21.03.2018 01:00 CET

Indeed you're right:

This will require a bit more investigation then.

On Wed, Mar 21, 2018 at 8:25 PM, jarek notifications@github.com wrote:

Seems to still be happening, e.g. at 21.03.2018 <21%2003%2020%2018> 01:00
CET

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tmrowco/electricitymap/issues/883#issuecomment-375066383,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABlEKMPHxllU1vVaS9pCY8WqOyoXU3GVks5tgqkUgaJpZM4QxVzL
.

On the other hand, there are zones where no own production and supply only from imports is an error, e.g. Croatia right now:

hr

And this also happens when a central European country doesn't report their own production but the neighbours report exchanges (e.g. Austria, Switzerland). In those cases the carbon intensity should remain as unknown.

I'm thinking now that a possible way to solve this would be to have a minimum "valid" MW/GW supply/load level configurable in the zone config. Then backend can compare with that to see if it's likely that there is indeed no local production.

We have opened a backend issue to fix this

Fixed!

Was this page helpful?
0 / 5 - 0 ratings