Repository: electricitymaps/electricitymaps-contrib

Issue:
United States NY ISO calculation on Dual Fuel is probably wrong
Just found your site today, really cool. I'd actually done a tech demo with streaming data from the nyiso as part of an MQTT / Kubernetes talk. Demo site at http://ny-power.org.

The Dual Fuel column is getting mapped to pretty dirty fossil fuel systems, which I think is probably inaccurate. My understanding of the dual fuel plants is they mostly burn Natural Gas, but can burn Oil instead when Natural Gas is constrained and targeted for heating (typically during peak heating demand in the winter). I looked up the total Oil burned for electricity generation in 2016 (the last year that numbers are available), and it was actually really low. So when I was simulating it I gave it a kind of 30% Oil / 70% NG number as an approximation. It's probably as good a guess as one can get. But the worse than coal numbers are I think pretty far off.

Is there a way in the system to provide a custom value, or is it just mapping back to the IPCC averaged numbers? 


Discussion:
Hi @sdague, Thanks for your help!  Short answer is yes. We can totally change the carbon intensity of our "unknown" category based on historical % of oil/gas/coal used in previous year. It's already done in many other regions (see russia "unknown" tooltip for instance) 

Now, our current mapping form the NYISO parser is currently as follow
```
mapping = {
    'Dual Fuel': 'unknown',
    'Natural Gas': 'gas',
    'Nuclear': 'nuclear',
    'Other Fossil Fuels': 'unknown',
    'Other Renewables': 'unknown',
    'Wind': 'wind',
    'Hydro': 'hydro'
}
```
So duel fuel could be 30% Oil, 70% nat gas as you suggested. (could you send us some source to justify these nubmers). 

Now what do we do with other Renewable and Other Fossil? Do they account for a lot of MW on NYISO data stream on average over a year? Have you got some idea of what they are really made of?





Great! I'll dig up references on Monday. If you point me at the right part of the code I can do a PR directly.

Both the other Renewable and Other Fossil are typically really small (some days there is no Other Fossil). I don't know right now what make them up, but I'll see if I can do some digging and get better answers.
Here you go ! https://github.com/tmrowco/electricitymap/blob/8e869ebe369037006857860b1f81b2b543e8e086/config/co2eq_parameters.js#L62

Resolving patch:
diff --git a/parsers/US_NY.py b/parsers/US_NY.py
--- a/parsers/US_NY.py
+++ b/parsers/US_NY.py
@@ -9,8 +9,15 @@
 import arrow
 import pandas as pd
 
+# Dual Fuel systems can run either Natural Gas or Oil, they represent
+# significantly more capacity in NY State than plants that can only
+# burn Natural Gas. When looking up fuel usage for NY in 2016 in
+# https://www.eia.gov/electricity/data/state/annual_generation_state.xls
+# 100 times more energy came from NG than Oil. That means Oil
+# consumption in the Dual Fuel systems is roughly ~1%, and to a first
+# approximation it's just Natural Gas.
 mapping = {
-    'Dual Fuel': 'unknown',
+    'Dual Fuel': 'gas',
     'Natural Gas': 'gas',
     'Nuclear': 'nuclear',
     'Other Fossil Fuels': 'unknown',


Test patch: