Skip to main content

nem-data

A simple & opinionated Python command line tool to access Australian National Energy Market (NEM) data provided by the Australian Energy Market Operator (AEMO). It features:

  • access to the NEMDE dataset as well as the predispatch, unit-scada, trading-price, demand and interconnectors tables from MMSDM,
  • a cache to not re-download data that already exists in ~/nem-data/data,
  • adds interval-start and interval-end columns.

It is designed for use by researchers & data scientists - this tool supports my personal research work. It is not designed for production use - see NEMOSIS for a production grade package.

See A Hackers Guide to AEMO & NEM Data for more context on the data provided by AEMO.

Setup

$ pip install nemdata

Use

CLI

$ nemdata --help
Usage: nemdata [OPTIONS]

  Downloads NEM data from AEMO.

Options:
  -t, --table TEXT          Available tables: nemde, dispatch-price,
                            predispatch, unit-scada, trading-price, demand,
                            interconnectors, p5min, predispatch-sensitivities,
                            predispatch-demand.
  -s, --start TEXT          Start date (YYYY-MM or YYYY-MM-DD for NEMDE).
  -e, --end TEXT            End date (incusive) (YYYY-MM or YYYY-MM-DD for
                            NEMDE).
  --dry-run / --no-dry-run  Whether to save downloaded data to disk.
  --help                    Show this message and exit.

Download NEMDE data for the first three days in January 2018:

$ nemdata -t nemde --start 2018-01-01 --end 2018-01-03

Download trading price data from MMSDM for January to March 2018:

$ nemdata -t trading-price -s 2018-01 -e 2018-03

Python

Download trading price data from MMSDM for January to Feburary 2020:

import nemdata

data = nemdata.download(start="2020-01", end="2020-02", table="trading-price")

Load this data back into a pandas DataFrame:

data = nemdata.load()['trading-price']

At this point, data will have the trading price for all regions.

Data

Downloaded into into $HOME/nem-data/data/:

$ nemdata -t trading-price -s 2020-01 -e 2020-02
$ tree ~/nem-data
/Users/adam/nem-data
└── data
    └── trading-price
        ├── 2020-01
        │   ├── PUBLIC_DVD_TRADINGPRICE_202001010000.CSV
        │   ├── clean.csv
        │   ├── clean.parquet
        │   └── raw.zip
        └── 2020-02
            ├── PUBLIC_DVD_TRADINGPRICE_202002010000.CSV
            ├── clean.csv
            ├── clean.parquet
            └── raw.zip

A few things happen during data processing:

  • rows of the raw CSV are removed to create a rectangular, single table CSV,
  • interval-start and interval-end timezone aware datetime columns are added,
  • when using nemdata.loader.loader for trading-price, all data is resampled to a 5 minute frequency (both before and after the 30 to 5 minute settlement interval change).

Metadata

Release files for nemdata 0.3.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nemdata 0.3.7
File Size Uploaded
nemdata-0.3.7.tar.gz 8.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nemdata 0.3.7
File Interpreter ABI Platform
nemdata-0.3.7-py3-none-any.whl Python 3 none any Details

Total release size: 19.2 kB

Release files / nemdata-0.3.7.tar.gz

Download URL nemdata-0.3.7.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a6200b9b9e609b171a1216f435303c40e0d792956a9b183d2778574ab80a8402
BLAKE2b-256 checksum
How to use checksums
d5a3bcdac4efeca036781df84d4445e561dfbb279be3c6d57a07448f739ec471
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.10.6 Linux/6.5.0-1025-azure

Release files / nemdata-0.3.7-py3-none-any.whl

Download URL nemdata-0.3.7-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ea6af34718354fd8c4dd0d05a7a68b50d859955641d2bcce35d4422d2812248
BLAKE2b-256 checksum
How to use checksums
0d09fe3ad4b6009f2c30af1b47cbdd62f34d834a3308e58431a44ff18113bc93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.10.6 Linux/6.5.0-1025-azure

Release history Release notifications | RSS feed

This release

0.3.7 This release

2 release files

0.3.6

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page