Closed Bjarkigd closed 6 years ago
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.
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:
Senneby-Tellholm is a cable from Sweden-SE3 bidding zone to Åland http://www.kraftnat.ax/files/rapportdel_2.pdf has the maximal capacity between Sweden and Åland as 80 MW
Nådendal is a 100 MW(source: http://www.kraftnat.ax/text.con?iPage=18&m=39) reserve cable from mainland Finland to Åland for repowering incase there is an outage in the Sweden-Åland connection.
Total förbrukning is total consumption
Lokal vindkraftproduktion is local wind production, http://www.allwinds.ax/fakta-om-vindkraftverken-pa-aland/?lang=en has the total wind installed capacity as 16.56 MW
Lokal fossilproduktion is local fossil fuel based production, http://www.kraftnat.ax/files/rapportdel_2.pdf has the installed capacity for this as 20.5 MW oil, 44.8 MW gas, however Finnish Energy Industry's fuel use statistics show that fossil generation in the recent years has been oil based.
As for Båtskär and Knutsboda http://www.allwinds.ax/vindkraftverken/?lang=en suggests they are both wind parks
Gustafs is flow to Finnish Archipelago. According to an old document http://old.regeringen.ax/.composer/ls-prot/KANSLI/2000/K2600E09.html there is a 45kV transfer cable to Gustafs in Finland. Sadly there is no arrow for this flow but the flow direction can be deduced by demanding that generation that is not wind or fossil based cannot be negative. http://www.kraftnat.ax/files/rapportdel_2.pdf has the capacity for that cable as 9 MW
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:
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,
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?
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:
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:
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:
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:
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!
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.