NEMED module
NEMED module#
Core user interfacing module
- nemed.nemed.get_marginal_emissions(start_time, end_time, cache)#
Retrieves the marginal emissions intensity for each dispatch interval and region. This factor being the weighted sum of the generators contributing to price-setting. Although not necessarily common, there may be times where multiple technology types contribute to the marginal emissions - note however that the ‘DUID’ and ‘CO2E_ENERGY_SOURCE’ returned will reflect only the plant which makes the greatest contribution towards price-setting.
- Parameters
- Returns
Data is returned as:
Columns:
Type:
Description:
Time
datetime
Timestamp reported as end of dispatch interval.
Region
str
The NEM region corresponding to the marginal emitter data.
Intensity_Index
float
The intensity index [tCO2e/MWh] (as by weighted contributions) of the price-setting generators.
DUID
str
Unit identifier of the generator with the largest contribution on the margin for that Time-Region.
CO2E_ENERGY_SOURCE
str
Unit energy source with the largest contribution on the margin for that Time-Region.
- Return type
pandas.DataFrame
- nemed.nemed.get_total_emissions(start_time, end_time, cache, filter_regions=None, by=None, generation_sent_out=True, assume_energy_ramp=True, return_pivot=False)#
Retrieve (Aggregated) Regional Emissions data for total emissions (absolute and emissions intensity), as well as sent-out energy generation for a defined period and time-resolution (e.g. hour, day, month)
- Parameters
start_time (str) – Start Time Period in format ‘yyyy/mm/dd HH:MM:SS’
end_time (str) – End Time Period in format ‘yyyy/mm/dd HH:MM:SS’
cache (str) – Raw data location in local directory
filter_regions (list(str)) – NEM regions to filter for while retrieving the data, as a list, by default None to collect all region data
by (str, one of ['interval', 'hour', 'day', 'month', 'year']) – The time-resolution of output data to aggregate to, by default None to return unaggregated 5-minute time resolution
generation_sent_out (bool) – Considers ‘sent_out’ generation (auxilary loads) as opposed to ‘as generated’ in calculations, by default True
assume_ramp (bool) – Uses a linear ramp between dispatch scada points as opposed to a stepped function, by default True
return_pivot (bool) – Changes the structure of the returned dataframe to a pivot with column hierarchy as Data Metric then Region, by default False
- Returns
Data is returned as formatted if return_pivot = False:
Columns:
Type:
Description:
TimeBeginning
datetime
Timestamp for start of interval or aggregation period. Only returned if by parameter is set.
TimeEnding
datetime
Timestamp for end of interval or aggregation period.
Region
str
The NEM region corresponding to data. ‘NEM’ field reflects all regions and is returned if filter_regions is None.
Energy
float
The total (sent-out if generation_sent_out is True) energy for the corresponding region and time.
Total_Emissions
float
The total emissions for the corresponding region and time.
Intensity_Index
float
The intensity index as above, considering the total emissions divided by (sent-out) energy.
- Return type
pandas.DataFrame