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.53k stars 937 forks source link

Split Balearic islands ES-IB generation #1347

Closed alixunderplatz closed 5 years ago

alixunderplatz commented 6 years ago

It is possible to split the Balearic islands (just like the Canary Islands in #626) This would solve the recent issue #1346, too.

Here is the equivalent website for the Balearic system:

http://www.ree.es/en/activities/balearic-islands-electricity-system/balearic-electricity-demand-in-real-time

image

It is using the same request structure like @systemcatch described in #626 , just a few changes in the URL brought me to this:

Mallorca: https://demanda.ree.es/WSvisionaMovilesBalearesRest/resources/demandaGeneracionBaleares?callback=angular.callbacks._2&curva=MALLORCA&fecha=2018-04-23

Menorca: https://demanda.ree.es/WSvisionaMovilesBalearesRest/resources/demandaGeneracionBaleares?callback=angular.callbacks._2&curva=MENORCA&fecha=2018-04-23

Ibiza: https://demanda.ree.es/WSvisionaMovilesBalearesRest/resources/demandaGeneracionBaleares?callback=angular.callbacks._2&curva=IBIZA&fecha=2018-04-23

Formentera: https://demanda.ree.es/WSvisionaMovilesBalearesRest/resources/demandaGeneracionBaleares?callback=angular.callbacks._2&curva=FORMENTERA&fecha=2018-04-23

Interconnectors are labeled "emm" for "Mallorca<->Menorca" (inoperative!), "eif" for "Ibiza<->Formentera" and "eim" for "Ibiza<->Mallorca". "cb" is Mallorca<->Spanish peninsula.

Formentera is recently missing on the map due to its smaller size and should be added in the process.

alixunderplatz commented 6 years ago

@blackleg is this possibly covered by/included in your reescaper already?

hectorespert commented 6 years ago

@alixunderplatz I'll have a look at this.

hectorespert commented 6 years ago

@alixunderplatz I released a new version of reescraper (Now ree) to extract Balearic islands data. https://pypi.org/project/ree/

alixunderplatz commented 6 years ago

@blackleg that's lovely, thanks! :)

I guess these are the next steps:

systemcatch commented 6 years ago

@alixunderplatz Formentera is currently being removed from the map by the topojson simplification just like Aruba was, so hopefully we can apply the same fix again.

I think the approach I took on the the Canaries will work here but I'll need to refresh my memory how I actually did it with qgis.

hectorespert commented 6 years ago

@alixunderplatz I created a pull request with the dependency update.

alixunderplatz commented 6 years ago

@blackleg I saw this generation category for the Baleares (on Mallorca):

"resid":38.9

That's probably residuos / waste? It has a share of about 5-7% in the total mix of all the Islands.

I guess, this is assigned to "other" by ree at the moment? Could you put it in a seperate "waste" category, so it can be mapped to biomass? That'll reduce the "unknown" category significantly. :-)

alixunderplatz commented 6 years ago

Hey guys 😸

I tried to use "human pattern recognition" to update the ES_IB parser for splitting their generation with basically no knowledge of Python 🐍 ^^

I 'stole' and adapted some of the existing code from ES_IB and ES_CN and tried to figure out how it should work.

Feels like I got the basic stuff working in Python, at least printing demand, generation and exchanges were working fine for me^^

Since github does not support uploading .py files in the comments, here is the .txt for you guys for improvements.

I had to comment some parts to run this locally in Python, see my ##comments in the file.

ES_IB_new.txt

Greetings, Alex

systemcatch commented 6 years ago

Hey @alixunderplatz I'll take a look at this in detail later on today. You could put the .py file into a Gist if that helps?

hectorespert commented 6 years ago

@alixunderplatz Ree version with waste production: https://pypi.org/project/ree/2.2.0/

alixunderplatz commented 6 years ago

ref PR #1448 I thought about having Ibiza+Formentera as a combined zone (ES-IB-IZFO). We could barely fit the exchange arrow between these two islands anyway, which is the main reason, plus we wouldn't have to deal with getting Formentera's geometries on the map, which makes the whole process a bit easier.

Not too much of a compromise in terms of zone-wise granularity, in my opinion, and you could still collect data island-wise in the background if need be. The pattern of Formentera's supply is very interesting at the moment, though:

image

"Generacion auxiliar" looks like several 1.5 MW diesel generators that are switched on/off following the demand pattern.

@blackleg Thank you for adding waste to ree! :) I think I have to bother you one last time to add 'genAux' as 'aux' ;-)

jarek commented 5 years ago

Please see #1580 for the latest of PRs that were addressing this. Some work still remaining

systemcatch commented 5 years ago

Is there anything else that needs to be done here?

systemcatch commented 5 years ago

@corradio if you add Formentera to your specific exclusion list so it's coloured correctly when solely importing from Ibiza this can be closed.

alixunderplatz commented 5 years ago

@systemcatch one small thing that needs to be done for Formentera in general, is adding "Generacion auxiliar" to the ree scraper of @blackleg and assign this type to "oil" here (see my last comment above). This is a bit more relevant for the summer months with higher peak loads, when this category is constantly running.

corradio commented 5 years ago

@systemcatch ES-IB-FO is already added to the list.

On Fri, Nov 30, 2018 at 8:20 PM Alex notifications@github.com wrote:

@systemcatch https://github.com/systemcatch one small thing that needs to be done for Formentera in general, is adding "Generacion auxiliar" to the ree scraper of @blackleg https://github.com/blackleg and assign this type to "oil" here (see my last comment above). This is a bit more relevant for the summer months with higher peak loads, when this category is constantly running.

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

systemcatch commented 5 years ago

@corradio weird because it's still coloured grey in the image below. Maybe I'm not understanding correctly?

fo-no-colour

@alixunderplatz ah ok fair enough, maybe when @blackleg has a moment he can add that.

corradio commented 5 years ago

Indeed I'll take a look.

corradio commented 5 years ago

@systemcatch fixed