Skip to main content

Parse NEM12 (interval metering data) and NEM13 (accumulated metering data) data files

Project description

# nem-reader

[![PyPI version](https://badge.fury.io/py/nemreader.svg)](https://badge.fury.io/py/nemreader) [![Build Status](https://travis-ci.org/aguinane/nem-reader.svg?branch=master)](https://travis-ci.org/aguinane/nem-reader) [![Coverage Status](https://coveralls.io/repos/github/aguinane/nem-reader/badge.svg)](https://coveralls.io/github/aguinane/nem-reader)

The Australian Energy Market Operator (AEMO) defines a Meter Data File Format (MDFF) for reading energy billing data.
[MDFF Specification](https://www.aemo.com.au/Stakeholder-Consultation/Consultations/Meter-Data-File-Format-Specification-NEM12-and-NEM13)

This library sets out to parse these NEM12 (interval metering data) and NEM13 (accumulated metering data) data files into a useful python object, for use in other projects.

First, read in the NEM file:
```python
import nemreader as nr
m = nr.read_nem_file(file_path)
```

Then retreive the data for the NMI and channels of interest:
```python
> print(m.header)
HeaderRecord(version_header='NEM12', datetime=datetime.datetime(2004, 4, 20, 13, 0), from_participant='MDA1', to_participant='Ret1')

> print('Transactions:', m.transactions)
Transactions: {'CCCC123456': {'E1': []}}

> for nmi in m.readings:
> for channel in m.readings[nmi]:
> for reading in m.readings[nmi][channel][-1:]:
> print(reading)
Reading(t_start=datetime.datetime(2004, 4, 17, 23, 30), t_end=datetime.datetime(2004, 4, 18, 0, 0), read_value=14.733, uom='kWh', quality_method='S14', event='', read_start=None, read_end=None)
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
nemreader-0.2.2-py3-none-any.whl (8.1 kB) Copy SHA256 hash SHA256 Wheel py3 Mar 30, 2018
nemreader-0.2.2.tar.gz (5.0 kB) Copy SHA256 hash SHA256 Source None Mar 30, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page