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.57k stars 943 forks source link

Add/Fix missing cross-border exchanges for Croatia (HR) #1007

Closed alixunderplatz closed 6 years ago

alixunderplatz commented 6 years ago

I was looking at Croatia and was wondering why cross-border exchanges with Slovenia and Bosnia-Herzegovina are not displayed. Was there any reason in the past? Coudn't find anything yet in related issue #135

Exchange-data is completely available on entso-e and also here:

https://www.hops.hr/wps/portal/hr/web

image

Seems like the BA->HR arrow has no "lonlat" assigned and the HR->SI arrow is yet missing in the code. Exchange with HR also does not appear in the bar chart for Slovenia. For the other connected countries it's there for the past 23 h.

Another issue related to this: the latest data for exchange with SI, RS and BA is only available for the previous hour. For the current hour, exchange is "0 MW". So, probably, that is the reason why the existing arrows are not displayed on the map? It's only there for the exchange with Hungary, where the latest data on entso-e is not zero.

The entire required exchange data is probably retrieved in the entso-e parser already?

alixunderplatz commented 6 years ago

Forgot to mention: data from https://www.hops.hr/wps/portal/hr/web seems to be "live" data. So this could replace the missing/zero values from entso-e.

alixunderplatz commented 6 years ago

If the data from entso-e will be replacecd with first-hand live exchange-data (updating every 5-10 seconds) from HOPS (Hrvatski operator prijenosnog sustava d.o.o.), here is a small to-do list:

Please, tell me if something is missing here :) Maybe someone in your upcoming hackathon can deal with this issue to warm-up? :)

systemcatch commented 6 years ago

I remember vaguely that there were problems with Croatia's production data but that shouldn't effect the exchanges. This raises again the idea of having multiple parsers doing the same thing for redundancy/data consistancy, if one source goes down the backup can kick in for the map.

I don't know where the code is that generates the source url, probably in web/app somewhere.

@alixunderplatz your list looks good!

alixunderplatz commented 6 years ago

@systemcatch Yeah, at the moment, there is no production at all - so nothing critical related to that should appear. Adding the missing exchanges would simply "complete" the power flow in that area of Europe. Don't know if that is worth putting effort into it :) The third bullet point in the list was referring to the code for the 4 neighbour countries, so the bar chart for import/export will depend on the Croatian data source as well, and not on entso-e as source - I paraphrased it in another way now :) probably in the entso-e parser as well?

systemcatch commented 6 years ago

It's worth doing imo, there is another parser (ENTE) https://github.com/tmrowco/electricitymap/blob/master/parsers/ENTE.py that just gets exchanges for several countries in Central America. The data from HOPS is 5min (or better) where ENTSOE is hourly.

brunolajoie commented 6 years ago

Hey guys, great news, feel free to pursue these leads

@alixunderplatz, adding a new key in exchanges.json will automatically trigger the update of the computation of import/export bars, and of the resultant consumption mix/CO2 intensity (It's processed in the backend)

Also, may I suggest that for the Readme, let's add, for countries that discriminate power flows datasource from production datasource, the following pattern (for instance):

Real-time electricity data sources

alixunderplatz commented 6 years ago

@brunolajoie good to know that it's automatically triggered! :)

I'd support the idea of showing sources for generation and exchange when they are different!

corradio commented 6 years ago

Can this be closed?

systemcatch commented 6 years ago

Yup all done here.