Repository: electricitymaps/electricitymaps-contrib

Issue:
Data for region Canaries Islands
Hello, I had a look at  https://www.electricitymap.org/ , it is quite interesting and a very good job ! But there is a mistake for canarias islands : you indicate generation from gas, but the LNG terminals have not been built and commissioned yet ! The mistakes comes probablyfrom bad understanding of datas published by Red Electrica de España : the amount indicated by them as "turbina de gas" and "ciclo combinado" refers to amount produced by combined cycle and open cycle gas turbine, but these plants are still operated on liquidfuel, awaiting for natural gas availability ! 


Discussion:
@legrosdede thank you for clarifying this! :)
there always is a risk of "misinterpreting" the fuel for gas turbines, since they can be operated on both fuel's as you said. Guess we have to change the fuel type in the respective parser.
By the way: Do you happen to know if the situation on the balearic islands is the same (oil instead of gas) or do they actually have some sort of gas supply?
It seems the situation on the Balearic Islands is different as they are much closer from the spanish mainland, a pipeline connecting them to the spanish gas grid has been built.
(https://magazin.mannesmann-linepipe.com/en/04-2016/projects/mallorca/)
By the way the power station in Palma de Maillorca is exaclty the same that the one I have been working in a couple of years ago in Tenerife, only the fuel is different.
There is a project to build a LNG terminal in Tenerife, but it seems to be stopped at the moment.

I guess we need to change the designation in the parser from `gas` to `oil` with a note to recheck this every 6 months or so.

@leorjorge fancy making a PR?
@systemcatch or we could assign the oil carbon intensity to gas for Canary Islands ;)
We really have to check which technologies of the ree website are assigned to which production type in our parser.
@alixunderplatz here is the current mapping.

```python
    if zone_key == 'ES-CN-HI':
        for response in island_data:
            if response.production() > 0:
                response_data = {
                    'zoneKey': zone_key,
                    'datetime': get(response.timestamp).datetime,
                    'production': {
                        'coal': 0.0,
                        'gas': round(response.gas + response.combined, 2),
                        'solar': round(response.solar, 2),
                        'oil': round(response.vapor + response.diesel, 2),
                        'wind': round(response.wind, 2),
                        'hydro': 0.0,
                        'biomass': 0.0,
                        'nuclear': 0.0,
                        'geothermal': 0.0
                    },
                    'storage': {
                        'hydro': round(-response.hydraulic, 2),
                        'battery': 0.0
                    },
                    'source': 'demanda.ree.es',
                }
                response_data = validate(response_data, logger,
                                         floor=FLOORS[zone_key])

                if response_data:
                    # append if valid
                    data.append(response_data)

    else:
        for response in island_data:
            if response.production() > 0:
                response_data = {
                    'zoneKey': zone_key,
                    'datetime': get(response.timestamp).datetime,
                    'production': {
                        'coal': 0.0,
                        'gas': round(response.gas + response.combined, 2),
                        'solar': round(response.solar, 2),
                        'oil': round(response.vapor + response.diesel, 2),
                        'wind': round(response.wind, 2),
                        'hydro': round(response.hydraulic, 2),
                        'biomass': 0.0,
                        'nuclear': 0.0,
                        'geothermal': 0.0
                    },
                    'storage': {
                        'hydro': 0.0,
                        'battery': 0.0
                    },
                    'source': 'demanda.ree.es',
                }
```

Resolving patch:
diff --git a/parsers/ES_CN.py b/parsers/ES_CN.py
--- a/parsers/ES_CN.py
+++ b/parsers/ES_CN.py
@@ -23,6 +23,7 @@
     'ES-CN-HI': 2
 }
 
+
 # TODO: Remove verify SSL config when working without it.
 def fetch_island_data(zone_key, session):
     if zone_key == 'ES-CN-FVLZ':
