Skip to main content

Simple CLI for downloading data for Australia's NEM from AEMO.

Project description

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.
  -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).

Project details


Download files

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

Source Distribution

nemdata-0.3.4.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

nemdata-0.3.4-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file nemdata-0.3.4.tar.gz.

File metadata

  • Download URL: nemdata-0.3.4.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.6 Darwin/22.1.0

File hashes

Hashes for nemdata-0.3.4.tar.gz
Algorithm Hash digest
SHA256 9cbd0b5137b63a84c383730ba37e6f1ba71aa6aad5f5328163ba8ee3f44ec80a
MD5 a3c44839da64ffc52d72402cc9eb92f0
BLAKE2b-256 b1134f311b4e2e0691eb5bde2e207f2876646dcd2ed752a3b6e021f5ead29942

See more details on using hashes here.

File details

Details for the file nemdata-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: nemdata-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.6 Darwin/22.1.0

File hashes

Hashes for nemdata-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a67eb4f9d96112d5549e6be9946d3e2e34f3fd796077d36de77b4ef5bfe4f049
MD5 ff1414a458fa27cfaae6a81b37e31fad
BLAKE2b-256 75f3cfeed308b4c7deeee6d17f94b2855c614e88e4247bcf585ff9fdcad8f2f5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page