Code The code is provided in two formats: 1) RenewableCarbonWindFall.py - python source file 2) RenewableCarbonWindFall.ipynb - ipython notebook The ipython notebook contains both python code and various intermediate results such as graphs and data samples, and can be viewed by importing into a Jupyter notebook environment or similar, such as available in Anaconda or Microsoft Azure Databricks. The code reads generation data from the Electricity Authority's internal data warehouse, so you will not be able to run it. However there should be sufficient detail for you to understand what is going on. Input data 1) carbonFactors.csv - a table of heat rates and carbon emission factors for each thermal plant 2) carbonPriceDaily.csv - the historical NZU price series