@@ -94,6 +95,10 @@ def fetch_production(zone_key, session=None, target_datetime=None,
     island_data = fetch_island_data(zone_key, ses)
     data = []
 
+    # NOTE the LNG terminals are not built yet, so power generated by "gas" or "combined" is actually using oil.
+    # Recheck this every 6 months and move to gas key if there has been a change.
+    # Last checked - 2020/02/01
+
     if zone_key == 'ES-CN-HI':
         for response in island_data:
             if response.production() > 0:
@@ -102,9 +107,9 @@ def fetch_production(zone_key, session=None, target_datetime=None,
                     'datetime': get(response.timestamp).datetime,
                     'production': {
                         'coal': 0.0,
-                        'gas': round(response.gas + response.combined, 2),
+                        'gas': 0.0,
                         'solar': round(response.solar, 2),
-                        'oil': round(response.vapor + response.diesel, 2),
+                        'oil': round(response.vapor + response.diesel + response.gas + response.combined, 2),
                         'wind': round(response.wind, 2),
                         'hydro': 0.0,
                         'biomass': 0.0,
@@ -132,9 +137,9 @@ def fetch_production(zone_key, session=None, target_datetime=None,
                     'datetime': get(response.timestamp).datetime,
                     'production': {
                         'coal': 0.0,
-                        'gas': round(response.gas + response.combined, 2),
+                        'gas': 0.0,
                         'solar': round(response.solar, 2),
-                        'oil': round(response.vapor + response.diesel, 2),
+                        'oil': round(response.vapor + response.diesel + response.gas + response.combined, 2),
                         'wind': round(response.wind, 2),
                         'hydro': round(response.hydraulic, 2),
                         'biomass': 0.0,


Test patch:
diff --git a/parsers/test/test_ES_CN.py b/parsers/test/test_ES_CN.py
--- a/parsers/test/test_ES_CN.py
+++ b/parsers/test/test_ES_CN.py
@@ -119,22 +119,22 @@ def test_fetch_production(self, el_hierro, gran_canaria, gomera, lanza_fuerte, p
                             or production['datetime'] == self.afternoon
                             or production['datetime'] == self.evening)
             if self.morning == production['datetime']:
-                self.assertEqual(production['production']['gas'], 54.5)
-                self.assertEqual(production['production']['oil'], 4.0)
+                self.assertEqual(production['production']['gas'], 0.0)
+                self.assertEqual(production['production']['oil'], 58.5)
                 self.assertEqual(production['production']['hydro'], 5.0)
                 self.assertEqual(production['production']['solar'], 0.4)
                 self.assertEqual(production['production']['wind'], 0.5)
                 self.assertEqual(production['storage']['hydro'], 0.0)
             elif self.afternoon == production['datetime']:
-                self.assertEqual(production['production']['gas'], 12.2)
-                self.assertEqual(production['production']['oil'], 182.0)
+                self.assertEqual(production['production']['gas'], 0.0)
+                self.assertEqual(production['production']['oil'], 194.2)
                 self.assertEqual(production['production']['hydro'], 0.0)
                 self.assertEqual(production['production']['solar'], 5.3)
                 self.assertEqual(production['production']['wind'], 3.1)
                 self.assertEqual(production['storage']['hydro'], 0.0)
             elif self.evening == production['datetime']:
-                self.assertEqual(production['production']['gas'], 44.5)
-                self.assertEqual(production['production']['oil'], 4.0)
+                self.assertEqual(production['production']['gas'], 0.0)
+                self.assertEqual(production['production']['oil'], 48.5)
                 self.assertEqual(production['production']['hydro'], 5.0)
                 self.assertEqual(production['production']['solar'], 0.4)
                 self.assertEqual(production['production']['wind'], 0.5)
@@ -173,8 +173,8 @@ def test_fetch_production_el_hierro(self, el_hierro, gran_canaria, gomera, lanza
                             or production['datetime'] == self.afternoon
                             or production['datetime'] == self.evening)
             if self.morning == production['datetime']:
-                self.assertEqual(production['production']['gas'], 4.5)
-                self.assertEqual(production['production']['oil'], 4.0)
+                self.assertEqual(production['production']['gas'], 0.0)
+                self.assertEqual(production['production']['oil'], 8.5)
                 self.assertEqual(production['production']['hydro'], 0.0)
                 self.assertEqual(production['production']['solar'], 0.4)
                 self.assertEqual(production['production']['wind'], 0.5)
@@ -187,8 +187,8 @@ def test_fetch_production_el_hierro(self, el_hierro, gran_canaria, gomera, lanza
                 self.assertEqual(production['production']['wind'], 1.6)
                 self.assertEqual(production['storage']['hydro'], -2.4)
             elif self.evening == production['datetime']:
-                self.assertEqual(production['production']['gas'], 4.5)
-                self.assertEqual(production['production']['oil'], 0.0)
+                self.assertEqual(production['production']['gas'], 0.0)
+                self.assertEqual(production['production']['oil'], 4.5)
                 self.assertEqual(production['production']['hydro'], 0.0)
                 self.assertEqual(production['production']['solar'], 0.0)
                 self.assertEqual(production['production']['wind'], 0.5)