electricitymaps / electricitymaps-contrib

A real-time visualisation of the CO2 emissions of electricity consumption
https://app.electricitymaps.com
GNU Affero General Public License v3.0
3.41k stars 915 forks source link

ENTSO-E electricity prices: change parser for DE and AT #1086

Closed alixunderplatz closed 6 years ago

alixunderplatz commented 6 years ago

In a nutshell: the ENTSO-E parser needs to be fixed to fetch the correct day-ahead hourly prices for Germany and Austria (instead of "no price" for Germany and "15 min EXAA auction prices" for Austria) using the data for the bidding zone (AT-DE-LU).


Here is the longer story:

Not sure if this hasn't already been discussed or you are aware, but couldn't find the right issue while searching: The following image made me wonder about the displayed electricity prices for Austria:

image

First off, the Austrian 15-min electricity price that is used right now should definitely not be used for electricitymap. Hourly day-ahead prices, like for the other countries, are way more representative as a graph, covering average hourly offer/demand situations and the most trading volume of the market. You will find the 15min values following the hourly prices, but still, there is a huge difference what hourly and quarter hourly prices "are made of". And EEX/EPEX Spot and EXAA are two different market places with different trading volumes, too.

In general, I think, this comes from the parser currently using the "country" (AT) data from ENTSO-E. This is also why there is no price for DE - because the hourly (60 min block) day-ahead price is only given for the entire bidding zone AT-DE-LU, not seperately for German area (n/e). As you may know, AT and DE are in the same bidding zone for day-ahead auctions (with LUxemburg), so day-ahead hourly prices are always equal in these three countries, without any exception.

At the moment, the electricity prices for AT seem to come from the 15-min day-ahead auction from the Austrian power exchange EXAA. The zig-zagging prices and 15 min-intervals in the image definitely looked very much like that. Looking it up on the EXAA site confirmed this theory 100%.

