Welcome to nem’s documentation!

This is an example on how to use the nem module to read data from AEMO.

import nem

for document in nem.current.DispatchIS:
for data in document.filter("PRICE"):
    if data["REGIONID"] == "VIC1":
        print(data["RRP"])
        
# prints out the RRP for VIC

print(nem.generators()["GSTONE1"]["Fuel Source - Primary"])
# 'Fossil'
# prints out the primary fuel source for gstone
nem.archive = <nem.importer.importer object>

Provides a nem.importer for archive data

nem.current = <nem.importer.importer object>

Provides a nem.importer for current data

nem.direct

Provides a nem.importer.document for single use file extraction

alias of document

nem.generators

Dictonary of generators and their data from the partipants list

alias of stationdata

nem.historical = <nem.importer.importer object>

Provides a nem.importer for historical data (10+ years)

class nem.importer.document(url)

Bases: object

Lists all the documents avaliable for parsing by this module

Parameters:url (string) – URL to parse
clean_data

Provides a dictonary of all the datasets

Return type:object
Returns:{“dataset1”:[{“header1”:”value”}]}
data

Provides the raw data from the file

Return type:list
Returns:Array of raw lines of data
datasets

Provides lists of datasets in the file

Return type:list
Returns:Array of datasets avaliable
dateTime = None

Provides a datetime object for the file based on the timestamp in the filename

Return type:datetime
filter(dataSet)

Filters out data to a specific dataset and return that set

Return type:[{“header1”:”data1”}]
class nem.importer.files(baseUrl, historical)

Bases: list

Lists all the documents avaliable for parsing by this module

Parameters:
  • baseUrl (string) – URL to list files for
  • historical (string) – Enables generating a list of files for every year, requires being set to the filename requested (eg PUBLIC_DVD_P5MIN_REGIONSOLUTION)
Returns:

Returns an array of documents

Return type:

[document]

class nem.importer.importer(url='http://www.nemweb.com.au/Reports/CURRENT/', historical=False)

Bases: object

Impoter class allows downloading data from AEMO NEM site

Parameters:
  • url (string) – URL to the NEM server
  • historical (boolean) – Access to historical data using the MMSDM data
Returns:

Returns an array of documents

Return type:

[document]

CO2 = None

NEM CO2 data documents

Return type:[document]
DispatchIS = None

NEM DispatchIS data documents

Return type:[document]
Notices = None

NEM Notices data documents

Return type:[document]
SCADA = None

NEM SCADA data documents

Return type:[document]
p5 = None

NEM p5 data documents

Return type:[document]

Indices and tables