The quarter-hourly day-ahead blocks are only used to compensate the biggest part of the resulting inter-hourly surplusses or deficits from the hourly day-ahead auctions. This is also why they have this predictable zig-zag shape. (((Just to make the list complete: On the spot market (short term trading, no auction!), quarter-hourly intraday trading is used to compensate intraday deviations of demand or generation (e.g. less/more wind, solar, broken unit, ...)))

The hourly data is on ENTSO-E for the entire bidding zone Austria/Germany/(Luxembourg): image

Just not for Germany in the "country" section: image

And for Austria you have quarter hour prices (EXAA 15 min auction): image

brunolajoie commented 6 years ago

Good point, very clear! We should indeed remove the existing AT 15min-ahead prices from the map and only use day-ahead spot to stay consistent, and display this price for both DE and AT and the map

lorrieq commented 6 years ago

Hi guys, anyone working on this? If not, I would be happy to.

systemcatch commented 6 years ago

@lorrieq nobody is working on this now to my knowledge so feel free to have a go. Let us know if you have any questions.

lorrieq commented 6 years ago

I've taken an initial look. So Austria, Germany and Luxembourg prices need to use the bidding zone 10Y1001A1001A63L. I think it will be necessary to add some override in fetch_price like is done in fetch_exchange with ENTSOE_EXCHANGE_DOMAIN_OVERRIDE:

image

My suggestion is to add a constant ENTSOE_PRICE_DOMAIN_OVERRIDE and then add code to fetch_price to select the domain from ENTSOE_PRICE_DOMAIN_OVERRIDE if the zone_key exists there and if not to select the domain from the usual ENTSOE_DOMAIN_MAPPINGS.

Anyone see any problems with this approach?

corradio commented 6 years ago

Sounds good. Just to be sure: doesn't Germany have two zones and thus using one price for both would result in an approximation?

On Mar 12, 2018 17:44, "Laurence Quinn" notifications@github.com wrote:

I've taken an initial look. So Austria, Germany and Luxembourg prices need to use the bidding zone 10Y1001A1001A63L. I think it will be necessary to add some override in fetch_price like is done in fetch_exchange with ENTSOE_EXCHANGE_DOMAIN_OVERRIDE:

[image: image] https://user-images.githubusercontent.com/6525086/37296751-ce143560-2613-11e8-8e28-828426e3d3c0.png

My suggestion is to add a constant ENTSOE_PRICE_DOMAIN_OVERRIDE and then add code to fetch_price to select the domain from ENTSOE_PRICE_DOMAIN_OVERRIDE if the zone_key exists there and if not to select the domain from the usual ENTSOE_DOMAIN_MAPPINGS.

Anyone see any problems with this approach?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tmrowco/electricitymap/issues/1086#issuecomment-372378344, or mute the thread https://github.com/notifications/unsubscribe-auth/ABlEKHobG-6rvITdd4LY_KNPDLPraZrtks5tdqXUgaJpZM4SBgHU .

alixunderplatz commented 6 years ago

@corradio Germany is one single price zone, so no worries. There were only debates about splitting it in the past due to transmission bottlenecks and other issues

corradio commented 6 years ago

OK thanks for the clarification!

On Mon 12 Mar 2018 at 19:39, Alex notifications@github.com wrote:

@corradio https://github.com/corradio Germany is one single price zone, so no worries. There were only debates about splitting it in the past due to transmission bottlenecks and other issues

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/tmrowco/electricitymap/issues/1086#issuecomment-372418963, or mute the thread https://github.com/notifications/unsubscribe-auth/ABlEKLkSGo42yLYkhRfGdXp39QrllIY6ks5tdsDMgaJpZM4SBgHU .

lorrieq commented 6 years ago

Hi guys, I have that implemented but I am having some issues trying to push my remote branch to GitHub for a pull request. Initially I cloned electricitymap with HTTPS so my origin remote was https://github.com/tmrowco/electricitymap.git and the error I got when pushing was:

screen shot 2018-03-13 at 22 48 40

Then after some reading online I set up SSH on my Mac and GitHub but got the same error. Some more reading made me change the origin remote to SSH, git@github.com:tmrowco/electricitymap.git, but I got a different error when pushing:

screen shot 2018-03-13 at 22 47 02

Any advice would be great. Sorry for creating an issue within an issue!

corradio commented 6 years ago

Hi @lorrieq - you need to fork the repository, push that new branch there, and then create a pull request! Ping us on slack if you have any troubles

lorrieq commented 6 years ago

Thanks. I have created a pull request now (unfortunately forgot to include issue number in commit).

alixunderplatz commented 6 years ago

@lorrieq @corradio

German electricity price looks good now! image

For Austria, the day-ahead auction values of EXAA for the 96 quarter hours are still used. They have a different function on the market, than the hourly day-ahead auctions of the EEX/EPEX. To make the price chart consistent, this should also be changed to the same data that is used for Germany now (same bidding zone, therefore always same hourly wholesale price).

image

lorrieq commented 6 years ago

I thought it was working for AT, DE and LU to take prices of bidding zone 10Y1001A1001A63L. Looking back at the code I still can't work out why that is not happening. Can investigate further this evening.

lorrieq commented 6 years ago

@alixunderplatz @corradio

When I run ENTSOE.fetch_price locally it returns the same price data for DE, AT and LU as evidenced in the images below. I thought maybe the changes just haven't been moved to production but then I am not sure how DE is suddenly fixed while AT remains broken (and LU is blank).

screen shot 2018-03-15 at 21 05 21 screen shot 2018-03-15 at 21 05 31
corradio commented 6 years ago

I've just re-deployed the backend to be sure. Indeed LU and AT should not be blank.

On Thu, Mar 15, 2018 at 10:07 PM, Laurence Quinn notifications@github.com wrote:

When I run ENTSOE.fetch_price locally it returns the same price data for DE, AT and LU as evidenced in the images below. I thought maybe the changes just haven't been moved to production but then I am not sure how DE is suddenly fixed while AT remains broken (and LU is blank).

[image: screen shot 2018-03-15 at 21 05 21] https://user-images.githubusercontent.com/6525086/37491137-bbc9b776-2894-11e8-86c7-0da8a7e88643.png

[image: screen shot 2018-03-15 at 21 05 31] https://user-images.githubusercontent.com/6525086/37491147-c13a5aa8-2894-11e8-8f3f-38c4bebdfc21.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tmrowco/electricitymap/issues/1086#issuecomment-373523101, or mute the thread https://github.com/notifications/unsubscribe-auth/ABlEKGayRaoUrAuSrWMs4o2iMiEiiLEaks5tetgJgaJpZM4SBgHU .

lorrieq commented 6 years ago

Looks good for AT now but still blank for LU.

corradio commented 6 years ago

AT is fixed (the database didn't overwrite the 15m values so there was a mix of hourly and 15m values). Looking into LU

corradio commented 6 years ago

LU is there too now!